From af846a5279bf7d3545171bfefcf608cbf79283c2 Mon Sep 17 00:00:00 2001 From: Douglas Lima Date: Tue, 15 Jun 2021 22:01:50 -0300 Subject: [PATCH] feat: changes to Consumer Telemetry Metric --- .../ClientApp/dist/index.html | 1 + .../ClientApp/dist/main.js | 70 +++++++++---------- .../ClientApp/src/app/app.module.ts | 16 ++--- .../ClientApp/src/app/callback.pipe.ts | 14 ---- .../ClientApp/src/app/consumer.service.ts | 12 ++-- .../src/app/consumer/consumer.component.html | 22 +++--- .../src/app/consumer/consumer.component.ts | 33 ++++----- .../pause-modal/pause-modal.component.html | 0 .../pause-modal/pause-modal.component.ts | 0 .../reset-modal/reset-modal.component.html | 0 .../reset-modal/reset-modal.component.ts | 0 .../restart-modal.component.html | 0 .../restart-modal/restart-modal.component.ts | 0 .../resume-modal/resume-modal.component.html | 0 .../resume-modal/resume-modal.component.ts | 0 .../rewind-modal/rewind-modal.component.html | 0 .../rewind-modal/rewind-modal.component.ts | 0 .../workers-count-modal.component.html | 0 .../workers-count-modal.component.ts | 0 .../ClientApp/src/index.html | 1 + .../Adapters/ConsumerResponseAdapter.cs | 2 +- .../Adapters/TelemetryResponseAdapter.cs | 4 +- .../Contracts/ConsumerResponse.cs | 4 +- .../Controllers/GroupsController.cs | 1 - .../ClusterConfigurationBuilderExtensions.cs | 2 +- ...r.cs => ConsumerTelemetryMetricHandler.cs} | 6 +- src/KafkaFlow.Admin/ITelemetryStorage.cs | 10 +-- src/KafkaFlow.Admin/MemoryTelemetryStorage.cs | 12 ++-- ...erMetric.cs => ConsumerTelemetryMetric.cs} | 2 +- src/KafkaFlow.Admin/TelemetryScheduler.cs | 6 +- .../MemoryTelemetryStorageTests.cs | 14 ++-- .../Consumers/ConsumerFlowManager.cs | 2 +- 32 files changed, 108 insertions(+), 126 deletions(-) delete mode 100644 src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/callback.pipe.ts rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/pause-modal/pause-modal.component.html (100%) rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/pause-modal/pause-modal.component.ts (100%) rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/reset-modal/reset-modal.component.html (100%) rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/reset-modal/reset-modal.component.ts (100%) rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/restart-modal/restart-modal.component.html (100%) rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/restart-modal/restart-modal.component.ts (100%) rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/resume-modal/resume-modal.component.html (100%) rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/resume-modal/resume-modal.component.ts (100%) rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/rewind-modal/rewind-modal.component.html (100%) rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/rewind-modal/rewind-modal.component.ts (100%) rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/workers-count-modal/workers-count-modal.component.html (100%) rename src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/{ => consumer}/shared/workers-count-modal/workers-count-modal.component.ts (100%) rename src/KafkaFlow.Admin/Handlers/{ConsumerMetricHandler.cs => ConsumerTelemetryMetricHandler.cs} (52%) rename src/KafkaFlow.Admin/Messages/{ConsumerMetric.cs => ConsumerTelemetryMetric.cs} (97%) diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/dist/index.html b/src/KafkaFlow.Admin.Dashboard/ClientApp/dist/index.html index 8eccc3a13..8d752309a 100644 --- a/src/KafkaFlow.Admin.Dashboard/ClientApp/dist/index.html +++ b/src/KafkaFlow.Admin.Dashboard/ClientApp/dist/index.html @@ -5,6 +5,7 @@ KafkaFlow - Dashboard + diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/dist/main.js b/src/KafkaFlow.Admin.Dashboard/ClientApp/dist/main.js index 2f9241fba..b897caa99 100644 --- a/src/KafkaFlow.Admin.Dashboard/ClientApp/dist/main.js +++ b/src/KafkaFlow.Admin.Dashboard/ClientApp/dist/main.js @@ -1,4 +1,4 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},zUnb:function(t,e,n){"use strict";function r(t){return"function"==typeof t}n.r(e);let s=!1;const i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else s&&console.log("RxJS: Back to a better error behavior. Thank you. <3");s=t},get useDeprecatedSynchronousErrorHandling(){return s}};function o(t){setTimeout(()=>{throw t},0)}const a={closed:!0,next(t){},error(t){if(i.useDeprecatedSynchronousErrorHandling)throw t;o(t)},complete(){}},l=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))();function c(t){return null!==t&&"object"==typeof t}const u=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let h=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:s,_unsubscribe:i,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;tt.concat(e instanceof u?e.errors:e),[])}const p=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())();class f extends h{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a;break;case 1:if(!t){this.destination=a;break}if("object"==typeof t){t instanceof f?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new g(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new g(this,t,e,n)}}[p](){return this}static create(t,e,n){const r=new f(t,e,n);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class g extends f{constructor(t,e,n,s){let i;super(),this._parentSubscriber=t;let o=this;r(e)?i=e:e&&(i=e.next,n=e.error,s=e.complete,e!==a&&(o=Object.create(e),r(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=i,this._error=n,this._complete=s}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;i.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=i;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):o(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;o(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);i.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),i.useDeprecatedSynchronousErrorHandling)throw n;o(n)}}__tryOrSetError(t,e,n){if(!i.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return i.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(o(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const m=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")();function y(t){return t}let _=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:r}=this,s=function(t,e,n){if(t){if(t instanceof f)return t;if(t[p])return t[p]()}return t||e||n?new f(t,e,n):new f(a)}(t,e,n);if(s.add(r?r.call(s,this.source):this.source||i.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),i.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(e){i.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:r}=t;if(e||r)return!1;t=n&&n instanceof f?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=b(e))((e,n)=>{let r;r=this.subscribe(e=>{try{t(e)}catch(s){n(s),r&&r.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[m](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?y:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=b(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function b(t){if(t||(t=i.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const v=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class w extends h{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class C extends f{constructor(t){super(t),this.destination=t}}let S=(()=>{class t extends _{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[p](){return new C(this)}lift(t){const e=new x(this,this);return e.operator=t,e}next(t){if(this.closed)throw new v;if(!this.isStopped){const{observers:e}=this,n=e.length,r=e.slice();for(let s=0;snew x(t,e),t})();class x extends S{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):h.EMPTY}}function E(t){return t&&"function"==typeof t.schedule}function k(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new T(t,e))}}class T{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new A(t,this.project,this.thisArg))}}class A extends f{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}const O=t=>e=>{for(let n=0,r=t.length;nt&&"number"==typeof t.length&&"function"!=typeof t;function D(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const N=t=>{if(t&&"function"==typeof t[m])return r=t,t=>{const e=r[m]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(P(t))return O(t);if(D(t))return n=t,t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,o),t);if(t&&"function"==typeof t[I])return e=t,t=>{const n=e[I]();for(;;){let e;try{e=n.next()}catch(r){return t.error(r),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=c(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n,r};function M(t,e){return new _(n=>{const r=new h;let s=0;return r.add(e.schedule(function(){s!==t.length?(n.next(t[s++]),n.closed||r.add(this.schedule())):n.complete()})),r})}function j(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[m]}(t))return function(t,e){return new _(n=>{const r=new h;return r.add(e.schedule(()=>{const s=t[m]();r.add(s.subscribe({next(t){r.add(e.schedule(()=>n.next(t)))},error(t){r.add(e.schedule(()=>n.error(t)))},complete(){r.add(e.schedule(()=>n.complete()))}}))})),r})}(t,e);if(D(t))return function(t,e){return new _(n=>{const r=new h;return r.add(e.schedule(()=>t.then(t=>{r.add(e.schedule(()=>{n.next(t),r.add(e.schedule(()=>n.complete()))}))},t=>{r.add(e.schedule(()=>n.error(t)))}))),r})}(t,e);if(P(t))return M(t,e);if(function(t){return t&&"function"==typeof t[I]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new _(n=>{const r=new h;let s;return r.add(()=>{s&&"function"==typeof s.return&&s.return()}),r.add(e.schedule(()=>{s=t[I](),r.add(e.schedule(function(){if(n.closed)return;let t,e;try{const n=s.next();t=n.value,e=n.done}catch(r){return void n.error(r)}e?n.complete():(n.next(t),this.schedule())}))})),r})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof _?t:new _(N(t))}class V extends f{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class F extends f{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function U(t,e){if(e.closed)return;if(t instanceof _)return t.subscribe(e);let n;try{n=N(t)(e)}catch(r){e.error(r)}return n}function L(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?r=>r.pipe(L((n,r)=>j(t(n,r)).pipe(k((t,s)=>e(n,t,r,s))),n)):("number"==typeof e&&(n=e),e=>e.lift(new H(t,n)))}class H{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new $(t,this.project,this.concurrent))}}class $ extends F{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function z(t=Number.POSITIVE_INFINITY){return L(y,t)}function B(t,e){return e?M(t,e):new _(O(t))}function W(){return function(t){return t.lift(new q(t))}}class q{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const r=new G(t,n),s=e.subscribe(r);return r.closed||(r.connection=n.connect()),s}}class G extends f{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}class Z extends _{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new h,t.add(this.source.subscribe(new Q(this.getSubject(),this))),t.closed&&(this._connection=null,t=h.EMPTY)),t}refCount(){return W()(this)}}const Y=(()=>{const t=Z.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class Q extends C{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function K(){return new S} +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},zUnb:function(t,e,n){"use strict";function r(t){return"function"==typeof t}n.r(e);let s=!1;const i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else s&&console.log("RxJS: Back to a better error behavior. Thank you. <3");s=t},get useDeprecatedSynchronousErrorHandling(){return s}};function o(t){setTimeout(()=>{throw t},0)}const a={closed:!0,next(t){},error(t){if(i.useDeprecatedSynchronousErrorHandling)throw t;o(t)},complete(){}},l=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))();function c(t){return null!==t&&"object"==typeof t}const u=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let h=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:s,_unsubscribe:i,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;tt.concat(e instanceof u?e.errors:e),[])}const p=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())();class f extends h{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a;break;case 1:if(!t){this.destination=a;break}if("object"==typeof t){t instanceof f?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new g(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new g(this,t,e,n)}}[p](){return this}static create(t,e,n){const r=new f(t,e,n);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class g extends f{constructor(t,e,n,s){let i;super(),this._parentSubscriber=t;let o=this;r(e)?i=e:e&&(i=e.next,n=e.error,s=e.complete,e!==a&&(o=Object.create(e),r(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=i,this._error=n,this._complete=s}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;i.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=i;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):o(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;o(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);i.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),i.useDeprecatedSynchronousErrorHandling)throw n;o(n)}}__tryOrSetError(t,e,n){if(!i.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return i.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(o(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const m=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")();function y(t){return t}let _=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:r}=this,s=function(t,e,n){if(t){if(t instanceof f)return t;if(t[p])return t[p]()}return t||e||n?new f(t,e,n):new f(a)}(t,e,n);if(s.add(r?r.call(s,this.source):this.source||i.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),i.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(e){i.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:r}=t;if(e||r)return!1;t=n&&n instanceof f?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=b(e))((e,n)=>{let r;r=this.subscribe(e=>{try{t(e)}catch(s){n(s),r&&r.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[m](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?y:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=b(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function b(t){if(t||(t=i.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const v=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class w extends h{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class C extends f{constructor(t){super(t),this.destination=t}}let S=(()=>{class t extends _{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[p](){return new C(this)}lift(t){const e=new x(this,this);return e.operator=t,e}next(t){if(this.closed)throw new v;if(!this.isStopped){const{observers:e}=this,n=e.length,r=e.slice();for(let s=0;snew x(t,e),t})();class x extends S{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):h.EMPTY}}function E(t){return t&&"function"==typeof t.schedule}function k(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new T(t,e))}}class T{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new A(t,this.project,this.thisArg))}}class A extends f{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}const O=t=>e=>{for(let n=0,r=t.length;nt&&"number"==typeof t.length&&"function"!=typeof t;function D(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const M=t=>{if(t&&"function"==typeof t[m])return r=t,t=>{const e=r[m]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(P(t))return O(t);if(D(t))return n=t,t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,o),t);if(t&&"function"==typeof t[I])return e=t,t=>{const n=e[I]();for(;;){let e;try{e=n.next()}catch(r){return t.error(r),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=c(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n,r};function N(t,e){return new _(n=>{const r=new h;let s=0;return r.add(e.schedule(function(){s!==t.length?(n.next(t[s++]),n.closed||r.add(this.schedule())):n.complete()})),r})}function j(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[m]}(t))return function(t,e){return new _(n=>{const r=new h;return r.add(e.schedule(()=>{const s=t[m]();r.add(s.subscribe({next(t){r.add(e.schedule(()=>n.next(t)))},error(t){r.add(e.schedule(()=>n.error(t)))},complete(){r.add(e.schedule(()=>n.complete()))}}))})),r})}(t,e);if(D(t))return function(t,e){return new _(n=>{const r=new h;return r.add(e.schedule(()=>t.then(t=>{r.add(e.schedule(()=>{n.next(t),r.add(e.schedule(()=>n.complete()))}))},t=>{r.add(e.schedule(()=>n.error(t)))}))),r})}(t,e);if(P(t))return N(t,e);if(function(t){return t&&"function"==typeof t[I]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new _(n=>{const r=new h;let s;return r.add(()=>{s&&"function"==typeof s.return&&s.return()}),r.add(e.schedule(()=>{s=t[I](),r.add(e.schedule(function(){if(n.closed)return;let t,e;try{const n=s.next();t=n.value,e=n.done}catch(r){return void n.error(r)}e?n.complete():(n.next(t),this.schedule())}))})),r})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof _?t:new _(M(t))}class V extends f{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class F extends f{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function U(t,e){if(e.closed)return;if(t instanceof _)return t.subscribe(e);let n;try{n=M(t)(e)}catch(r){e.error(r)}return n}function L(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?r=>r.pipe(L((n,r)=>j(t(n,r)).pipe(k((t,s)=>e(n,t,r,s))),n)):("number"==typeof e&&(n=e),e=>e.lift(new H(t,n)))}class H{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new $(t,this.project,this.concurrent))}}class $ extends F{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function z(t=Number.POSITIVE_INFINITY){return L(y,t)}function B(t,e){return e?N(t,e):new _(O(t))}function W(){return function(t){return t.lift(new q(t))}}class q{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const r=new G(t,n),s=e.subscribe(r);return r.closed||(r.connection=n.connect()),s}}class G extends f{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}class Z extends _{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new h,t.add(this.source.subscribe(new Q(this.getSubject(),this))),t.closed&&(this._connection=null,t=h.EMPTY)),t}refCount(){return W()(this)}}const Y=(()=>{const t=Z.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class Q extends C{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function K(){return new S} /** * @license Angular v11.2.11 * (c) 2010-2021 Google LLC. https://angular.io/ @@ -92,7 +92,7 @@ function St(t){return{toString:t}.toString()} * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -const kt="undefined"!=typeof globalThis&&globalThis,Tt="undefined"!=typeof window&&window,At="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Ot="undefined"!=typeof global&&global,Rt=kt||Ot||Tt||At,It={},Pt=[],Dt=[],Nt=J({"\u0275cmp":J}),Mt=J({"\u0275dir":J}),jt=J({"\u0275pipe":J}),Vt=J({"\u0275mod":J}),Ft=J({"\u0275loc":J}),Ut=J({"\u0275fac":J}),Lt=J({__NG_ELEMENT_ID__:J}); +const kt="undefined"!=typeof globalThis&&globalThis,Tt="undefined"!=typeof window&&window,At="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Ot="undefined"!=typeof global&&global,Rt=kt||Ot||Tt||At,It={},Pt=[],Dt=[],Mt=J({"\u0275cmp":J}),Nt=J({"\u0275dir":J}),jt=J({"\u0275pipe":J}),Vt=J({"\u0275mod":J}),Ft=J({"\u0275loc":J}),Ut=J({"\u0275fac":J}),Lt=J({__NG_ELEMENT_ID__:J}); /** * @license * Copyright Google LLC All Rights Reserved. @@ -100,7 +100,7 @@ const kt="undefined"!=typeof globalThis&&globalThis,Tt="undefined"!=typeof windo * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -let Ht=0;function $t(t){return St(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===xt.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||Dt,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||Et.Emulated,id:"c",styles:t.styles||Dt,_:null,setInput:null,schemas:t.schemas||null,tView:null},r=t.directives,s=t.features,i=t.pipes;return n.id+=Ht++,n.inputs=Gt(t.inputs,e),n.outputs=Gt(t.outputs),s&&s.forEach(t=>t(n)),n.directiveDefs=r?()=>("function"==typeof r?r():r).map(zt):null,n.pipeDefs=i?()=>("function"==typeof i?i():i).map(Bt):null,n})}function zt(t){return Qt(t)||function(t){return t[Mt]||null}(t)}function Bt(t){return function(t){return t[jt]||null}(t)}const Wt={};function qt(t){const e={type:t.type,bootstrap:t.bootstrap||Dt,declarations:t.declarations||Dt,imports:t.imports||Dt,exports:t.exports||Dt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&St(()=>{Wt[t.id]=t.type}),e}function Gt(t,e){if(null==t)return It;const n={};for(const r in t)if(t.hasOwnProperty(r)){let s=t[r],i=s;Array.isArray(s)&&(i=s[1],s=s[0]),n[s]=r,e&&(e[s]=i)}return n}const Zt=$t;function Yt(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function Qt(t){return t[Nt]||null}function Kt(t,e){const n=t[Vt]||null;if(!n&&!0===e)throw new Error(`Type ${tt(t)} does not have '\u0275mod' property.`);return n} +let Ht=0;function $t(t){return St(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===xt.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||Dt,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||Et.Emulated,id:"c",styles:t.styles||Dt,_:null,setInput:null,schemas:t.schemas||null,tView:null},r=t.directives,s=t.features,i=t.pipes;return n.id+=Ht++,n.inputs=Gt(t.inputs,e),n.outputs=Gt(t.outputs),s&&s.forEach(t=>t(n)),n.directiveDefs=r?()=>("function"==typeof r?r():r).map(zt):null,n.pipeDefs=i?()=>("function"==typeof i?i():i).map(Bt):null,n})}function zt(t){return Qt(t)||function(t){return t[Nt]||null}(t)}function Bt(t){return function(t){return t[jt]||null}(t)}const Wt={};function qt(t){const e={type:t.type,bootstrap:t.bootstrap||Dt,declarations:t.declarations||Dt,imports:t.imports||Dt,exports:t.exports||Dt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&St(()=>{Wt[t.id]=t.type}),e}function Gt(t,e){if(null==t)return It;const n={};for(const r in t)if(t.hasOwnProperty(r)){let s=t[r],i=s;Array.isArray(s)&&(i=s[1],s=s[0]),n[s]=r,e&&(e[s]=i)}return n}const Zt=$t;function Yt(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function Qt(t){return t[Mt]||null}function Kt(t,e){const n=t[Vt]||null;if(!n&&!0===e)throw new Error(`Type ${tt(t)} does not have '\u0275mod' property.`);return n} /** * @license * Copyright Google LLC All Rights Reserved. @@ -168,7 +168,7 @@ function me(t){for(;Array.isArray(t);)t=t[0];return t}function ye(t,e){return me * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */const Ae={lFrame:Ke(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Oe(){return Ae.bindingsEnabled}function Re(){return Ae.lFrame.lView}function Ie(){return Ae.lFrame.tView}function Pe(t){Ae.lFrame.contextLView=t}function De(){let t=Ne();for(;null!==t&&64===t.type;)t=t.parent;return t}function Ne(){return Ae.lFrame.currentTNode}function Me(t,e){const n=Ae.lFrame;n.currentTNode=t,n.isParent=e}function je(){return Ae.lFrame.isParent}function Ve(){Ae.lFrame.isParent=!1}function Fe(){return Ae.isInCheckNoChangesMode}function Ue(t){Ae.isInCheckNoChangesMode=t}function Le(){const t=Ae.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function He(){return Ae.lFrame.bindingIndex++}function $e(t){const e=Ae.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function ze(t,e){const n=Ae.lFrame;n.bindingIndex=n.bindingRootIndex=t,Be(e)}function Be(t){Ae.lFrame.currentDirectiveIndex=t}function We(){return Ae.lFrame.currentQueryIndex}function qe(t){Ae.lFrame.currentQueryIndex=t}function Ge(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function Ze(t,e,n){if(n&bt.SkipSelf){let r=e,s=t;for(;r=r.parent,!(null!==r||n&bt.Host||(r=Ge(s),null===r)||(s=s[15],10&r.type)););if(null===r)return!1;e=r,t=s}const r=Ae.lFrame=Qe();return r.currentTNode=e,r.lView=t,!0}function Ye(t){const e=Qe(),n=t[1];Ae.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function Qe(){const t=Ae.lFrame,e=null===t?null:t.child;return null===e?Ke(t):e}function Ke(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Je(){const t=Ae.lFrame;return Ae.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Xe=Je;function tn(){const t=Je();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function en(){return Ae.lFrame.selectedIndex}function nn(t){Ae.lFrame.selectedIndex=t}function rn(){const t=Ae.lFrame;return be(t.tView,t.selectedIndex)}function sn(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n=r)break}else e[a]<0&&(t[18]+=65536),(o>11>16&&(3&t[2])===e){t[2]+=2048;try{i.call(o)}finally{}}}else try{i.call(o)}finally{}} + */const Ae={lFrame:Ke(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Oe(){return Ae.bindingsEnabled}function Re(){return Ae.lFrame.lView}function Ie(){return Ae.lFrame.tView}function Pe(t){Ae.lFrame.contextLView=t}function De(){let t=Me();for(;null!==t&&64===t.type;)t=t.parent;return t}function Me(){return Ae.lFrame.currentTNode}function Ne(t,e){const n=Ae.lFrame;n.currentTNode=t,n.isParent=e}function je(){return Ae.lFrame.isParent}function Ve(){Ae.lFrame.isParent=!1}function Fe(){return Ae.isInCheckNoChangesMode}function Ue(t){Ae.isInCheckNoChangesMode=t}function Le(){const t=Ae.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function He(){return Ae.lFrame.bindingIndex++}function $e(t){const e=Ae.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function ze(t,e){const n=Ae.lFrame;n.bindingIndex=n.bindingRootIndex=t,Be(e)}function Be(t){Ae.lFrame.currentDirectiveIndex=t}function We(){return Ae.lFrame.currentQueryIndex}function qe(t){Ae.lFrame.currentQueryIndex=t}function Ge(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function Ze(t,e,n){if(n&bt.SkipSelf){let r=e,s=t;for(;r=r.parent,!(null!==r||n&bt.Host||(r=Ge(s),null===r)||(s=s[15],10&r.type)););if(null===r)return!1;e=r,t=s}const r=Ae.lFrame=Qe();return r.currentTNode=e,r.lView=t,!0}function Ye(t){const e=Qe(),n=t[1];Ae.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function Qe(){const t=Ae.lFrame,e=null===t?null:t.child;return null===e?Ke(t):e}function Ke(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Je(){const t=Ae.lFrame;return Ae.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Xe=Je;function tn(){const t=Je();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function en(){return Ae.lFrame.selectedIndex}function nn(t){Ae.lFrame.selectedIndex=t}function rn(){const t=Ae.lFrame;return be(t.tView,t.selectedIndex)}function sn(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n=r)break}else e[a]<0&&(t[18]+=65536),(o>11>16&&(3&t[2])===e){t[2]+=2048;try{i.call(o)}finally{}}}else try{i.call(o)}finally{}} /** * @license * Copyright Google LLC All Rights Reserved. @@ -189,7 +189,7 @@ function me(t){for(;Array.isArray(t);)t=t[0];return t}function ye(t,e){return me * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */let wn=!0;function Cn(t){const e=wn;return wn=t,e}let Sn=0;function xn(t,e){const n=kn(t,e);if(-1!==n)return n;const r=e[1];r.firstCreatePass&&(t.injectorIndex=e.length,En(r.data,t),En(e,null),En(r.blueprint,null));const s=Tn(t,e),i=t.injectorIndex;if(_n(s)){const t=bn(s),n=vn(s,e),r=n[1].data;for(let s=0;s<8;s++)e[i+s]=n[t+s]|r[t+s]}return e[i+8]=s,i}function En(t,e){t.push(0,0,0,0,0,0,0,0,e)}function kn(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function Tn(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,r=null,s=e;for(;null!==s;){const t=s[1],e=t.type;if(r=2===e?t.declTNode:1===e?s[6]:null,null===r)return hn;if(n++,s=s[15],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return hn}function An(t,e,n){!function(t,e,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(Lt)&&(r=n[Lt]),null==r&&(r=n[Lt]=Sn++);const s=255&r;e.data[t+(s>>5)]|=1<=0?255&e:Dn:e}(n);if("function"==typeof i){if(!Ze(e,t,r))return r&bt.Host?On(s,n,r):Rn(e,n,r,s);try{const t=i();if(null!=t||r&bt.Optional)return t;ct(n)}finally{Xe()}}else if("number"==typeof i){let s=null,o=kn(t,e),a=hn,l=r&bt.Host?e[16][6]:null;for((-1===o||r&bt.SkipSelf)&&(a=-1===o?Tn(t,e):e[o+8],a!==hn&&Fn(r,!1)?(s=e[1],o=bn(a),e=vn(a,e)):o=-1);-1!==o;){const t=e[1];if(Vn(i,o,t.data)){const t=Nn(o,e,n,s,r,l);if(t!==Pn)return t}a=e[o+8],a!==hn&&Fn(r,e[1].data[o+8]===l)&&Vn(i,o,e)?(s=t,o=bn(a),e=vn(a,e)):o=-1}}}return Rn(e,n,r,s)}const Pn={};function Dn(){return new Un(De(),Re())}function Nn(t,e,n,r,s,i){const o=e[1],a=o.data[t+8],l=Mn(a,o,n,null==r?re(a)&&wn:r!=o&&0!=(3&a.type),s&bt.Host&&i===a);return null!==l?jn(e,o,l,a):Pn}function Mn(t,e,n,r,s){const i=t.providerIndexes,o=e.data,a=1048575&i,l=t.directiveStart,c=i>>20,u=s?a+c:t.directiveEnd;for(let h=r?a:a+c;h=l&&t.type===n)return h}if(s){const t=o[l];if(t&&ie(t)&&t.type===n)return l}return null}function jn(t,e,n,r){let s=t[n];const i=e.data;if(s instanceof dn){const o=s;o.resolving&&function(t,e){throw new ot("200",`Circular dependency in DI detected for ${t}`)}(lt(i[n]));const a=Cn(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?wt(o.injectImpl):null;Ze(t,r,bt.Default);try{s=t[n]=o.factory(void 0,i,t,r),e.firstCreatePass&&n>=r.directiveStart&& + */let wn=!0;function Cn(t){const e=wn;return wn=t,e}let Sn=0;function xn(t,e){const n=kn(t,e);if(-1!==n)return n;const r=e[1];r.firstCreatePass&&(t.injectorIndex=e.length,En(r.data,t),En(e,null),En(r.blueprint,null));const s=Tn(t,e),i=t.injectorIndex;if(_n(s)){const t=bn(s),n=vn(s,e),r=n[1].data;for(let s=0;s<8;s++)e[i+s]=n[t+s]|r[t+s]}return e[i+8]=s,i}function En(t,e){t.push(0,0,0,0,0,0,0,0,e)}function kn(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function Tn(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,r=null,s=e;for(;null!==s;){const t=s[1],e=t.type;if(r=2===e?t.declTNode:1===e?s[6]:null,null===r)return hn;if(n++,s=s[15],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return hn}function An(t,e,n){!function(t,e,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(Lt)&&(r=n[Lt]),null==r&&(r=n[Lt]=Sn++);const s=255&r;e.data[t+(s>>5)]|=1<=0?255&e:Dn:e}(n);if("function"==typeof i){if(!Ze(e,t,r))return r&bt.Host?On(s,n,r):Rn(e,n,r,s);try{const t=i();if(null!=t||r&bt.Optional)return t;ct(n)}finally{Xe()}}else if("number"==typeof i){let s=null,o=kn(t,e),a=hn,l=r&bt.Host?e[16][6]:null;for((-1===o||r&bt.SkipSelf)&&(a=-1===o?Tn(t,e):e[o+8],a!==hn&&Fn(r,!1)?(s=e[1],o=bn(a),e=vn(a,e)):o=-1);-1!==o;){const t=e[1];if(Vn(i,o,t.data)){const t=Mn(o,e,n,s,r,l);if(t!==Pn)return t}a=e[o+8],a!==hn&&Fn(r,e[1].data[o+8]===l)&&Vn(i,o,e)?(s=t,o=bn(a),e=vn(a,e)):o=-1}}}return Rn(e,n,r,s)}const Pn={};function Dn(){return new Un(De(),Re())}function Mn(t,e,n,r,s,i){const o=e[1],a=o.data[t+8],l=Nn(a,o,n,null==r?re(a)&&wn:r!=o&&0!=(3&a.type),s&bt.Host&&i===a);return null!==l?jn(e,o,l,a):Pn}function Nn(t,e,n,r,s){const i=t.providerIndexes,o=e.data,a=1048575&i,l=t.directiveStart,c=i>>20,u=s?a+c:t.directiveEnd;for(let h=r?a:a+c;h=l&&t.type===n)return h}if(s){const t=o[l];if(t&&ie(t)&&t.type===n)return l}return null}function jn(t,e,n,r){let s=t[n];const i=e.data;if(s instanceof dn){const o=s;o.resolving&&function(t,e){throw new ot("200",`Circular dependency in DI detected for ${t}`)}(lt(i[n]));const a=Cn(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?wt(o.injectImpl):null;Ze(t,r,bt.Default);try{s=t[n]=o.factory(void 0,i,t,r),e.firstCreatePass&&n>=r.directiveStart&& /** * @license * Copyright Google LLC All Rights Reserved. @@ -317,7 +317,7 @@ function xr(t){const e=t[3];return ee(e)?e[3]:e}function Er(t){return Tr(t[13])} * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */function Ar(t,e,n,r,s){if(null!=r){let i,o=!1;ee(r)?i=r:te(r)&&(o=!0,r=r[0]);const a=me(r);0===t&&null!==n?null==s?jr(e,n,a):Mr(e,n,a,s||null,!0):1===t&&null!==n?Mr(e,n,a,s||null,!0):2===t?function(t,e,n){const r=Fr(t,e);r&&function(t,e,n,r){fe(t)?t.removeChild(e,n,r):e.removeChild(n)}(t,r,e,n)}(e,a,o):3===t&&e.destroyNode(a),null!=i&&function(t,e,n,r,s){const i=n[7];i!==me(n)&&Ar(e,t,r,i,s);for(let o=Xt;o0&&(t[n-1][4]=r[4]);const o=Qn(t,Xt+e);qr(r[1],s=r,s[11],2,null,null),s[0]=null,s[6]=null;const a=o[19];null!==a&&a.detachView(o[1]),r[3]=null,r[4]=null,r[2]&=-129}var s;return r}function Pr(t,e){if(!(256&e[2])){const n=e[11];fe(n)&&n.destroyNode&&qr(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return Dr(t[1],t);for(;e;){let n=null;if(te(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)te(e)&&Dr(e[1],e),e=e[3];null===e&&(e=t),te(e)&&Dr(e[1],e),n=e&&e[4]}e=n}}(e)}}function Dr(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let r=0;r=0?r[s=l]():r[s=-l].unsubscribe(),i+=2}else{const t=r[s=n[i+1]];n[i].call(t)}if(null!==r){for(let t=s+1;t0&&(t[n-1][4]=r[4]);const o=Qn(t,Xt+e);qr(r[1],s=r,s[11],2,null,null),s[0]=null,s[6]=null;const a=o[19];null!==a&&a.detachView(o[1]),r[3]=null,r[4]=null,r[2]&=-129}var s;return r}function Pr(t,e){if(!(256&e[2])){const n=e[11];fe(n)&&n.destroyNode&&qr(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return Dr(t[1],t);for(;e;){let n=null;if(te(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)te(e)&&Dr(e[1],e),e=e[3];null===e&&(e=t),te(e)&&Dr(e[1],e),n=e&&e[4]}e=n}}(e)}}function Dr(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let r=0;r=0?r[s=l]():r[s=-l].unsubscribe(),i+=2}else{const t=r[s=n[i+1]];n[i].call(t)}if(null!==r){for(let t=s+1;t>17&32767}function ps(t){return 2|t}function fs(t){return(131068&t)>>2}function gs(t,e){return-131069&t|e<<2}function ms(t){return 1|t}function ys(t,e){const n=t.contentQueries;if(null!==n)for(let r=0;rJt&&us(t,e,Jt,Fe()),n(r,s)}finally{nn(i)}}function Es(t,e,n){Oe()&&(function(t,e,n,r){const s=n.directiveStart,i=n.directiveEnd;t.firstCreatePass||xn(n,e),br(r,e);const o=n.initialInputs;for(let a=s;a0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(n)!=i&&n.push(i),n.push(r,s,o)}}function Ds(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function Ns(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function Ms(t,e,n){if(n){if(e.exportAs)for(let r=0;r0&&zs(n)}}function zs(t){for(let n=Er(t);null!==n;n=kr(n))for(let t=Xt;t0&&zs(e)}const e=t[1].components;if(null!==e)for(let n=0;n0&&zs(r)}}function Bs(t,e){const n=we(e,t),r=n[1];!function(t,e){for(let n=e.length;nPromise.resolve(null))();function Ks(t){return t[7]||(t[7]=[])}function Js(t){return t.cleanup||(t.cleanup=[])}function Xs(t,e){const n=t[9],r=n?n.get(_r,null):null;r&&r.handleError(e)}function ti(t,e,n,r,s){for(let i=0;i>17&32767}function ps(t){return 2|t}function fs(t){return(131068&t)>>2}function gs(t,e){return-131069&t|e<<2}function ms(t){return 1|t}function ys(t,e){const n=t.contentQueries;if(null!==n)for(let r=0;rJt&&us(t,e,Jt,Fe()),n(r,s)}finally{nn(i)}}function Es(t,e,n){Oe()&&(function(t,e,n,r){const s=n.directiveStart,i=n.directiveEnd;t.firstCreatePass||xn(n,e),br(r,e);const o=n.initialInputs;for(let a=s;a0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(n)!=i&&n.push(i),n.push(r,s,o)}}function Ds(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function Ms(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function Ns(t,e,n){if(n){if(e.exportAs)for(let r=0;r0&&zs(n)}}function zs(t){for(let n=Er(t);null!==n;n=kr(n))for(let t=Xt;t0&&zs(e)}const e=t[1].components;if(null!==e)for(let n=0;n0&&zs(r)}}function Bs(t,e){const n=we(e,t),r=n[1];!function(t,e){for(let n=e.length;nPromise.resolve(null))();function Ks(t){return t[7]||(t[7]=[])}function Js(t){return t.cleanup||(t.cleanup=[])}function Xs(t,e){const n=t[9],r=n?n.get(_r,null):null;r&&r.handleError(e)}function ti(t,e,n,r,s){for(let i=0;i=0} + */function Yi(t,e){let n=null;const r=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let s=0;s=0} /** * @license * Copyright Google LLC All Rights Reserved. @@ -563,7 +563,7 @@ function Vi(t,e,n){const r=Re();return Ii(r,He(),e)&&function(t,e,n,r,s,i,o,a){c * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */function mo(t,e=""){const n=Re(),r=Ie(),s=t+Jt,i=r.firstCreatePass?bs(r,s,1,e,null):r.data[s],o=n[s]=function(t,e){return fe(t)?t.createText(e):t.createTextNode(e)}(n[11],e);Hr(r,n,o,i),Me(i,!1)} + */function mo(t,e=""){const n=Re(),r=Ie(),s=t+Jt,i=r.firstCreatePass?bs(r,s,1,e,null):r.data[s],o=n[s]=function(t,e){return fe(t)?t.createText(e):t.createTextNode(e)}(n[11],e);Hr(r,n,o,i),Ne(i,!1)} /** * @license * Copyright Google LLC All Rights Reserved. @@ -600,7 +600,7 @@ const bo=void 0;var vo=["en",[["a","p"],["AM","PM"],bo],[["AM","PM"],bo,bo],[["S * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -let ko=Eo;function To(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,r){throw new Error(`ASSERTION ERROR: ${t} [Expected=> null != ${e} <=Actual]`)}(n,e),"string"==typeof t&&(ko=t.toLowerCase().replace(/_/g,"-"))}function Ao(t,e,n,r,s){if(t=st(t),Array.isArray(t))for(let i=0;i>20;if(mi(t)||!t.multi){const r=new dn(l,s,ji),p=Io(a,e,s?u:u+d,h);-1===p?(An(xn(c,o),i,a),Oo(i,t,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=1048576),n.push(r),o.push(r)):(n[p]=r,o[p]=r)}else{const p=Io(a,e,u+d,h),f=Io(a,e,u,u+d),g=p>=0&&n[p],m=f>=0&&n[f];if(s&&!m||!s&&!g){An(xn(c,o),i,a);const u=function(t,e,n,r,s){const i=new dn(t,n,ji);return i.multi=[],i.index=e,i.componentProviders=0,Ro(i,s,r&&!n),i}(s?Do:Po,n.length,s,r,l);!s&&m&&(n[f].providerFactory=u),Oo(i,t,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=1048576),n.push(u),o.push(u)}else Oo(i,t,p>-1?p:f,Ro(n[s?f:p],l,!s&&r));!s&&r&&m&&n[f].componentProviders++}}}function Oo(t,e,n,r){const s=mi(e);if(s||e.useClass){const i=(e.useClass||e).prototype.ngOnDestroy;if(i){const o=t.destroyHooks||(t.destroyHooks=[]);if(!s&&e.multi){const t=o.indexOf(n);-1===t?o.push(n,[r,i]):o[t+1].push(r,i)}else o.push(n,i)}}}function Ro(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function Io(t,e,n,r){for(let s=n;s{n.providersResolver=(n,r)=> +let ko=Eo;function To(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,r){throw new Error(`ASSERTION ERROR: ${t} [Expected=> null != ${e} <=Actual]`)}(n,e),"string"==typeof t&&(ko=t.toLowerCase().replace(/_/g,"-"))}function Ao(t,e,n,r,s){if(t=st(t),Array.isArray(t))for(let i=0;i>20;if(mi(t)||!t.multi){const r=new dn(l,s,ji),p=Io(a,e,s?u:u+d,h);-1===p?(An(xn(c,o),i,a),Oo(i,t,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=1048576),n.push(r),o.push(r)):(n[p]=r,o[p]=r)}else{const p=Io(a,e,u+d,h),f=Io(a,e,u,u+d),g=p>=0&&n[p],m=f>=0&&n[f];if(s&&!m||!s&&!g){An(xn(c,o),i,a);const u=function(t,e,n,r,s){const i=new dn(t,n,ji);return i.multi=[],i.index=e,i.componentProviders=0,Ro(i,s,r&&!n),i}(s?Do:Po,n.length,s,r,l);!s&&m&&(n[f].providerFactory=u),Oo(i,t,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=1048576),n.push(u),o.push(u)}else Oo(i,t,p>-1?p:f,Ro(n[s?f:p],l,!s&&r));!s&&r&&m&&n[f].componentProviders++}}}function Oo(t,e,n,r){const s=mi(e);if(s||e.useClass){const i=(e.useClass||e).prototype.ngOnDestroy;if(i){const o=t.destroyHooks||(t.destroyHooks=[]);if(!s&&e.multi){const t=o.indexOf(n);-1===t?o.push(n,[r,i]):o[t+1].push(r,i)}else o.push(n,i)}}}function Ro(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function Io(t,e,n,r){for(let s=n;s{n.providersResolver=(n,r)=> /** * @license * Copyright Google LLC All Rights Reserved. @@ -728,7 +728,7 @@ function Uo(...t){} * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */const Ea=function(){return Ia(De(),Re())};let ka=(()=>{class t{}return t.__NG_ELEMENT_ID__=Ea,t})();const Ta=ka,Aa=class extends Ta{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Lo(this._hostTNode,this._hostLView)}get injector(){return new Un(this._hostTNode,this._hostLView)}get parentInjector(){const t=Tn(this._hostTNode,this._hostLView);if(_n(t)){const e=vn(t,this._hostLView),n=bn(t);return new Un(e[1].data[n+8],e)}return new Un(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=Oa(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Xt}createEmbeddedView(t,e,n){const r=t.createEmbeddedView(e||{});return this.insert(r,n),r}createComponent(t,e,n,r,s){const i=n||this.parentInjector;if(!s&&null==t.ngModule&&i){const t=i.get(Sa,null);t&&(s=t)}const o=t.create(i,r,void 0,s);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,r=n[1];if(ee(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],r=new Aa(e,e[6],e[3]);r.detach(r.indexOf(t))}}const s=this._adjustIndex(e),i=this._lContainer;!function(t,e,n,r){const s=Xt+r,i=n.length;r>0&&(n[s-1][4]=e),r{class t{}return t.__NG_ELEMENT_ID__=Ea,t})();const Ta=ka,Aa=class extends Ta{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Lo(this._hostTNode,this._hostLView)}get injector(){return new Un(this._hostTNode,this._hostLView)}get parentInjector(){const t=Tn(this._hostTNode,this._hostLView);if(_n(t)){const e=vn(t,this._hostLView),n=bn(t);return new Un(e[1].data[n+8],e)}return new Un(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=Oa(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Xt}createEmbeddedView(t,e,n){const r=t.createEmbeddedView(e||{});return this.insert(r,n),r}createComponent(t,e,n,r,s){const i=n||this.parentInjector;if(!s&&null==t.ngModule&&i){const t=i.get(Sa,null);t&&(s=t)}const o=t.create(i,r,void 0,s);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,r=n[1];if(ee(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],r=new Aa(e,e[6],e[3]);r.detach(r.indexOf(t))}}const s=this._adjustIndex(e),i=this._lContainer;!function(t,e,n,r){const s=Xt+r,i=n.length;r>0&&(n[s-1][4]=e),rvr});class ja extends jo{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(as).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return Na(this.componentDef.inputs)}get outputs(){return Na(this.componentDef.outputs)}create(t,e,n,r){const s=(r=r||this.ngModule)?function(t,e){return{get:(n,r,s)=>{const i=t.get(n,Pa,s);return i!==Pa||r===Pa?i:e.get(n,r,s)}}}(t,r.injector):t,i=s.get(Bo,ge),o=s.get(Go,null),a=i.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=n?function(t,e,n){if(fe(t))return t.selectRootElement(e,n===Et.ShadowDom);let r="string"==typeof e?t.querySelector(e):e;return r.textContent="",r}(a,n,this.componentDef.encapsulation):Or(i.createRenderer(null,this.componentDef),l,function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),u=this.componentDef.onPush?576:528,h={components:[],scheduler:vr,clean:Qs,playerHandler:null,flags:0},d=As(0,null,null,1,0,null,null,null,null,null),p=_s(null,d,h,u,null,null,i,a,o,s);let f,g;Ye(p);try{const t=function(t,e,n,r,s,i){const o=n[1];n[20]=t;const a=bs(o,20,2,"#host",null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(ei(a,l,!0),null!==t&&(pn(s,t,l),null!==a.classes&&Yr(s,t,a.classes),null!==a.styles&&Zr(s,t,a.styles)));const c=r.createRenderer(t,e),u=_s(n,Ts(e),null,e.onPush?64:16,n[20],a,r,c,null,null);return o.firstCreatePass&&(An(xn(a,n),o,e.type),Ns(o,a),js(a,n.length,1)),Ws(n,u),n[20]=u}(c,this.componentDef,p,i,a);if(c)if(n)pn(a,c,["ng-version",Yo.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let r=1,s=2;for(;r0&&Yr(a,c,e.join(" "))}if(g=be(d,Jt),void 0!==e){const t=g.projection=[];for(let n=0;nt(o,e)),e.contentQueries){const t=De();e.contentQueries(1,o,t.directiveStart)}const a=De();return!i.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(nn(a.index),Ps(n[1],a,0,a.directiveStart,a.directiveEnd,e),Ds(e,o)),o}(t,this.componentDef,p,h,[bi]),ws(d,p,null)}finally{tn()}return new Va(this.componentType,f,Lo(g,p),p,g)}}class Va extends class{}{constructor(t,e,n,r,s){super(),this.location=n,this._rootLView=r,this._tNode=s,this.instance=e,this.hostView=this.changeDetectorRef=new da(r),this.componentType=t}get injector(){return new Un(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}} +class Da extends Fo{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Qt(t);return new ja(e,this.ngModule)}}function Ma(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}const Na=new Bn("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>vr});class ja extends jo{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(as).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return Ma(this.componentDef.inputs)}get outputs(){return Ma(this.componentDef.outputs)}create(t,e,n,r){const s=(r=r||this.ngModule)?function(t,e){return{get:(n,r,s)=>{const i=t.get(n,Pa,s);return i!==Pa||r===Pa?i:e.get(n,r,s)}}}(t,r.injector):t,i=s.get(Bo,ge),o=s.get(Go,null),a=i.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=n?function(t,e,n){if(fe(t))return t.selectRootElement(e,n===Et.ShadowDom);let r="string"==typeof e?t.querySelector(e):e;return r.textContent="",r}(a,n,this.componentDef.encapsulation):Or(i.createRenderer(null,this.componentDef),l,function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),u=this.componentDef.onPush?576:528,h={components:[],scheduler:vr,clean:Qs,playerHandler:null,flags:0},d=As(0,null,null,1,0,null,null,null,null,null),p=_s(null,d,h,u,null,null,i,a,o,s);let f,g;Ye(p);try{const t=function(t,e,n,r,s,i){const o=n[1];n[20]=t;const a=bs(o,20,2,"#host",null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(ei(a,l,!0),null!==t&&(pn(s,t,l),null!==a.classes&&Yr(s,t,a.classes),null!==a.styles&&Zr(s,t,a.styles)));const c=r.createRenderer(t,e),u=_s(n,Ts(e),null,e.onPush?64:16,n[20],a,r,c,null,null);return o.firstCreatePass&&(An(xn(a,n),o,e.type),Ms(o,a),js(a,n.length,1)),Ws(n,u),n[20]=u}(c,this.componentDef,p,i,a);if(c)if(n)pn(a,c,["ng-version",Yo.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let r=1,s=2;for(;r0&&Yr(a,c,e.join(" "))}if(g=be(d,Jt),void 0!==e){const t=g.projection=[];for(let n=0;nt(o,e)),e.contentQueries){const t=De();e.contentQueries(1,o,t.directiveStart)}const a=De();return!i.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(nn(a.index),Ps(n[1],a,0,a.directiveStart,a.directiveEnd,e),Ds(e,o)),o}(t,this.componentDef,p,h,[bi]),ws(d,p,null)}finally{tn()}return new Va(this.componentType,f,Lo(g,p),p,g)}}class Va extends class{}{constructor(t,e,n,r,s){super(),this.location=n,this._rootLView=r,this._tNode=s,this.instance=e,this.hostView=this.changeDetectorRef=new da(r),this.componentType=t}get injector(){return new Un(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}} /** * @license * Copyright Google LLC All Rights Reserved. @@ -802,7 +802,7 @@ function $a(t,e){const n=Ie();let r;const s=t+Jt;n.firstCreatePass?(r=function(t * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */class Za{constructor(t){this.queryList=t,this.matches=null}clone(){return new Za(this.queryList)}setDirty(){this.queryList.setDirty()}}class Ya{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,r=[];for(let t=0;t0)r.push(o[t/2]);else{const s=i[t+1],o=e[-n];for(let t=Xt;t0)r.push(o[t/2]);else{const s=i[t+1],o=e[-n];for(let t=Xt;t{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Rt,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,Pl(t),Il(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),Pl(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,s,i,o,a)=>{try{return Dl(t),n.invokeTask(s,i,o,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===i.type||t.shouldCoalesceRunChangeDetection)&&e(),Nl(t)}},onInvoke:(n,r,s,i,o,a,l)=>{try{return Dl(t),n.invoke(s,i,o,a,l)}finally{t.shouldCoalesceRunChangeDetection&&e(),Nl(t)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(t._hasPendingMicrotasks=s.microTask,Pl(t),Il(t)):"macroTask"==s.change&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,n,r,s)=>(e.handleError(r,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Ol.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Ol.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,r){const s=this._inner,i=s.scheduleEventTask("NgZoneEvent: "+r,t,Rl,Uo,Uo);try{return s.runTask(i,e,n)}finally{s.cancelTask(i)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}const Rl={};function Il(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Pl(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function Dl(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Nl(t){t._nesting--,Il(t)}class Ml{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Wa,this.onMicrotaskEmpty=new Wa,this.onStable=new Wa,this.onError=new Wa}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,r){return t.apply(e,n)}}let jl=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Ol.assertNotInAngularZone(),Al(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Al(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let r=-1;e&&e>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==r),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})}whenStable(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(lr(Ol))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Vl=(()=>{class t{constructor(){this._applications=new Map,Ll.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return Ll.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Fl{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}let Ul,Ll=new Fl,Hl=!0,$l=!1; +class Ol{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Wa(!1),this.onMicrotaskEmpty=new Wa(!1),this.onStable=new Wa(!1),this.onError=new Wa(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function(){let t=Rt.requestAnimationFrame,e=Rt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Rt,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,Pl(t),Il(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),Pl(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,s,i,o,a)=>{try{return Dl(t),n.invokeTask(s,i,o,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===i.type||t.shouldCoalesceRunChangeDetection)&&e(),Ml(t)}},onInvoke:(n,r,s,i,o,a,l)=>{try{return Dl(t),n.invoke(s,i,o,a,l)}finally{t.shouldCoalesceRunChangeDetection&&e(),Ml(t)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(t._hasPendingMicrotasks=s.microTask,Pl(t),Il(t)):"macroTask"==s.change&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,n,r,s)=>(e.handleError(r,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Ol.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Ol.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,r){const s=this._inner,i=s.scheduleEventTask("NgZoneEvent: "+r,t,Rl,Uo,Uo);try{return s.runTask(i,e,n)}finally{s.cancelTask(i)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}const Rl={};function Il(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Pl(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function Dl(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Ml(t){t._nesting--,Il(t)}class Nl{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Wa,this.onMicrotaskEmpty=new Wa,this.onStable=new Wa,this.onError=new Wa}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,r){return t.apply(e,n)}}let jl=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Ol.assertNotInAngularZone(),Al(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Al(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let r=-1;e&&e>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==r),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})}whenStable(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(lr(Ol))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Vl=(()=>{class t{constructor(){this._applications=new Map,Ll.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return Ll.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Fl{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}let Ul,Ll=new Fl,Hl=!0,$l=!1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */const zl=new Bn("AllowMultipleToken");class Bl{constructor(t,e){this.name=t,this.token=e}}function Wl(t,e,n=[]){const r=`Platform: ${e}`,s=new Bn(r);return(e=[])=>{let i=ql();if(!i||i.injector.get(zl,!1))if(t)t(n.concat(e).concat({provide:s,useValue:!0}));else{const t=n.concat(e).concat({provide:s,useValue:!0},{provide:si,useValue:"platform"});!function(t){if(Ul&&!Ul.destroyed&&!Ul.injector.get(zl,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Ul=t.get(Gl);const e=t.get(pl,null);e&&e.forEach(t=>t())}(_i.create({providers:t,name:r}))}return function(t){const e=ql();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(s)}}function ql(){return Ul&&!Ul.destroyed?Ul:null}let Gl=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new Ml:("zone.js"===t?void 0:t)||new Ol({enableLongStackTrace:($l=!0,Hl),shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),n}(e?e.ngZone:void 0,{ngZoneEventCoalescing:e&&e.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:e&&e.ngZoneRunCoalescing||!1}),r=[{provide:Ol,useValue:n}];return n.run(()=>{const e=_i.create({providers:r,parent:this.injector,name:t.moduleType.name}),s=t.create(e),i=s.injector.get(_r,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.runOutsideAngular(()=>{const t=n.onError.subscribe({next:t=>{i.handleError(t)}});s.onDestroy(()=>{Ql(this._modules,s),t.unsubscribe()})}),function(t,e,n){try{const r=n();return zi(r)?r.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}(i,n,()=>{const t=s.injector.get(cl);return t.runInitializers(),t.donePromise.then(()=>(To(s.injector.get(yl,Eo)||Eo),this._moduleDoBootstrap(s),s))})})}bootstrapModule(t,e=[]){const n=Zl({},e);return function(t,e,n){const r=new La(n);return Promise.resolve(r)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(Yl);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${tt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(lr(_i))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function Zl(t,e){return Array.isArray(e)?e.reduce(Zl,t):Object.assign(Object.assign({},t),e)}let Yl=(()=>{class t{constructor(t,e,n,r,s){this._zone=t,this._injector=e,this._exceptionHandler=n,this._componentFactoryResolver=r,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const i=new _(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),o=new _(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{Ol.assertNotInAngularZone(),Al(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{Ol.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=function(...t){let e=Number.POSITIVE_INFINITY,n=null,r=t[t.length-1];return E(r)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof r&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof _?t[0]:z(e)(B(t,n))}(i,o.pipe(t=>{return W()((e=K,function(t){let n;n="function"==typeof e?e:function(){return e};const r=Object.create(t,Y);return r.source=t,r.subjectFactory=n,r})(t));var e}))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=t instanceof jo?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const r=n.isBoundToModule?void 0:this._injector.get(Sa),s=n.create(_i.NULL,[],e||n.selector,r),i=s.location.nativeElement,o=s.injector.get(jl,null),a=o&&s.injector.get(Vl);return o&&a&&a.registerApplication(i,o),s.onDestroy(()=>{this.detachView(s.hostView),Ql(this.components,s),a&&a.unregisterApplication(i)}),this._loadComponent(s),s}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;Ql(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(gl,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(lr(Ol),lr(_i),lr(_r),lr(Fo),lr(cl))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function Ql(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)} + */const zl=new Bn("AllowMultipleToken");class Bl{constructor(t,e){this.name=t,this.token=e}}function Wl(t,e,n=[]){const r=`Platform: ${e}`,s=new Bn(r);return(e=[])=>{let i=ql();if(!i||i.injector.get(zl,!1))if(t)t(n.concat(e).concat({provide:s,useValue:!0}));else{const t=n.concat(e).concat({provide:s,useValue:!0},{provide:si,useValue:"platform"});!function(t){if(Ul&&!Ul.destroyed&&!Ul.injector.get(zl,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Ul=t.get(Gl);const e=t.get(pl,null);e&&e.forEach(t=>t())}(_i.create({providers:t,name:r}))}return function(t){const e=ql();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(s)}}function ql(){return Ul&&!Ul.destroyed?Ul:null}let Gl=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new Nl:("zone.js"===t?void 0:t)||new Ol({enableLongStackTrace:($l=!0,Hl),shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),n}(e?e.ngZone:void 0,{ngZoneEventCoalescing:e&&e.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:e&&e.ngZoneRunCoalescing||!1}),r=[{provide:Ol,useValue:n}];return n.run(()=>{const e=_i.create({providers:r,parent:this.injector,name:t.moduleType.name}),s=t.create(e),i=s.injector.get(_r,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.runOutsideAngular(()=>{const t=n.onError.subscribe({next:t=>{i.handleError(t)}});s.onDestroy(()=>{Ql(this._modules,s),t.unsubscribe()})}),function(t,e,n){try{const r=n();return zi(r)?r.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}(i,n,()=>{const t=s.injector.get(cl);return t.runInitializers(),t.donePromise.then(()=>(To(s.injector.get(yl,Eo)||Eo),this._moduleDoBootstrap(s),s))})})}bootstrapModule(t,e=[]){const n=Zl({},e);return function(t,e,n){const r=new La(n);return Promise.resolve(r)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(Yl);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${tt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(lr(_i))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function Zl(t,e){return Array.isArray(e)?e.reduce(Zl,t):Object.assign(Object.assign({},t),e)}let Yl=(()=>{class t{constructor(t,e,n,r,s){this._zone=t,this._injector=e,this._exceptionHandler=n,this._componentFactoryResolver=r,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const i=new _(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),o=new _(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{Ol.assertNotInAngularZone(),Al(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{Ol.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=function(...t){let e=Number.POSITIVE_INFINITY,n=null,r=t[t.length-1];return E(r)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof r&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof _?t[0]:z(e)(B(t,n))}(i,o.pipe(t=>{return W()((e=K,function(t){let n;n="function"==typeof e?e:function(){return e};const r=Object.create(t,Y);return r.source=t,r.subjectFactory=n,r})(t));var e}))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=t instanceof jo?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const r=n.isBoundToModule?void 0:this._injector.get(Sa),s=n.create(_i.NULL,[],e||n.selector,r),i=s.location.nativeElement,o=s.injector.get(jl,null),a=o&&s.injector.get(Vl);return o&&a&&a.registerApplication(i,o),s.onDestroy(()=>{this.detachView(s.hostView),Ql(this.components,s),a&&a.unregisterApplication(i)}),this._loadComponent(s),s}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;Ql(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(gl,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(lr(Ol),lr(_i),lr(_r),lr(Fo),lr(cl))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function Ql(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)} /** * @license * Copyright Google LLC All Rights Reserved. @@ -884,7 +884,7 @@ class Kl{}class Jl{}const Xl={factoryPathPrefix:"",factoryPathSuffix:".ngfactory * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */const nc=Wl(null,"core",[{provide:fl,useValue:"unknown"},{provide:Gl,deps:[_i]},{provide:Vl,deps:[]},{provide:ml,deps:[]}]),rc=[{provide:Yl,useClass:Yl,deps:[Ol,_i,_r,Fo,cl]},{provide:Ma,deps:[Ol],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:cl,useClass:cl,deps:[[new dr,ll]]},{provide:kl,useClass:kl,deps:[]},hl,{provide:aa,useFactory: + */const nc=Wl(null,"core",[{provide:fl,useValue:"unknown"},{provide:Gl,deps:[_i]},{provide:Vl,deps:[]},{provide:ml,deps:[]}]),rc=[{provide:Yl,useClass:Yl,deps:[Ol,_i,_r,Fo,cl]},{provide:Na,deps:[Ol],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:cl,useClass:cl,deps:[[new dr,ll]]},{provide:kl,useClass:kl,deps:[]},hl,{provide:aa,useFactory: /** * @license * Copyright Google LLC All Rights Reserved. @@ -936,7 +936,7 @@ const ac=new Bn("DocumentToken");let lc=(()=>{class t{}return t.\u0275fac=functi * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -var Ec=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),kc=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}({}),Tc=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}({}),Ac=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}({}),Oc=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}({});function Rc(t,e){return Mc(Co(t)[xo.DateFormat],e)}function Ic(t,e){return Mc(Co(t)[xo.TimeFormat],e)}function Pc(t,e){return Mc(Co(t)[xo.DateTimeFormat],e)}function Dc(t,e){const n=Co(t),r=n[xo.NumberSymbols][e];if(void 0===r){if(e===Oc.CurrencyDecimal)return n[xo.NumberSymbols][Oc.Decimal];if(e===Oc.CurrencyGroup)return n[xo.NumberSymbols][Oc.Group]}return r}function Nc(t){if(!t[xo.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[xo.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Mc(t,e){for(let n=e;n>-1;n--)if(void 0!==t[n])return t[n];throw new Error("Locale data API: locale data undefined")}function jc(t){const[e,n]=t.split(":");return{hours:+e,minutes:+n}} +var Ec=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),kc=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}({}),Tc=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}({}),Ac=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}({}),Oc=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}({});function Rc(t,e){return Nc(Co(t)[xo.DateFormat],e)}function Ic(t,e){return Nc(Co(t)[xo.TimeFormat],e)}function Pc(t,e){return Nc(Co(t)[xo.DateTimeFormat],e)}function Dc(t,e){const n=Co(t),r=n[xo.NumberSymbols][e];if(void 0===r){if(e===Oc.CurrencyDecimal)return n[xo.NumberSymbols][Oc.Decimal];if(e===Oc.CurrencyGroup)return n[xo.NumberSymbols][Oc.Group]}return r}function Mc(t){if(!t[xo.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[xo.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Nc(t,e){for(let n=e;n>-1;n--)if(void 0!==t[n])return t[n];throw new Error("Locale data API: locale data undefined")}function jc(t){const[e,n]=t.split(":");return{hours:+e,minutes:+n}} /** * @license * Copyright Google LLC All Rights Reserved. @@ -944,7 +944,7 @@ var Ec=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -const Vc=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Fc={},Uc=/((?:[^GyYMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var Lc=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}({}),Hc=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}({}),$c=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}({});function zc(t,e,n,r){let s=function(t){if(nu(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[e,n=1,r=1]=t.split("-").map(t=>+t);return Bc(e,n-1,r)}const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let n;if(n=t.match(Vc))return function(t){const e=new Date(0);let n=0,r=0;const s=t[8]?e.setUTCFullYear:e.setFullYear,i=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),r=Number(t[9]+t[11])),s.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const o=Number(t[4]||0)-n,a=Number(t[5]||0)-r,l=Number(t[6]||0),c=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return i.call(e,o,a,l,c),e}(n)}const e=new Date(t);if(!nu(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=Wc(n,e)||e;let i,o=[];for(;e;){if(i=Uc.exec(e),!i){o.push(e);break}{o=o.concat(i.slice(1));const t=o.pop();if(!t)break;e=t}}let a=s.getTimezoneOffset();r&&(a=eu(r,a),s=function(t,e,n){const r=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(eu(e,r)-r))}(s,r));let l="";return o.forEach(t=>{const e=function(t){if(tu[t])return tu[t];let e;switch(t){case"G":case"GG":case"GGG":e=Yc($c.Eras,Tc.Abbreviated);break;case"GGGG":e=Yc($c.Eras,Tc.Wide);break;case"GGGGG":e=Yc($c.Eras,Tc.Narrow);break;case"y":e=Zc(Hc.FullYear,1,0,!1,!0);break;case"yy":e=Zc(Hc.FullYear,2,0,!0,!0);break;case"yyy":e=Zc(Hc.FullYear,3,0,!1,!0);break;case"yyyy":e=Zc(Hc.FullYear,4,0,!1,!0);break;case"Y":e=Xc(1);break;case"YY":e=Xc(2,!0);break;case"YYY":e=Xc(3);break;case"YYYY":e=Xc(4);break;case"M":case"L":e=Zc(Hc.Month,1,1);break;case"MM":case"LL":e=Zc(Hc.Month,2,1);break;case"MMM":e=Yc($c.Months,Tc.Abbreviated);break;case"MMMM":e=Yc($c.Months,Tc.Wide);break;case"MMMMM":e=Yc($c.Months,Tc.Narrow);break;case"LLL":e=Yc($c.Months,Tc.Abbreviated,kc.Standalone);break;case"LLLL":e=Yc($c.Months,Tc.Wide,kc.Standalone);break;case"LLLLL":e=Yc($c.Months,Tc.Narrow,kc.Standalone);break;case"w":e=Jc(1);break;case"ww":e=Jc(2);break;case"W":e=Jc(1,!0);break;case"d":e=Zc(Hc.Date,1);break;case"dd":e=Zc(Hc.Date,2);break;case"E":case"EE":case"EEE":e=Yc($c.Days,Tc.Abbreviated);break;case"EEEE":e=Yc($c.Days,Tc.Wide);break;case"EEEEE":e=Yc($c.Days,Tc.Narrow);break;case"EEEEEE":e=Yc($c.Days,Tc.Short);break;case"a":case"aa":case"aaa":e=Yc($c.DayPeriods,Tc.Abbreviated);break;case"aaaa":e=Yc($c.DayPeriods,Tc.Wide);break;case"aaaaa":e=Yc($c.DayPeriods,Tc.Narrow);break;case"b":case"bb":case"bbb":e=Yc($c.DayPeriods,Tc.Abbreviated,kc.Standalone,!0);break;case"bbbb":e=Yc($c.DayPeriods,Tc.Wide,kc.Standalone,!0);break;case"bbbbb":e=Yc($c.DayPeriods,Tc.Narrow,kc.Standalone,!0);break;case"B":case"BB":case"BBB":e=Yc($c.DayPeriods,Tc.Abbreviated,kc.Format,!0);break;case"BBBB":e=Yc($c.DayPeriods,Tc.Wide,kc.Format,!0);break;case"BBBBB":e=Yc($c.DayPeriods,Tc.Narrow,kc.Format,!0);break;case"h":e=Zc(Hc.Hours,1,-12);break;case"hh":e=Zc(Hc.Hours,2,-12);break;case"H":e=Zc(Hc.Hours,1);break;case"HH":e=Zc(Hc.Hours,2);break;case"m":e=Zc(Hc.Minutes,1);break;case"mm":e=Zc(Hc.Minutes,2);break;case"s":e=Zc(Hc.Seconds,1);break;case"ss":e=Zc(Hc.Seconds,2);break;case"S":e=Zc(Hc.FractionalSeconds,1);break;case"SS":e=Zc(Hc.FractionalSeconds,2);break;case"SSS":e=Zc(Hc.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=Qc(Lc.Short);break;case"ZZZZZ":e=Qc(Lc.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Qc(Lc.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=Qc(Lc.Long);break;default:return null}return tu[t]=e,e}(t);l+=e?e(s,n,a):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function Bc(t,e,n){const r=new Date(0);return r.setFullYear(t,e,n),r.setHours(0,0,0),r}function Wc(t,e){const n=function(t){return Co(t)[xo.LocaleId]}(t);if(Fc[n]=Fc[n]||{},Fc[n][e])return Fc[n][e];let r="";switch(e){case"shortDate":r=Rc(t,Ac.Short);break;case"mediumDate":r=Rc(t,Ac.Medium);break;case"longDate":r=Rc(t,Ac.Long);break;case"fullDate":r=Rc(t,Ac.Full);break;case"shortTime":r=Ic(t,Ac.Short);break;case"mediumTime":r=Ic(t,Ac.Medium);break;case"longTime":r=Ic(t,Ac.Long);break;case"fullTime":r=Ic(t,Ac.Full);break;case"short":const e=Wc(t,"shortTime"),n=Wc(t,"shortDate");r=qc(Pc(t,Ac.Short),[e,n]);break;case"medium":const s=Wc(t,"mediumTime"),i=Wc(t,"mediumDate");r=qc(Pc(t,Ac.Medium),[s,i]);break;case"long":const o=Wc(t,"longTime"),a=Wc(t,"longDate");r=qc(Pc(t,Ac.Long),[o,a]);break;case"full":const l=Wc(t,"fullTime"),c=Wc(t,"fullDate");r=qc(Pc(t,Ac.Full),[l,c])}return r&&(Fc[n][e]=r),r}function qc(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(t,n){return null!=e&&n in e?e[n]:t})),t}function Gc(t,e,n="-",r,s){let i="";(t<0||s&&t<=0)&&(s?t=1-t:(t=-t,i=n));let o=String(t);for(;o.length0||a>-n)&&(a+=n),t===Hc.Hours)0===a&&-12===n&&(a=12);else if(t===Hc.FractionalSeconds)return l=e,Gc(a,3).substr(0,l);var l;const c=Dc(o,Oc.MinusSign);return Gc(a,e,c,r,s)}}function Yc(t,e,n=kc.Format,r=!1){return function(s,i){return function(t,e,n,r,s,i){switch(n){case $c.Months:return function(t,e,n){const r=Co(t),s=Mc([r[xo.MonthsFormat],r[xo.MonthsStandalone]],e);return Mc(s,n)}(e,s,r)[t.getMonth()];case $c.Days:return function(t,e,n){const r=Co(t),s=Mc([r[xo.DaysFormat],r[xo.DaysStandalone]],e);return Mc(s,n)}(e,s,r)[t.getDay()];case $c.DayPeriods:const o=t.getHours(),a=t.getMinutes();if(i){const t=function(t){const e=Co(t);return Nc(e),(e[xo.ExtraData][2]||[]).map(t=>"string"==typeof t?jc(t):[jc(t[0]),jc(t[1])])}(e),n=function(t,e,n){const r=Co(t);Nc(r);const s=Mc([r[xo.ExtraData][0],r[xo.ExtraData][1]],e)||[];return Mc(s,n)||[]}(e,s,r),i=t.findIndex(t=>{if(Array.isArray(t)){const[e,n]=t,r=o>=e.hours&&a>=e.minutes,s=o0?Math.floor(s/60):Math.ceil(s/60);switch(t){case Lc.Short:return(s>=0?"+":"")+Gc(o,2,i)+Gc(Math.abs(s%60),2,i);case Lc.ShortGMT:return"GMT"+(s>=0?"+":"")+Gc(o,1,i);case Lc.Long:return"GMT"+(s>=0?"+":"")+Gc(o,2,i)+":"+Gc(Math.abs(s%60),2,i);case Lc.Extended:return 0===r?"Z":(s>=0?"+":"")+Gc(o,2,i)+":"+Gc(Math.abs(s%60),2,i);default:throw new Error(`Unknown zone width "${t}"`)}}}function Kc(t){return Bc(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function Jc(t,e=!1){return function(n,r){let s;if(e){const t=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,e=n.getDate();s=1+Math.floor((e+t)/7)}else{const t=Kc(n),e=function(t){const e=Bc(t,0,1).getDay();return Bc(t,0,1+(e<=4?4:11)-e)}(t.getFullYear()),r=t.getTime()-e.getTime();s=1+Math.round(r/6048e5)}return Gc(s,t,Dc(r,Oc.MinusSign))}}function Xc(t,e=!1){return function(n,r){return Gc(Kc(n).getFullYear(),t,Dc(r,Oc.MinusSign),e)}}const tu={};function eu(t,e){t=t.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function nu(t){return t instanceof Date&&!isNaN(t.valueOf())} +const Vc=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Fc={},Uc=/((?:[^GyYMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var Lc=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}({}),Hc=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}({}),$c=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}({});function zc(t,e,n,r){let s=function(t){if(nu(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[e,n=1,r=1]=t.split("-").map(t=>+t);return Bc(e,n-1,r)}const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let n;if(n=t.match(Vc))return function(t){const e=new Date(0);let n=0,r=0;const s=t[8]?e.setUTCFullYear:e.setFullYear,i=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),r=Number(t[9]+t[11])),s.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const o=Number(t[4]||0)-n,a=Number(t[5]||0)-r,l=Number(t[6]||0),c=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return i.call(e,o,a,l,c),e}(n)}const e=new Date(t);if(!nu(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=Wc(n,e)||e;let i,o=[];for(;e;){if(i=Uc.exec(e),!i){o.push(e);break}{o=o.concat(i.slice(1));const t=o.pop();if(!t)break;e=t}}let a=s.getTimezoneOffset();r&&(a=eu(r,a),s=function(t,e,n){const r=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(eu(e,r)-r))}(s,r));let l="";return o.forEach(t=>{const e=function(t){if(tu[t])return tu[t];let e;switch(t){case"G":case"GG":case"GGG":e=Yc($c.Eras,Tc.Abbreviated);break;case"GGGG":e=Yc($c.Eras,Tc.Wide);break;case"GGGGG":e=Yc($c.Eras,Tc.Narrow);break;case"y":e=Zc(Hc.FullYear,1,0,!1,!0);break;case"yy":e=Zc(Hc.FullYear,2,0,!0,!0);break;case"yyy":e=Zc(Hc.FullYear,3,0,!1,!0);break;case"yyyy":e=Zc(Hc.FullYear,4,0,!1,!0);break;case"Y":e=Xc(1);break;case"YY":e=Xc(2,!0);break;case"YYY":e=Xc(3);break;case"YYYY":e=Xc(4);break;case"M":case"L":e=Zc(Hc.Month,1,1);break;case"MM":case"LL":e=Zc(Hc.Month,2,1);break;case"MMM":e=Yc($c.Months,Tc.Abbreviated);break;case"MMMM":e=Yc($c.Months,Tc.Wide);break;case"MMMMM":e=Yc($c.Months,Tc.Narrow);break;case"LLL":e=Yc($c.Months,Tc.Abbreviated,kc.Standalone);break;case"LLLL":e=Yc($c.Months,Tc.Wide,kc.Standalone);break;case"LLLLL":e=Yc($c.Months,Tc.Narrow,kc.Standalone);break;case"w":e=Jc(1);break;case"ww":e=Jc(2);break;case"W":e=Jc(1,!0);break;case"d":e=Zc(Hc.Date,1);break;case"dd":e=Zc(Hc.Date,2);break;case"E":case"EE":case"EEE":e=Yc($c.Days,Tc.Abbreviated);break;case"EEEE":e=Yc($c.Days,Tc.Wide);break;case"EEEEE":e=Yc($c.Days,Tc.Narrow);break;case"EEEEEE":e=Yc($c.Days,Tc.Short);break;case"a":case"aa":case"aaa":e=Yc($c.DayPeriods,Tc.Abbreviated);break;case"aaaa":e=Yc($c.DayPeriods,Tc.Wide);break;case"aaaaa":e=Yc($c.DayPeriods,Tc.Narrow);break;case"b":case"bb":case"bbb":e=Yc($c.DayPeriods,Tc.Abbreviated,kc.Standalone,!0);break;case"bbbb":e=Yc($c.DayPeriods,Tc.Wide,kc.Standalone,!0);break;case"bbbbb":e=Yc($c.DayPeriods,Tc.Narrow,kc.Standalone,!0);break;case"B":case"BB":case"BBB":e=Yc($c.DayPeriods,Tc.Abbreviated,kc.Format,!0);break;case"BBBB":e=Yc($c.DayPeriods,Tc.Wide,kc.Format,!0);break;case"BBBBB":e=Yc($c.DayPeriods,Tc.Narrow,kc.Format,!0);break;case"h":e=Zc(Hc.Hours,1,-12);break;case"hh":e=Zc(Hc.Hours,2,-12);break;case"H":e=Zc(Hc.Hours,1);break;case"HH":e=Zc(Hc.Hours,2);break;case"m":e=Zc(Hc.Minutes,1);break;case"mm":e=Zc(Hc.Minutes,2);break;case"s":e=Zc(Hc.Seconds,1);break;case"ss":e=Zc(Hc.Seconds,2);break;case"S":e=Zc(Hc.FractionalSeconds,1);break;case"SS":e=Zc(Hc.FractionalSeconds,2);break;case"SSS":e=Zc(Hc.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=Qc(Lc.Short);break;case"ZZZZZ":e=Qc(Lc.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Qc(Lc.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=Qc(Lc.Long);break;default:return null}return tu[t]=e,e}(t);l+=e?e(s,n,a):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function Bc(t,e,n){const r=new Date(0);return r.setFullYear(t,e,n),r.setHours(0,0,0),r}function Wc(t,e){const n=function(t){return Co(t)[xo.LocaleId]}(t);if(Fc[n]=Fc[n]||{},Fc[n][e])return Fc[n][e];let r="";switch(e){case"shortDate":r=Rc(t,Ac.Short);break;case"mediumDate":r=Rc(t,Ac.Medium);break;case"longDate":r=Rc(t,Ac.Long);break;case"fullDate":r=Rc(t,Ac.Full);break;case"shortTime":r=Ic(t,Ac.Short);break;case"mediumTime":r=Ic(t,Ac.Medium);break;case"longTime":r=Ic(t,Ac.Long);break;case"fullTime":r=Ic(t,Ac.Full);break;case"short":const e=Wc(t,"shortTime"),n=Wc(t,"shortDate");r=qc(Pc(t,Ac.Short),[e,n]);break;case"medium":const s=Wc(t,"mediumTime"),i=Wc(t,"mediumDate");r=qc(Pc(t,Ac.Medium),[s,i]);break;case"long":const o=Wc(t,"longTime"),a=Wc(t,"longDate");r=qc(Pc(t,Ac.Long),[o,a]);break;case"full":const l=Wc(t,"fullTime"),c=Wc(t,"fullDate");r=qc(Pc(t,Ac.Full),[l,c])}return r&&(Fc[n][e]=r),r}function qc(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(t,n){return null!=e&&n in e?e[n]:t})),t}function Gc(t,e,n="-",r,s){let i="";(t<0||s&&t<=0)&&(s?t=1-t:(t=-t,i=n));let o=String(t);for(;o.length0||a>-n)&&(a+=n),t===Hc.Hours)0===a&&-12===n&&(a=12);else if(t===Hc.FractionalSeconds)return l=e,Gc(a,3).substr(0,l);var l;const c=Dc(o,Oc.MinusSign);return Gc(a,e,c,r,s)}}function Yc(t,e,n=kc.Format,r=!1){return function(s,i){return function(t,e,n,r,s,i){switch(n){case $c.Months:return function(t,e,n){const r=Co(t),s=Nc([r[xo.MonthsFormat],r[xo.MonthsStandalone]],e);return Nc(s,n)}(e,s,r)[t.getMonth()];case $c.Days:return function(t,e,n){const r=Co(t),s=Nc([r[xo.DaysFormat],r[xo.DaysStandalone]],e);return Nc(s,n)}(e,s,r)[t.getDay()];case $c.DayPeriods:const o=t.getHours(),a=t.getMinutes();if(i){const t=function(t){const e=Co(t);return Mc(e),(e[xo.ExtraData][2]||[]).map(t=>"string"==typeof t?jc(t):[jc(t[0]),jc(t[1])])}(e),n=function(t,e,n){const r=Co(t);Mc(r);const s=Nc([r[xo.ExtraData][0],r[xo.ExtraData][1]],e)||[];return Nc(s,n)||[]}(e,s,r),i=t.findIndex(t=>{if(Array.isArray(t)){const[e,n]=t,r=o>=e.hours&&a>=e.minutes,s=o0?Math.floor(s/60):Math.ceil(s/60);switch(t){case Lc.Short:return(s>=0?"+":"")+Gc(o,2,i)+Gc(Math.abs(s%60),2,i);case Lc.ShortGMT:return"GMT"+(s>=0?"+":"")+Gc(o,1,i);case Lc.Long:return"GMT"+(s>=0?"+":"")+Gc(o,2,i)+":"+Gc(Math.abs(s%60),2,i);case Lc.Extended:return 0===r?"Z":(s>=0?"+":"")+Gc(o,2,i)+":"+Gc(Math.abs(s%60),2,i);default:throw new Error(`Unknown zone width "${t}"`)}}}function Kc(t){return Bc(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function Jc(t,e=!1){return function(n,r){let s;if(e){const t=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,e=n.getDate();s=1+Math.floor((e+t)/7)}else{const t=Kc(n),e=function(t){const e=Bc(t,0,1).getDay();return Bc(t,0,1+(e<=4?4:11)-e)}(t.getFullYear()),r=t.getTime()-e.getTime();s=1+Math.round(r/6048e5)}return Gc(s,t,Dc(r,Oc.MinusSign))}}function Xc(t,e=!1){return function(n,r){return Gc(Kc(n).getFullYear(),t,Dc(r,Oc.MinusSign),e)}}const tu={};function eu(t,e){t=t.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function nu(t){return t instanceof Date&&!isNaN(t.valueOf())} /** * @license * Copyright Google LLC All Rights Reserved. @@ -1075,7 +1075,7 @@ class Su{static init(){var t;t=new Su,Ll=t}addToWindow(t){Rt.getAngularTestabili * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -const Ou={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ru=/%COMP%/g;function Iu(t,e,n){for(let r=0;r{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let Du=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new Nu(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case Et.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new Mu(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case 1:case Et.ShadowDom:return new ju(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=Iu(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(lr(Eu),lr(Au),lr(ul))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Nu{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(Ou[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;const s=Ou[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=Ou[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,r){r&(Cr.DashCase|Cr.Important)?t.style.setProperty(e,n,r&Cr.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Cr.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Pu(n)):this.eventManager.addEventListener(t,e,Pu(n))}}class Mu extends Nu{constructor(t,e,n,r){super(t),this.component=n;const s=Iu(r+"-"+n.id,n.styles,[]);e.addStyles(s),this.contentAttr="_ngcontent-%COMP%".replace(Ru,r+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(Ru,r+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class ju extends Nu{constructor(t,e,n,r){super(t),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=Iu(r.id,r.styles,[]);for(let i=0;i{class t extends ku{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(lr(ac))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(); +const Ou={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ru=/%COMP%/g;function Iu(t,e,n){for(let r=0;r{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let Du=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new Mu(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case Et.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new Nu(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case 1:case Et.ShadowDom:return new ju(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=Iu(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(lr(Eu),lr(Au),lr(ul))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Mu{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(Ou[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;const s=Ou[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=Ou[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,r){r&(Cr.DashCase|Cr.Important)?t.style.setProperty(e,n,r&Cr.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Cr.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Pu(n)):this.eventManager.addEventListener(t,e,Pu(n))}}class Nu extends Mu{constructor(t,e,n,r){super(t),this.component=n;const s=Iu(r+"-"+n.id,n.styles,[]);e.addStyles(s),this.contentAttr="_ngcontent-%COMP%".replace(Ru,r+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(Ru,r+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class ju extends Mu{constructor(t,e,n,r){super(t),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=Iu(r.id,r.styles,[]);for(let i=0;i{class t extends ku{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(lr(ac))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. @@ -1112,7 +1112,7 @@ function(){_u.makeCurrent(),Su.init()},multi:!0},{provide:ac,useFactory:function * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -function qu(...t){let e=t[t.length-1];return E(e)?(t.pop(),M(t,e)):B(t)}"undefined"!=typeof window&&window;class Gu extends S{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new v;return this._value}next(t){super.next(this._value=t)}}class Zu extends f{notifyNext(t,e,n,r,s){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class Yu extends f{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function Qu(t,e,n,r,s=new Yu(t,n,r)){if(!s.closed)return e instanceof _?e.subscribe(s):N(e)(s)}const Ku={};class Ju{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new Xu(t,this.resultSelector))}}class Xu extends Zu{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(Ku),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();function eh(...t){return z(1)(qu(...t))}const nh=new _(t=>t.complete());function rh(t){return t?function(t){return new _(e=>t.schedule(()=>e.complete()))}(t):nh}function sh(t){return new _(e=>{let n;try{n=t()}catch(r){return void e.error(r)}return(n?j(n):rh()).subscribe(e)})}function ih(t,e){return"function"==typeof e?n=>n.pipe(ih((n,r)=>j(t(n,r)).pipe(k((t,s)=>e(n,t,r,s))))):e=>e.lift(new oh(t))}class oh{constructor(t){this.project=t}call(t,e){return e.subscribe(new ah(t,this.project))}}class ah extends F{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const n=new V(this),r=this.destination;r.add(n),this.innerSubscription=U(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}const lh=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function ch(t){return e=>0===t?rh():e.lift(new uh(t))}class uh{constructor(t){if(this.total=t,this.total<0)throw new lh}call(t,e){return e.subscribe(new hh(t,this.total))}}class hh extends f{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}function dh(t,e){let n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new ph(t,e,n))}}class ph{constructor(t,e,n=!1){this.accumulator=t,this.seed=e,this.hasSeed=n}call(t,e){return e.subscribe(new fh(t,this.accumulator,this.seed,this.hasSeed))}}class fh extends f{constructor(t,e,n,r){super(t),this.accumulator=e,this._seed=n,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let n;try{n=this.accumulator(this.seed,t,e)}catch(r){this.destination.error(r)}this.seed=n,this.destination.next(n)}}function gh(t,e){return function(n){return n.lift(new mh(t,e))}}class mh{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new yh(t,this.predicate,this.thisArg))}}class yh extends f{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}function _h(t){return function(e){const n=new bh(t),r=e.lift(n);return n.caught=r}}class bh{constructor(t){this.selector=t}call(t,e){return e.subscribe(new vh(t,this.selector,this.caught))}}class vh extends F{constructor(t,e,n){super(t),this.selector=e,this.caught=n}error(t){if(!this.isStopped){let n;try{n=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const r=new V(this);this.add(r);const s=U(n,r);s!==r&&this.add(s)}}}function wh(t,e){return L(t,e,1)}function Ch(t){return function(e){return 0===t?rh():e.lift(new Sh(t))}}class Sh{constructor(t){if(this.total=t,this.total<0)throw new lh}call(t,e){return e.subscribe(new xh(t,this.total))}}class xh extends f{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,n=this.total,r=this.count++;e.length0){const n=this.count>=this.total?this.total:this.count,r=this.ring;for(let s=0;se.lift(new kh(t))}class kh{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new Th(t,this.errorFactory))}}class Th extends f{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function Ah(){return new th}function Oh(t=null){return e=>e.lift(new Rh(t))}class Rh{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new Ih(t,this.defaultValue))}}class Ih extends f{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function Ph(t,e){const n=arguments.length>=2;return r=>r.pipe(t?gh((e,n)=>t(e,n,r)):y,ch(1),n?Oh(e):Eh(()=>new th))}function Dh(){}function Nh(t,e,n){return function(r){return r.lift(new Mh(t,e,n))}}class Mh{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new jh(t,this.nextOrObserver,this.error,this.complete))}}class jh extends f{constructor(t,e,n,s){super(t),this._tapNext=Dh,this._tapError=Dh,this._tapComplete=Dh,this._tapError=n||Dh,this._tapComplete=s||Dh,r(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Dh,this._tapError=e.error||Dh,this._tapComplete=e.complete||Dh)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}class Vh{constructor(t){this.callback=t}call(t,e){return e.subscribe(new Fh(t,this.callback))}}class Fh extends f{constructor(t,e){super(t),this.add(new h(e))}} +function qu(...t){let e=t[t.length-1];return E(e)?(t.pop(),N(t,e)):B(t)}"undefined"!=typeof window&&window;class Gu extends S{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new v;return this._value}next(t){super.next(this._value=t)}}class Zu extends f{notifyNext(t,e,n,r,s){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class Yu extends f{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function Qu(t,e,n,r,s=new Yu(t,n,r)){if(!s.closed)return e instanceof _?e.subscribe(s):M(e)(s)}const Ku={};class Ju{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new Xu(t,this.resultSelector))}}class Xu extends Zu{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(Ku),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();function eh(...t){return z(1)(qu(...t))}const nh=new _(t=>t.complete());function rh(t){return t?function(t){return new _(e=>t.schedule(()=>e.complete()))}(t):nh}function sh(t){return new _(e=>{let n;try{n=t()}catch(r){return void e.error(r)}return(n?j(n):rh()).subscribe(e)})}function ih(t,e){return"function"==typeof e?n=>n.pipe(ih((n,r)=>j(t(n,r)).pipe(k((t,s)=>e(n,t,r,s))))):e=>e.lift(new oh(t))}class oh{constructor(t){this.project=t}call(t,e){return e.subscribe(new ah(t,this.project))}}class ah extends F{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const n=new V(this),r=this.destination;r.add(n),this.innerSubscription=U(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}const lh=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function ch(t){return e=>0===t?rh():e.lift(new uh(t))}class uh{constructor(t){if(this.total=t,this.total<0)throw new lh}call(t,e){return e.subscribe(new hh(t,this.total))}}class hh extends f{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}function dh(t,e){let n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new ph(t,e,n))}}class ph{constructor(t,e,n=!1){this.accumulator=t,this.seed=e,this.hasSeed=n}call(t,e){return e.subscribe(new fh(t,this.accumulator,this.seed,this.hasSeed))}}class fh extends f{constructor(t,e,n,r){super(t),this.accumulator=e,this._seed=n,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let n;try{n=this.accumulator(this.seed,t,e)}catch(r){this.destination.error(r)}this.seed=n,this.destination.next(n)}}function gh(t,e){return function(n){return n.lift(new mh(t,e))}}class mh{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new yh(t,this.predicate,this.thisArg))}}class yh extends f{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}function _h(t){return function(e){const n=new bh(t),r=e.lift(n);return n.caught=r}}class bh{constructor(t){this.selector=t}call(t,e){return e.subscribe(new vh(t,this.selector,this.caught))}}class vh extends F{constructor(t,e,n){super(t),this.selector=e,this.caught=n}error(t){if(!this.isStopped){let n;try{n=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const r=new V(this);this.add(r);const s=U(n,r);s!==r&&this.add(s)}}}function wh(t,e){return L(t,e,1)}function Ch(t){return function(e){return 0===t?rh():e.lift(new Sh(t))}}class Sh{constructor(t){if(this.total=t,this.total<0)throw new lh}call(t,e){return e.subscribe(new xh(t,this.total))}}class xh extends f{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,n=this.total,r=this.count++;e.length0){const n=this.count>=this.total?this.total:this.count,r=this.ring;for(let s=0;se.lift(new kh(t))}class kh{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new Th(t,this.errorFactory))}}class Th extends f{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function Ah(){return new th}function Oh(t=null){return e=>e.lift(new Rh(t))}class Rh{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new Ih(t,this.defaultValue))}}class Ih extends f{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function Ph(t,e){const n=arguments.length>=2;return r=>r.pipe(t?gh((e,n)=>t(e,n,r)):y,ch(1),n?Oh(e):Eh(()=>new th))}function Dh(){}function Mh(t,e,n){return function(r){return r.lift(new Nh(t,e,n))}}class Nh{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new jh(t,this.nextOrObserver,this.error,this.complete))}}class jh extends f{constructor(t,e,n,s){super(t),this._tapNext=Dh,this._tapError=Dh,this._tapComplete=Dh,this._tapError=n||Dh,this._tapComplete=s||Dh,r(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Dh,this._tapError=e.error||Dh,this._tapComplete=e.complete||Dh)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}class Vh{constructor(t){this.callback=t}call(t,e){return e.subscribe(new Fh(t,this.callback))}}class Fh extends f{constructor(t,e){super(t),this.add(new h(e))}} /** * @license Angular v11.2.11 * (c) 2010-2021 Google LLC. https://angular.io/ @@ -1145,7 +1145,7 @@ function qu(...t){let e=t[t.length-1];return E(e)?(t.pop(),M(t,e)):B(t)}"undefin * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */function pd(t,e,n){return n?function(t,e){return ad(t,e)}(t.queryParams,e.queryParams)&&fd(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>ld(t[n],e[n]))}(t.queryParams,e.queryParams)&&gd(t.root,e.root)}function fd(t,e){if(!vd(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(const n in e.children){if(!t.children[n])return!1;if(!fd(t.children[n],e.children[n]))return!1}return!0}function gd(t,e){return md(t,e,e.segments)}function md(t,e,n){if(t.segments.length>n.length)return!!vd(t.segments.slice(0,n.length),n)&&!e.hasChildren();if(t.segments.length===n.length){if(!vd(t.segments,n))return!1;for(const n in e.children){if(!t.children[n])return!1;if(!gd(t.children[n],e.children[n]))return!1}return!0}{const r=n.slice(0,t.segments.length),s=n.slice(t.segments.length);return!!vd(t.segments,r)&&!!t.children.primary&&md(t.children.primary,e,s)}}class yd{constructor(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=sd(this.queryParams)),this._queryParamMap}toString(){return Sd.serialize(this)}}class _d{constructor(t,e){this.segments=t,this.children=e,this.parent=null,hd(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return xd(this)}}class bd{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=sd(this.parameters)),this._parameterMap}toString(){return Id(this)}}function vd(t,e){return t.length===e.length&&t.every((t,n)=>t.path===e[n].path)}class wd{}class Cd{parse(t){const e=new jd(t);return new yd(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){var e;return`/${Ed(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(t=>`${Td(e)}=${Td(t)}`).join("&"):`${Td(e)}=${Td(n)}`});return e.length?`?${e.join("&")}`:""}(t.queryParams)}${"string"==typeof t.fragment?`#${e=t.fragment,encodeURI(e)}`:""}`}}const Sd=new Cd;function xd(t){return t.segments.map(t=>Id(t)).join("/")}function Ed(t,e){if(!t.hasChildren())return xd(t);if(e){const e=t.children.primary?Ed(t.children.primary,!1):"",n=[];return hd(t.children,(t,e)=>{e!==nd&&n.push(`${e}:${Ed(t,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function(t,e){let n=[];return hd(t.children,(t,r)=>{r===nd&&(n=n.concat(e(t,r)))}),hd(t.children,(t,r)=>{r!==nd&&(n=n.concat(e(t,r)))}),n}(t,(e,n)=>n===nd?[Ed(t.children.primary,!1)]:[`${n}:${Ed(e,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children.primary?`${xd(t)}/${e[0]}`:`${xd(t)}/(${e.join("//")})`}}function kd(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Td(t){return kd(t).replace(/%3B/gi,";")}function Ad(t){return kd(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Od(t){return decodeURIComponent(t)}function Rd(t){return Od(t.replace(/\+/g,"%20"))}function Id(t){return`${Ad(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${Ad(t)}=${Ad(e[t])}`).join("")}`;var e}const Pd=/^[^\/()?;=#]+/;function Dd(t){const e=t.match(Pd);return e?e[0]:""}const Nd=/^[^=?&#]+/,Md=/^[^?&#]+/;class jd{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new _d([],{}):new _d([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new _d(t,e)),n}parseSegment(){const t=Dd(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new bd(Od(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Dd(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=Dd(this.remaining);t&&(n=t,this.capture(n))}t[Od(e)]=Od(n)}parseQueryParam(t){const e=function(t){const e=t.match(Nd);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(Md);return e?e[0]:""}(this.remaining);t&&(n=t,this.capture(n))}const r=Rd(e),s=Rd(n);if(t.hasOwnProperty(r)){let e=t[r];Array.isArray(e)||(e=[e],t[r]=e),e.push(s)}else t[r]=s}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=Dd(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error(`Cannot parse url '${this.url}'`);let s;n.indexOf(":")>-1?(s=n.substr(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=nd);const i=this.parseChildren();e[s]=1===Object.keys(i).length?i.primary:new _d([],i),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}} + */function pd(t,e,n){return n?function(t,e){return ad(t,e)}(t.queryParams,e.queryParams)&&fd(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>ld(t[n],e[n]))}(t.queryParams,e.queryParams)&&gd(t.root,e.root)}function fd(t,e){if(!vd(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(const n in e.children){if(!t.children[n])return!1;if(!fd(t.children[n],e.children[n]))return!1}return!0}function gd(t,e){return md(t,e,e.segments)}function md(t,e,n){if(t.segments.length>n.length)return!!vd(t.segments.slice(0,n.length),n)&&!e.hasChildren();if(t.segments.length===n.length){if(!vd(t.segments,n))return!1;for(const n in e.children){if(!t.children[n])return!1;if(!gd(t.children[n],e.children[n]))return!1}return!0}{const r=n.slice(0,t.segments.length),s=n.slice(t.segments.length);return!!vd(t.segments,r)&&!!t.children.primary&&md(t.children.primary,e,s)}}class yd{constructor(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=sd(this.queryParams)),this._queryParamMap}toString(){return Sd.serialize(this)}}class _d{constructor(t,e){this.segments=t,this.children=e,this.parent=null,hd(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return xd(this)}}class bd{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=sd(this.parameters)),this._parameterMap}toString(){return Id(this)}}function vd(t,e){return t.length===e.length&&t.every((t,n)=>t.path===e[n].path)}class wd{}class Cd{parse(t){const e=new jd(t);return new yd(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){var e;return`/${Ed(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(t=>`${Td(e)}=${Td(t)}`).join("&"):`${Td(e)}=${Td(n)}`});return e.length?`?${e.join("&")}`:""}(t.queryParams)}${"string"==typeof t.fragment?`#${e=t.fragment,encodeURI(e)}`:""}`}}const Sd=new Cd;function xd(t){return t.segments.map(t=>Id(t)).join("/")}function Ed(t,e){if(!t.hasChildren())return xd(t);if(e){const e=t.children.primary?Ed(t.children.primary,!1):"",n=[];return hd(t.children,(t,e)=>{e!==nd&&n.push(`${e}:${Ed(t,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function(t,e){let n=[];return hd(t.children,(t,r)=>{r===nd&&(n=n.concat(e(t,r)))}),hd(t.children,(t,r)=>{r!==nd&&(n=n.concat(e(t,r)))}),n}(t,(e,n)=>n===nd?[Ed(t.children.primary,!1)]:[`${n}:${Ed(e,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children.primary?`${xd(t)}/${e[0]}`:`${xd(t)}/(${e.join("//")})`}}function kd(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Td(t){return kd(t).replace(/%3B/gi,";")}function Ad(t){return kd(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Od(t){return decodeURIComponent(t)}function Rd(t){return Od(t.replace(/\+/g,"%20"))}function Id(t){return`${Ad(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${Ad(t)}=${Ad(e[t])}`).join("")}`;var e}const Pd=/^[^\/()?;=#]+/;function Dd(t){const e=t.match(Pd);return e?e[0]:""}const Md=/^[^=?&#]+/,Nd=/^[^?&#]+/;class jd{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new _d([],{}):new _d([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new _d(t,e)),n}parseSegment(){const t=Dd(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new bd(Od(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Dd(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=Dd(this.remaining);t&&(n=t,this.capture(n))}t[Od(e)]=Od(n)}parseQueryParam(t){const e=function(t){const e=t.match(Md);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(Nd);return e?e[0]:""}(this.remaining);t&&(n=t,this.capture(n))}const r=Rd(e),s=Rd(n);if(t.hasOwnProperty(r)){let e=t[r];Array.isArray(e)||(e=[e],t[r]=e),e.push(s)}else t[r]=s}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=Dd(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error(`Cannot parse url '${this.url}'`);let s;n.indexOf(":")>-1?(s=n.substr(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=nd);const i=this.parseChildren();e[s]=1===Object.keys(i).length?i.primary:new _d([],i),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}} /** * @license * Copyright Google LLC All Rights Reserved. @@ -1223,7 +1223,7 @@ const yp=Symbol("INITIAL_VALUE");function _p(){return ih(t=>function(...t){let e * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */class Pp{constructor(t){this.segmentGroup=t||null}}class Dp{constructor(t){this.urlTree=t}}function Np(t){return new _(e=>e.error(new Pp(t)))}function Mp(t){return new _(e=>e.error(new Dp(t)))}function jp(t){return new _(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class Vp{constructor(t,e,n,r,s){this.configLoader=e,this.urlSerializer=n,this.urlTree=r,this.config=s,this.allowRedirects=!0,this.ngModule=t.get(Sa)}apply(){const t=Ap(this.urlTree.root,[],[],this.config).segmentGroup,e=new _d(t.segments,t.children);return this.expandSegmentGroup(this.ngModule,this.config,e,nd).pipe(k(t=>this.createUrlTree(Fp(t),this.urlTree.queryParams,this.urlTree.fragment))).pipe(_h(t=>{if(t instanceof Dp)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof Pp)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,nd).pipe(k(e=>this.createUrlTree(Fp(e),t.queryParams,t.fragment))).pipe(_h(t=>{if(t instanceof Pp)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,n){const r=t.segments.length>0?new _d([],{[nd]:t}):t;return new yd(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(k(t=>new _d([],t))):this.expandSegment(t,n,e,n.segments,r,!0)}expandChildren(t,e,n){const r=[];for(const s of Object.keys(n.children))"primary"===s?r.unshift(s):r.push(s);return j(r).pipe(wh(r=>{const s=n.children[r],i=Ep(e,r);return this.expandSegmentGroup(t,i,s,r).pipe(k(t=>({segment:t,outlet:r})))}),dh((t,e)=>(t[e.outlet]=e.segment,t),{}),function(t,e){const n=arguments.length>=2;return r=>r.pipe(t?gh((e,n)=>t(e,n,r)):y,Ch(1),n?Oh(e):Eh(()=>new th))}())}expandSegment(t,e,n,r,s,i){return j(n).pipe(wh(o=>this.expandSegmentAgainstRoute(t,e,n,o,r,s,i).pipe(_h(t=>{if(t instanceof Pp)return qu(null);throw t}))),Ph(t=>!!t),_h((t,n)=>{if(t instanceof th||"EmptyError"===t.name){if(Ip(e,r,s))return qu(new _d([],{}));throw new Pp(e)}throw t}))}expandSegmentAgainstRoute(t,e,n,r,s,i,o){return Rp(r,e,s,i)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,s,i):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i):Np(e):Np(e)}expandSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,r,i):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,n,r){const s=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Mp(s):this.lineralizeSegments(n,s).pipe(L(n=>{const s=new _d(n,{});return this.expandSegment(t,s,e,n,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:c}=Tp(e,r,s);if(!o)return Np(e);const u=this.applyRedirectCommands(a,r.redirectTo,c);return r.redirectTo.startsWith("/")?Mp(u):this.lineralizeSegments(r,u).pipe(L(r=>this.expandSegment(t,e,n,r.concat(s.slice(l)),i,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){if("**"===n.path)return n.loadChildren?(n._loadedConfig?qu(n._loadedConfig):this.configLoader.load(t.injector,n)).pipe(k(t=>(n._loadedConfig=t,new _d(r,{})))):qu(new _d(r,{}));const{matched:i,consumedSegments:o,lastChild:a}=Tp(e,n,r);if(!i)return Np(e);const l=r.slice(a);return this.getChildConfig(t,n,r).pipe(L(t=>{const r=t.module,i=t.routes,{segmentGroup:a,slicedSegments:c}=Ap(e,o,l,i),u=new _d(a.segments,a.children);if(0===c.length&&u.hasChildren())return this.expandChildren(r,i,u).pipe(k(t=>new _d(o,t)));if(0===i.length&&0===c.length)return qu(new _d(o,{}));const h=xp(n)===s;return this.expandSegment(r,u,i,c,h?nd:s,!0).pipe(k(t=>new _d(o.concat(t.segments),t.children)))}))}getChildConfig(t,e,n){return e.children?qu(new fp(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?qu(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(L(n=>n?this.configLoader.load(t.injector,e).pipe(k(t=>(e._loadedConfig=t,t))):function(t){return new _(e=>e.error(id(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):qu(new fp([],t))}runCanLoadGuards(t,e,n){const r=e.canLoad;return r&&0!==r.length?qu(r.map(r=>{const s=t.get(r);let i;if(function(t){return t&&gp(t.canLoad)}(s))i=s.canLoad(e,n);else{if(!gp(s))throw new Error("Invalid CanLoad guard");i=s(e,n)}return dd(i)})).pipe(_p(),Nh(t=>{if(!mp(t))return;const e=id(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),k(t=>!0===t)):qu(!0)}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return qu(n);if(r.numberOfChildren>1||!r.children.primary)return jp(t.redirectTo);r=r.children.primary}}applyRedirectCommands(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}applyRedirectCreatreUrlTree(t,e,n,r){const s=this.createSegmentGroup(t,e.root,n,r);return new yd(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return hd(t,(t,r)=>{if("string"==typeof t&&t.startsWith(":")){const s=t.substring(1);n[r]=e[s]}else n[r]=t}),n}createSegmentGroup(t,e,n,r){const s=this.createSegments(t,e.segments,n,r);let i={};return hd(e.children,(e,s)=>{i[s]=this.createSegmentGroup(t,e,n,r)}),new _d(s,i)}createSegments(t,e,n,r){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,r):this.findOrReturn(e,n))}findPosParam(t,e,n){const r=n[e.path.substring(1)];if(!r)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return r}findOrReturn(t,e){let n=0;for(const r of e){if(r.path===t.path)return e.splice(n),r;n++}return t}}function Fp(t){const e={};for(const n of Object.keys(t.children)){const r=Fp(t.children[n]);(r.segments.length>0||r.hasChildren())&&(e[n]=r)}return function(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new _d(t.segments.concat(e.segments),e.children)}return t}(new _d(t.segments,e))} + */class Pp{constructor(t){this.segmentGroup=t||null}}class Dp{constructor(t){this.urlTree=t}}function Mp(t){return new _(e=>e.error(new Pp(t)))}function Np(t){return new _(e=>e.error(new Dp(t)))}function jp(t){return new _(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class Vp{constructor(t,e,n,r,s){this.configLoader=e,this.urlSerializer=n,this.urlTree=r,this.config=s,this.allowRedirects=!0,this.ngModule=t.get(Sa)}apply(){const t=Ap(this.urlTree.root,[],[],this.config).segmentGroup,e=new _d(t.segments,t.children);return this.expandSegmentGroup(this.ngModule,this.config,e,nd).pipe(k(t=>this.createUrlTree(Fp(t),this.urlTree.queryParams,this.urlTree.fragment))).pipe(_h(t=>{if(t instanceof Dp)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof Pp)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,nd).pipe(k(e=>this.createUrlTree(Fp(e),t.queryParams,t.fragment))).pipe(_h(t=>{if(t instanceof Pp)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,n){const r=t.segments.length>0?new _d([],{[nd]:t}):t;return new yd(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(k(t=>new _d([],t))):this.expandSegment(t,n,e,n.segments,r,!0)}expandChildren(t,e,n){const r=[];for(const s of Object.keys(n.children))"primary"===s?r.unshift(s):r.push(s);return j(r).pipe(wh(r=>{const s=n.children[r],i=Ep(e,r);return this.expandSegmentGroup(t,i,s,r).pipe(k(t=>({segment:t,outlet:r})))}),dh((t,e)=>(t[e.outlet]=e.segment,t),{}),function(t,e){const n=arguments.length>=2;return r=>r.pipe(t?gh((e,n)=>t(e,n,r)):y,Ch(1),n?Oh(e):Eh(()=>new th))}())}expandSegment(t,e,n,r,s,i){return j(n).pipe(wh(o=>this.expandSegmentAgainstRoute(t,e,n,o,r,s,i).pipe(_h(t=>{if(t instanceof Pp)return qu(null);throw t}))),Ph(t=>!!t),_h((t,n)=>{if(t instanceof th||"EmptyError"===t.name){if(Ip(e,r,s))return qu(new _d([],{}));throw new Pp(e)}throw t}))}expandSegmentAgainstRoute(t,e,n,r,s,i,o){return Rp(r,e,s,i)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,s,i):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i):Mp(e):Mp(e)}expandSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,r,i):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,n,r){const s=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Np(s):this.lineralizeSegments(n,s).pipe(L(n=>{const s=new _d(n,{});return this.expandSegment(t,s,e,n,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:c}=Tp(e,r,s);if(!o)return Mp(e);const u=this.applyRedirectCommands(a,r.redirectTo,c);return r.redirectTo.startsWith("/")?Np(u):this.lineralizeSegments(r,u).pipe(L(r=>this.expandSegment(t,e,n,r.concat(s.slice(l)),i,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){if("**"===n.path)return n.loadChildren?(n._loadedConfig?qu(n._loadedConfig):this.configLoader.load(t.injector,n)).pipe(k(t=>(n._loadedConfig=t,new _d(r,{})))):qu(new _d(r,{}));const{matched:i,consumedSegments:o,lastChild:a}=Tp(e,n,r);if(!i)return Mp(e);const l=r.slice(a);return this.getChildConfig(t,n,r).pipe(L(t=>{const r=t.module,i=t.routes,{segmentGroup:a,slicedSegments:c}=Ap(e,o,l,i),u=new _d(a.segments,a.children);if(0===c.length&&u.hasChildren())return this.expandChildren(r,i,u).pipe(k(t=>new _d(o,t)));if(0===i.length&&0===c.length)return qu(new _d(o,{}));const h=xp(n)===s;return this.expandSegment(r,u,i,c,h?nd:s,!0).pipe(k(t=>new _d(o.concat(t.segments),t.children)))}))}getChildConfig(t,e,n){return e.children?qu(new fp(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?qu(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(L(n=>n?this.configLoader.load(t.injector,e).pipe(k(t=>(e._loadedConfig=t,t))):function(t){return new _(e=>e.error(id(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):qu(new fp([],t))}runCanLoadGuards(t,e,n){const r=e.canLoad;return r&&0!==r.length?qu(r.map(r=>{const s=t.get(r);let i;if(function(t){return t&&gp(t.canLoad)}(s))i=s.canLoad(e,n);else{if(!gp(s))throw new Error("Invalid CanLoad guard");i=s(e,n)}return dd(i)})).pipe(_p(),Mh(t=>{if(!mp(t))return;const e=id(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),k(t=>!0===t)):qu(!0)}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return qu(n);if(r.numberOfChildren>1||!r.children.primary)return jp(t.redirectTo);r=r.children.primary}}applyRedirectCommands(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}applyRedirectCreatreUrlTree(t,e,n,r){const s=this.createSegmentGroup(t,e.root,n,r);return new yd(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return hd(t,(t,r)=>{if("string"==typeof t&&t.startsWith(":")){const s=t.substring(1);n[r]=e[s]}else n[r]=t}),n}createSegmentGroup(t,e,n,r){const s=this.createSegments(t,e.segments,n,r);let i={};return hd(e.children,(e,s)=>{i[s]=this.createSegmentGroup(t,e,n,r)}),new _d(s,i)}createSegments(t,e,n,r){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,r):this.findOrReturn(e,n))}findPosParam(t,e,n){const r=n[e.path.substring(1)];if(!r)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return r}findOrReturn(t,e){let n=0;for(const r of e){if(r.path===t.path)return e.splice(n),r;n++}return t}}function Fp(t){const e={};for(const n of Object.keys(t.children)){const r=Fp(t.children[n]);(r.segments.length>0||r.hasChildren())&&(e[n]=r)}return function(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new _d(t.segments.concat(e.segments),e.children)}return t}(new _d(t.segments,e))} /** * @license * Copyright Google LLC All Rights Reserved. @@ -1303,14 +1303,14 @@ function tf(t){return ih(e=>{const n=t(e);return n?j(n).pipe(k(()=>e)):qu(e)})} * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */function lf(t){throw t}function cf(t,e,n){return e.parse("/")}function uf(t,e){return qu(null)}let hf=(()=>{class t{constructor(t,e,n,r,s,i,o,a){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=r,this.config=a,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new S,this.errorHandler=lf,this.malformedUriErrorHandler=cf,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:uf,afterPreactivation:uf},this.urlHandlingStrategy=new af,this.routeReuseStrategy=new ef,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=s.get(Sa),this.console=s.get(ml);const l=s.get(Ol);this.isNgZoneEnabled=l instanceof Ol&&Ol.isInAngularZone(),this.resetConfig(a),this.currentUrlTree=new yd(new _d([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new rf(i,o,t=>this.triggerEvent(new Yh(t)),t=>this.triggerEvent(new Qh(t))),this.routerState=zd(this.currentUrlTree,this.rootComponentType),this.transitions=new Gu({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(t){const e=this.events;return t.pipe(gh(t=>0!==t.id),k(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),ih(t=>{let n=!1,r=!1;return qu(t).pipe(Nh(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),ih(t=>{const n=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return qu(t).pipe(ih(t=>{const n=this.transitions.getValue();return e.next(new Lh(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),n!==this.transitions.getValue()?nh:Promise.resolve(t)}),(r=this.ngModule.injector,s=this.configLoader,i=this.urlSerializer,o=this.config,ih(t=>function(t,e,n,r,s){return new Vp(t,e,n,r,s).apply()}(r,s,i,t.extractedUrl,o).pipe(k(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e}))))),Nh(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,n,r,s){return L(i=>function(t,e,n,r,s="emptyOnly",i="legacy"){try{const o=new Gp(t,e,n,r,s,i).recognize();return null===o?qp(new Wp):qu(o)}catch(o){return qp(o)}}(t,e,i.urlAfterRedirects,n(i.urlAfterRedirects),r,s).pipe(k(t=>Object.assign(Object.assign({},i),{targetSnapshot:t}))))} + */function lf(t){throw t}function cf(t,e,n){return e.parse("/")}function uf(t,e){return qu(null)}let hf=(()=>{class t{constructor(t,e,n,r,s,i,o,a){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=r,this.config=a,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new S,this.errorHandler=lf,this.malformedUriErrorHandler=cf,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:uf,afterPreactivation:uf},this.urlHandlingStrategy=new af,this.routeReuseStrategy=new ef,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=s.get(Sa),this.console=s.get(ml);const l=s.get(Ol);this.isNgZoneEnabled=l instanceof Ol&&Ol.isInAngularZone(),this.resetConfig(a),this.currentUrlTree=new yd(new _d([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new rf(i,o,t=>this.triggerEvent(new Yh(t)),t=>this.triggerEvent(new Qh(t))),this.routerState=zd(this.currentUrlTree,this.rootComponentType),this.transitions=new Gu({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(t){const e=this.events;return t.pipe(gh(t=>0!==t.id),k(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),ih(t=>{let n=!1,r=!1;return qu(t).pipe(Mh(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),ih(t=>{const n=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return qu(t).pipe(ih(t=>{const n=this.transitions.getValue();return e.next(new Lh(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),n!==this.transitions.getValue()?nh:Promise.resolve(t)}),(r=this.ngModule.injector,s=this.configLoader,i=this.urlSerializer,o=this.config,ih(t=>function(t,e,n,r,s){return new Vp(t,e,n,r,s).apply()}(r,s,i,t.extractedUrl,o).pipe(k(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e}))))),Mh(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,n,r,s){return L(i=>function(t,e,n,r,s="emptyOnly",i="legacy"){try{const o=new Gp(t,e,n,r,s,i).recognize();return null===o?qp(new Wp):qu(o)}catch(o){return qp(o)}}(t,e,i.urlAfterRedirects,n(i.urlAfterRedirects),r,s).pipe(k(t=>Object.assign(Object.assign({},i),{targetSnapshot:t}))))} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),Nh(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects);const n=new Bh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(n)}));var r,s,i,o;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:r,source:s,restoredState:i,extras:o}=t,a=new Lh(n,this.serializeUrl(r),s,i);e.next(a);const l=zd(r,this.rootComponentType).snapshot;return qu(Object.assign(Object.assign({},t),{targetSnapshot:l,urlAfterRedirects:r,extras:Object.assign(Object.assign({},o),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),nh}),tf(t=>{const{targetSnapshot:e,id:n,extractedUrl:r,rawUrl:s,extras:{skipLocationChange:i,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:n,appliedUrlTree:r,rawUrlTree:s,skipLocationChange:!!i,replaceUrl:!!o})}),Nh(t=>{const e=new Wh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),k(t=>Object.assign(Object.assign({},t),{guards:Hp(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return L(n=>{const{targetSnapshot:r,currentSnapshot:s,guards:{canActivateChecks:i,canDeactivateChecks:o}}=n;return 0===o.length&&0===i.length?qu(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,r){return j(t).pipe(L(t=>function(t,e,n,r,s){const i=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return i&&0!==i.length?qu(i.map(i=>{const o=$p(i,e,s);let a;if(function(t){return t&&gp(t.canDeactivate)}(o))a=dd(o.canDeactivate(t,e,n,r));else{if(!gp(o))throw new Error("Invalid CanDeactivate guard");a=dd(o(t,e,n,r))}return a.pipe(Ph())})).pipe(_p()):qu(!0)}(t.component,t.route,n,e,r)),Ph(t=>!0!==t,!0))}(o,r,s,t).pipe(L(n=>n&&"boolean"==typeof n?function(t,e,n,r){return j(e).pipe(wh(e=>eh(function(t,e){return null!==t&&e&&e(new Kh(t)),qu(!0)}(e.route.parent,r),function(t,e){return null!==t&&e&&e(new Xh(t)),qu(!0)}(e.route,r),function(t,e,n){const r=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>sh(()=>qu(e.guards.map(s=>{const i=$p(s,e.node,n);let o;if(function(t){return t&&gp(t.canActivateChild)}(i))o=dd(i.canActivateChild(r,t));else{if(!gp(i))throw new Error("Invalid CanActivateChild guard");o=dd(i(r,t))}return o.pipe(Ph())})).pipe(_p())));return qu(s).pipe(_p())}(t,e.path,n),function(t,e,n){const r=e.routeConfig?e.routeConfig.canActivate:null;return r&&0!==r.length?qu(r.map(r=>sh(()=>{const s=$p(r,e,n);let i;if(function(t){return t&&gp(t.canActivate)}(s))i=dd(s.canActivate(e,t));else{if(!gp(s))throw new Error("Invalid CanActivate guard");i=dd(s(e,t))}return i.pipe(Ph())}))).pipe(_p()):qu(!0)}(t,e.route,n))),Ph(t=>!0!==t,!0))}(r,i,t,e):qu(n)),k(t=>Object.assign(Object.assign({},n),{guardsResult:t})))})}(this.ngModule.injector,t=>this.triggerEvent(t)),Nh(t=>{if(mp(t.guardsResult)){const e=id(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}const e=new qh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),gh(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const n=new $h(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(n),t.resolve(!1),!1}return!0}),tf(t=>{if(t.guards.canActivateChecks.length)return qu(t).pipe(Nh(t=>{const e=new Gh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),ih(t=>{let n=!1;return qu(t).pipe((r=this.paramsInheritanceStrategy,s=this.ngModule.injector,L(t=>{const{targetSnapshot:e,guards:{canActivateChecks:n}}=t;if(!n.length)return qu(t);let i=0;return j(n).pipe(wh(t=>function(t,e,n,r){return function(t,e,n,r){const s=Object.keys(t);if(0===s.length)return qu({});const i={};return j(s).pipe(L(s=>function(t,e,n,r){const s=$p(t,e,r);return dd(s.resolve?s.resolve(e,n):s(e,n))}(t[s],e,n,r).pipe(Nh(t=>{i[s]=t}))),Ch(1),L(()=>Object.keys(i).length===s.length?qu(i):nh))}(t._resolve,t,e,r).pipe(k(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),Wd(t,n).resolve),null)))}(t.route,e,r,s)),Nh(()=>i++),Ch(1),L(e=>i===n.length?qu(t):nh))})),Nh({next:()=>n=!0,complete:()=>{if(!n){const n=new $h(t.id,this.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");e.next(n),t.resolve(!1)}}}));var r,s}),Nh(t=>{const e=new Zh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),tf(t=>{const{targetSnapshot:e,id:n,extractedUrl:r,rawUrl:s,extras:{skipLocationChange:i,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:n,appliedUrlTree:r,rawUrlTree:s,skipLocationChange:!!i,replaceUrl:!!o})}),k(t=>{const e=function(t,e,n){const r=Jd(t,e._root,n?n._root:void 0);return new $d(r,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),Nh(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(i=this.rootContexts,o=this.routeReuseStrategy,a=t=>this.triggerEvent(t),k(t=>(new dp(o,t.targetRouterState,t.currentRouterState,a).activate(i),t))),Nh({next(){n=!0},complete(){n=!0}}),(s=()=>{if(!n&&!r){this.resetUrlToCurrentUrlTree();const n=new $h(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(n),t.resolve(!1)}this.currentNavigation=null},t=>t.lift(new Vh(s))),_h(n=>{if(r=!0,(s=n)&&s.ngNavigationCancelingError){const r=mp(n.url);r||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const s=new $h(t.id,this.serializeUrl(t.extractedUrl),n.message);e.next(s),r?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree);this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const r=new zh(t.id,this.serializeUrl(t.extractedUrl),n);e.next(r);try{t.resolve(this.errorHandler(n))}catch(i){t.reject(i)}}var s;return nh}));var s,i,o,a}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const e=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,e)&&setTimeout(()=>{const{source:t,state:n,urlTree:r}=e,s={replaceUrl:!0};if(n){const t=Object.assign({},n);delete t.navigationId,0!==Object.keys(t).length&&(s.state=t)}this.scheduleNavigation(r,t,n,s)},0),this.lastLocationChangeInfo=e}))}extractLocationChangeInfoFromEvent(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,e){if(!t)return!0;const n=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&n&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){vp(t),this.config=t.map(Sp),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,e={}){const{relativeTo:n,queryParams:r,fragment:s,queryParamsHandling:i,preserveFragment:o}=e,a=n||this.routerState.root,l=o?this.currentUrlTree.fragment:s;let c=null;switch(i){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=r||null}return null!==c&&(c=this.removeEmptyProps(c)),function(t,e,n,r,s){if(0===n.length)return np(e.root,e.root,e,r,s);const i=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new sp(!0,0,t);let e=0,n=!1;const r=t.reduce((t,r,s)=>{if("object"==typeof r&&null!=r){if(r.outlets){const e={};return hd(r.outlets,(t,n)=>{e[n]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(r.segmentPath)return[...t,r.segmentPath]}return"string"!=typeof r?[...t,r]:0===s?(r.split("/").forEach((r,s)=>{0==s&&"."===r||(0==s&&""===r?n=!0:".."===r?e++:""!=r&&t.push(r))}),t):[...t,r]},[]);return new sp(n,e,r)}(n);if(i.toRoot())return np(e.root,new _d([],{}),e,r,s);const o=function(t,e,n){if(t.isAbsolute)return new ip(e.root,!0,0);if(-1===n.snapshot._lastPathIndex){const t=n.snapshot._urlSegment;return new ip(t,t===e.root,0)}const r=tp(t.commands[0])?0:1;return function(t,e,n){let r=t,s=e,i=n;for(;i>s;){if(i-=s,r=r.parent,!r)throw new Error("Invalid number of '../'");s=r.segments.length}return new ip(r,!1,s-i)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+r,t.numberOfDoubleDots)}(i,e,t),a=o.processChildren?ap(o.segmentGroup,o.index,i.commands):op(o.segmentGroup,o.index,i.commands);return np(o.segmentGroup,a,e,r,s)}(a,this.currentUrlTree,t,c,l)}navigateByUrl(t,e={skipLocationChange:!1}){const n=mp(t)?t:this.parseUrl(t),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e{const r=t[n];return null!=r&&(e[n]=r),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new Hh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,n,r,s){if(this.disposed)return Promise.resolve(!1);const i=this.getTransition(),o="imperative"!==e&&"imperative"===(null==i?void 0:i.source),a=(this.lastSuccessfulId===i.id||this.currentNavigation?i.rawUrl:i.urlAfterRedirects).toString()===t.toString();if(o&&a)return Promise.resolve(!0);let l,c,u;s?(l=s.resolve,c=s.reject,u=s.promise):u=new Promise((t,e)=>{l=t,c=e});const h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:r,resolve:l,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,n,r){const s=this.urlSerializer.serialize(t);r=r||{},this.location.isCurrentPathEqualTo(s)||e?this.location.replaceState(s,"",Object.assign(Object.assign({},r),{navigationId:n})):this.location.go(s,"",Object.assign(Object.assign({},r),{navigationId:n}))}resetStateAndUrl(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(e){return new(e||t)(lr(qn),lr(wd),lr(of),lr(Cc),lr(_i),lr(Kl),lr(kl),lr(void 0))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),df=(()=>{class t{constructor(t,e,n,r,s){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new Wa,this.deactivateEvents=new Wa,this.name=r||nd,t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const n=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),r=this.parentContexts.getOrCreateContext(this.name).children,s=new pf(t,r,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,s),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(ji(of),ji(ka),ji(Fo),("name",function(t,e){const n=t.attrs;if(n){const t=n.length;let r=0;for(;rthis.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),Mh(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects);const n=new Bh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(n)}));var r,s,i,o;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:r,source:s,restoredState:i,extras:o}=t,a=new Lh(n,this.serializeUrl(r),s,i);e.next(a);const l=zd(r,this.rootComponentType).snapshot;return qu(Object.assign(Object.assign({},t),{targetSnapshot:l,urlAfterRedirects:r,extras:Object.assign(Object.assign({},o),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),nh}),tf(t=>{const{targetSnapshot:e,id:n,extractedUrl:r,rawUrl:s,extras:{skipLocationChange:i,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:n,appliedUrlTree:r,rawUrlTree:s,skipLocationChange:!!i,replaceUrl:!!o})}),Mh(t=>{const e=new Wh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),k(t=>Object.assign(Object.assign({},t),{guards:Hp(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return L(n=>{const{targetSnapshot:r,currentSnapshot:s,guards:{canActivateChecks:i,canDeactivateChecks:o}}=n;return 0===o.length&&0===i.length?qu(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,r){return j(t).pipe(L(t=>function(t,e,n,r,s){const i=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return i&&0!==i.length?qu(i.map(i=>{const o=$p(i,e,s);let a;if(function(t){return t&&gp(t.canDeactivate)}(o))a=dd(o.canDeactivate(t,e,n,r));else{if(!gp(o))throw new Error("Invalid CanDeactivate guard");a=dd(o(t,e,n,r))}return a.pipe(Ph())})).pipe(_p()):qu(!0)}(t.component,t.route,n,e,r)),Ph(t=>!0!==t,!0))}(o,r,s,t).pipe(L(n=>n&&"boolean"==typeof n?function(t,e,n,r){return j(e).pipe(wh(e=>eh(function(t,e){return null!==t&&e&&e(new Kh(t)),qu(!0)}(e.route.parent,r),function(t,e){return null!==t&&e&&e(new Xh(t)),qu(!0)}(e.route,r),function(t,e,n){const r=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>sh(()=>qu(e.guards.map(s=>{const i=$p(s,e.node,n);let o;if(function(t){return t&&gp(t.canActivateChild)}(i))o=dd(i.canActivateChild(r,t));else{if(!gp(i))throw new Error("Invalid CanActivateChild guard");o=dd(i(r,t))}return o.pipe(Ph())})).pipe(_p())));return qu(s).pipe(_p())}(t,e.path,n),function(t,e,n){const r=e.routeConfig?e.routeConfig.canActivate:null;return r&&0!==r.length?qu(r.map(r=>sh(()=>{const s=$p(r,e,n);let i;if(function(t){return t&&gp(t.canActivate)}(s))i=dd(s.canActivate(e,t));else{if(!gp(s))throw new Error("Invalid CanActivate guard");i=dd(s(e,t))}return i.pipe(Ph())}))).pipe(_p()):qu(!0)}(t,e.route,n))),Ph(t=>!0!==t,!0))}(r,i,t,e):qu(n)),k(t=>Object.assign(Object.assign({},n),{guardsResult:t})))})}(this.ngModule.injector,t=>this.triggerEvent(t)),Mh(t=>{if(mp(t.guardsResult)){const e=id(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}const e=new qh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),gh(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const n=new $h(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(n),t.resolve(!1),!1}return!0}),tf(t=>{if(t.guards.canActivateChecks.length)return qu(t).pipe(Mh(t=>{const e=new Gh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),ih(t=>{let n=!1;return qu(t).pipe((r=this.paramsInheritanceStrategy,s=this.ngModule.injector,L(t=>{const{targetSnapshot:e,guards:{canActivateChecks:n}}=t;if(!n.length)return qu(t);let i=0;return j(n).pipe(wh(t=>function(t,e,n,r){return function(t,e,n,r){const s=Object.keys(t);if(0===s.length)return qu({});const i={};return j(s).pipe(L(s=>function(t,e,n,r){const s=$p(t,e,r);return dd(s.resolve?s.resolve(e,n):s(e,n))}(t[s],e,n,r).pipe(Mh(t=>{i[s]=t}))),Ch(1),L(()=>Object.keys(i).length===s.length?qu(i):nh))}(t._resolve,t,e,r).pipe(k(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),Wd(t,n).resolve),null)))}(t.route,e,r,s)),Mh(()=>i++),Ch(1),L(e=>i===n.length?qu(t):nh))})),Mh({next:()=>n=!0,complete:()=>{if(!n){const n=new $h(t.id,this.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");e.next(n),t.resolve(!1)}}}));var r,s}),Mh(t=>{const e=new Zh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),tf(t=>{const{targetSnapshot:e,id:n,extractedUrl:r,rawUrl:s,extras:{skipLocationChange:i,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:n,appliedUrlTree:r,rawUrlTree:s,skipLocationChange:!!i,replaceUrl:!!o})}),k(t=>{const e=function(t,e,n){const r=Jd(t,e._root,n?n._root:void 0);return new $d(r,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),Mh(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(i=this.rootContexts,o=this.routeReuseStrategy,a=t=>this.triggerEvent(t),k(t=>(new dp(o,t.targetRouterState,t.currentRouterState,a).activate(i),t))),Mh({next(){n=!0},complete(){n=!0}}),(s=()=>{if(!n&&!r){this.resetUrlToCurrentUrlTree();const n=new $h(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(n),t.resolve(!1)}this.currentNavigation=null},t=>t.lift(new Vh(s))),_h(n=>{if(r=!0,(s=n)&&s.ngNavigationCancelingError){const r=mp(n.url);r||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const s=new $h(t.id,this.serializeUrl(t.extractedUrl),n.message);e.next(s),r?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree);this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const r=new zh(t.id,this.serializeUrl(t.extractedUrl),n);e.next(r);try{t.resolve(this.errorHandler(n))}catch(i){t.reject(i)}}var s;return nh}));var s,i,o,a}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const e=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,e)&&setTimeout(()=>{const{source:t,state:n,urlTree:r}=e,s={replaceUrl:!0};if(n){const t=Object.assign({},n);delete t.navigationId,0!==Object.keys(t).length&&(s.state=t)}this.scheduleNavigation(r,t,n,s)},0),this.lastLocationChangeInfo=e}))}extractLocationChangeInfoFromEvent(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,e){if(!t)return!0;const n=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&n&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){vp(t),this.config=t.map(Sp),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,e={}){const{relativeTo:n,queryParams:r,fragment:s,queryParamsHandling:i,preserveFragment:o}=e,a=n||this.routerState.root,l=o?this.currentUrlTree.fragment:s;let c=null;switch(i){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=r||null}return null!==c&&(c=this.removeEmptyProps(c)),function(t,e,n,r,s){if(0===n.length)return np(e.root,e.root,e,r,s);const i=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new sp(!0,0,t);let e=0,n=!1;const r=t.reduce((t,r,s)=>{if("object"==typeof r&&null!=r){if(r.outlets){const e={};return hd(r.outlets,(t,n)=>{e[n]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(r.segmentPath)return[...t,r.segmentPath]}return"string"!=typeof r?[...t,r]:0===s?(r.split("/").forEach((r,s)=>{0==s&&"."===r||(0==s&&""===r?n=!0:".."===r?e++:""!=r&&t.push(r))}),t):[...t,r]},[]);return new sp(n,e,r)}(n);if(i.toRoot())return np(e.root,new _d([],{}),e,r,s);const o=function(t,e,n){if(t.isAbsolute)return new ip(e.root,!0,0);if(-1===n.snapshot._lastPathIndex){const t=n.snapshot._urlSegment;return new ip(t,t===e.root,0)}const r=tp(t.commands[0])?0:1;return function(t,e,n){let r=t,s=e,i=n;for(;i>s;){if(i-=s,r=r.parent,!r)throw new Error("Invalid number of '../'");s=r.segments.length}return new ip(r,!1,s-i)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+r,t.numberOfDoubleDots)}(i,e,t),a=o.processChildren?ap(o.segmentGroup,o.index,i.commands):op(o.segmentGroup,o.index,i.commands);return np(o.segmentGroup,a,e,r,s)}(a,this.currentUrlTree,t,c,l)}navigateByUrl(t,e={skipLocationChange:!1}){const n=mp(t)?t:this.parseUrl(t),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e{const r=t[n];return null!=r&&(e[n]=r),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new Hh(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,n,r,s){if(this.disposed)return Promise.resolve(!1);const i=this.getTransition(),o="imperative"!==e&&"imperative"===(null==i?void 0:i.source),a=(this.lastSuccessfulId===i.id||this.currentNavigation?i.rawUrl:i.urlAfterRedirects).toString()===t.toString();if(o&&a)return Promise.resolve(!0);let l,c,u;s?(l=s.resolve,c=s.reject,u=s.promise):u=new Promise((t,e)=>{l=t,c=e});const h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:r,resolve:l,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,n,r){const s=this.urlSerializer.serialize(t);r=r||{},this.location.isCurrentPathEqualTo(s)||e?this.location.replaceState(s,"",Object.assign(Object.assign({},r),{navigationId:n})):this.location.go(s,"",Object.assign(Object.assign({},r),{navigationId:n}))}resetStateAndUrl(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(e){return new(e||t)(lr(qn),lr(wd),lr(of),lr(Cc),lr(_i),lr(Kl),lr(kl),lr(void 0))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),df=(()=>{class t{constructor(t,e,n,r,s){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new Wa,this.deactivateEvents=new Wa,this.name=r||nd,t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const n=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),r=this.parentContexts.getOrCreateContext(this.name).children,s=new pf(t,r,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,s),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(ji(of),ji(ka),ji(Fo),("name",function(t,e){const n=t.attrs;if(n){const t=n.length;let r=0;for(;rjf),multi:!0},Mf=new Bn("CompositionEventMode"); + */class Pf{}const Df=new Bn("NgValueAccessor"),Mf={provide:Df,useExisting:rt(()=>jf),multi:!0},Nf=new Bn("CompositionEventMode"); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */let jf=(()=>{class t{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=oc()?oc().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(ji(Wo),ji($o),ji(Mf,8))},t.\u0275dir=Zt({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&Wi("input",function(t){return e._handleInput(t.target.value)})("blur",function(){return e.onTouched()})("compositionstart",function(){return e._compositionStart()})("compositionend",function(t){return e._compositionEnd(t.target.value)})},features:[Mo([Nf])]}),t})(); + */let jf=(()=>{class t{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=oc()?oc().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(ji(Wo),ji($o),ji(Nf,8))},t.\u0275dir=Zt({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&Wi("input",function(t){return e._handleInput(t.target.value)})("blur",function(){return e.onTouched()})("compositionstart",function(){return e._compositionStart()})("compositionend",function(t){return e._compositionEnd(t.target.value)})},features:[No([Mf])]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. @@ -1417,7 +1417,7 @@ const eg="VALID",ng="INVALID",rg="PENDING",sg="DISABLED";function ig(t){return(c * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -const fg={provide:Qf,useExisting:rt(()=>mg)},gg=(()=>Promise.resolve(null))();let mg=(()=>{class t extends Qf{constructor(t,e,n,r){super(),this.control=new hg,this._registered=!1,this.update=new Wa,this._parent=t,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=function(t,e){if(!e)return null;let n,r,s;return Array.isArray(e),e.forEach(t=>{t.constructor===jf?n=t:Object.getPrototypeOf(t.constructor)===Pf?r=t:s=t}),s||r||n||null}(0,r)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),function(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?[...this._parent.path,this.name]:[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){var t,e;(function(t,e,n){const r=function(t){return t._rawValidators}(t);null!==e.validator?t.setValidators(qf(r,e.validator)):"function"==typeof r&&t.setValidators([r]);const s=function(t){return t._rawAsyncValidators}(t);null!==e.asyncValidator?t.setAsyncValidators(qf(s,e.asyncValidator)):"function"==typeof s&&t.setAsyncValidators([s]);{const n=()=>t.updateValueAndValidity();Jf(e._rawValidators,n),Jf(e._rawAsyncValidators,n)}})(t=this.control,e=this),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&Xf(t,e)})}(t,e),function(t,e){const n=(t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&Xf(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function(t,e){if(e.valueAccessor.setDisabledState){const n=t=>{e.valueAccessor.setDisabledState(t)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}(t,e),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){gg.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,n=""===e||e&&"false"!==e;gg.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(ji(Zf,9),ji(Vf,10),ji(Ff,10),ji(Df,10))},t.\u0275dir=Zt({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Mo([fg]),vi,le]}),t})(); +const fg={provide:Qf,useExisting:rt(()=>mg)},gg=(()=>Promise.resolve(null))();let mg=(()=>{class t extends Qf{constructor(t,e,n,r){super(),this.control=new hg,this._registered=!1,this.update=new Wa,this._parent=t,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=function(t,e){if(!e)return null;let n,r,s;return Array.isArray(e),e.forEach(t=>{t.constructor===jf?n=t:Object.getPrototypeOf(t.constructor)===Pf?r=t:s=t}),s||r||n||null}(0,r)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),function(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?[...this._parent.path,this.name]:[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){var t,e;(function(t,e,n){const r=function(t){return t._rawValidators}(t);null!==e.validator?t.setValidators(qf(r,e.validator)):"function"==typeof r&&t.setValidators([r]);const s=function(t){return t._rawAsyncValidators}(t);null!==e.asyncValidator?t.setAsyncValidators(qf(s,e.asyncValidator)):"function"==typeof s&&t.setAsyncValidators([s]);{const n=()=>t.updateValueAndValidity();Jf(e._rawValidators,n),Jf(e._rawAsyncValidators,n)}})(t=this.control,e=this),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&Xf(t,e)})}(t,e),function(t,e){const n=(t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&Xf(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function(t,e){if(e.valueAccessor.setDisabledState){const n=t=>{e.valueAccessor.setDisabledState(t)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}(t,e),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){gg.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,n=""===e||e&&"false"!==e;gg.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(ji(Zf,9),ji(Vf,10),ji(Ff,10),ji(Df,10))},t.\u0275dir=Zt({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[No([fg]),vi,le]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. @@ -1425,14 +1425,14 @@ const fg={provide:Qf,useExisting:rt(()=>mg)},gg=(()=>Promise.resolve(null))();le * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -const yg={provide:Df,useExisting:rt(()=>_g),multi:!0};let _g=(()=>{class t extends Pf{constructor(t,e){super(),this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(ji(Wo),ji($o))},t.\u0275dir=Zt({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&Wi("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[Mo([yg]),vi]}),t})(),bg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})(),vg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[bg]]}),t})(),wg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[vg]}),t})(); +const yg={provide:Df,useExisting:rt(()=>_g),multi:!0};let _g=(()=>{class t extends Pf{constructor(t,e){super(),this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(ji(Wo),ji($o))},t.\u0275dir=Zt({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&Wi("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[No([yg]),vi]}),t})(),bg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})(),vg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[bg]]}),t})(),wg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[vg]}),t})(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */const Cg=new Bn("config"),Sg=new Bn("NEW_CONFIG"),xg=new Bn("INITIAL_CONFIG"),Eg={suffix:"",prefix:"",thousandSeparator:" ",decimalMarker:".",clearIfNotMatch:!1,showTemplate:!1,showMaskTyped:!1,placeHolderCharacter:"_",dropSpecialCharacters:!0,hiddenInput:void 0,shownMaskExpression:"",separatorLimit:"",allowNegativeNumbers:!1,validation:!0,specialCharacters:["-","/","(",")",".",":"," ","+",",","@","[","]",'"',"'"],leadZeroDateTime:!1,patterns:{0:{pattern:new RegExp("\\d")},9:{pattern:new RegExp("\\d"),optional:!0},X:{pattern:new RegExp("\\d"),symbol:"*"},A:{pattern:new RegExp("[a-zA-Z0-9]")},S:{pattern:new RegExp("[a-zA-Z]")},d:{pattern:new RegExp("\\d")},m:{pattern:new RegExp("\\d")},M:{pattern:new RegExp("\\d")},H:{pattern:new RegExp("\\d")},h:{pattern:new RegExp("\\d")},s:{pattern:new RegExp("\\d")}}};let kg=(()=>{class t{constructor(t){this._config=t,this.maskExpression="",this.actualValue="",this.shownMaskExpression="",this._formatWithSeparators=(t,e,n,r)=>{const s=t.split(n),i=s.length>1?`${n}${s[1]}`:"";let o=s[0];const a=this.separatorLimit.replace(/\s/g,"");a&&+a&&(o="-"===o[0]?`-${o.slice(1,o.length).slice(0,a.length)}`:o.slice(0,a.length));const l=/(\d+)(\d{3})/;for(;e&&l.test(o);)o=o.replace(l,"$1"+e+"$2");return void 0===r?o+i:0===r?o:o+i.substr(0,r+1)},this.percentage=t=>Number(t)>=0&&Number(t)<=100,this.getPrecision=t=>{const e=t.split(".");return e.length>1?Number(e[e.length-1]):1/0},this.checkAndRemoveSuffix=t=>{var e,n,r;for(let s=(null===(e=this.suffix)||void 0===e?void 0:e.length)-1;s>=0;s--){const e=this.suffix.substr(s,null===(n=this.suffix)||void 0===n?void 0:n.length);if(t.includes(e)&&(s-1<0||!t.includes(this.suffix.substr(s-1,null===(r=this.suffix)||void 0===r?void 0:r.length))))return t.replace(e,"")}return t},this.checkInputPrecision=(t,e,n)=>{if(e<1/0){const r=new RegExp(this._charToRegExpExpression(n)+`\\d{${e}}.*$`),s=t.match(r);s&&s[0].length-1>e&&(t=t.substring(0,t.length-(s[0].length-1-e))),0===e&&t.endsWith(n)&&(t=t.substring(0,t.length-1))}return t},this._shift=new Set,this.clearIfNotMatch=this._config.clearIfNotMatch,this.dropSpecialCharacters=this._config.dropSpecialCharacters,this.maskSpecialCharacters=this._config.specialCharacters,this.maskAvailablePatterns=this._config.patterns,this.prefix=this._config.prefix,this.suffix=this._config.suffix,this.thousandSeparator=this._config.thousandSeparator,this.decimalMarker=this._config.decimalMarker,this.hiddenInput=this._config.hiddenInput,this.showMaskTyped=this._config.showMaskTyped,this.placeHolderCharacter=this._config.placeHolderCharacter,this.validation=this._config.validation,this.separatorLimit=this._config.separatorLimit,this.allowNegativeNumbers=this._config.allowNegativeNumbers,this.leadZeroDateTime=this._config.leadZeroDateTime}applyMaskWithPattern(t,e){const[n,r]=e;return this.customPattern=r,this.applyMask(t,n)}applyMask(t,e,n=0,r=!1,s=!1,i=(()=>{})){if(null==t||void 0===e)return"";let o=0,a="",l=!1,c=!1,u=1,h=!1;t.slice(0,this.prefix.length)===this.prefix&&(t=t.slice(this.prefix.length,t.length)),this.suffix&&(null==t?void 0:t.length)>0&&(t=this.checkAndRemoveSuffix(t));const d=t.toString().split("");"IP"===e&&(this.ipError=!!(d.filter(t=>"."===t).length<3&&d.length<7),e="099.099.099.099");const p=[];for(let _=0;_11?"00.000.000/0000-00":"000.000.000-00"),e.startsWith("percent")){if(t.match("[a-z]|[A-Z]")||t.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/.]/)){t=this._stripToDecimal(t);const n=this.getPrecision(e);t=this.checkInputPrecision(t,n,this.decimalMarker)}if(t.indexOf(".")>0&&!this.percentage(t.substring(0,t.indexOf(".")))){const e=t.substring(0,t.indexOf(".")-1);t=`${e}${t.substring(t.indexOf("."),t.length)}`}a=this.percentage(t)?t:t.substring(0,t.length-1)}else if(e.startsWith("separator")){(t.match("[w\u0430-\u044f\u0410-\u042f]")||t.match("[\u0401\u0451\u0410-\u044f]")||t.match("[a-z]|[A-Z]")||t.match(/[-@#!$%\\^&*()_\xa3\xac'+|~=`{}\[\]:";<>.?\/]/)||t.match("[^A-Za-z0-9,]"))&&(t=this._stripToDecimal(t)),t=t.length>1&&"0"===t[0]&&t[1]!==this.decimalMarker?t.slice(1,t.length):t;const r=this._charToRegExpExpression(this.thousandSeparator),s=this._charToRegExpExpression(this.decimalMarker),i='@#!$%^&*()_+|~=`{}\\[\\]:\\s,\\.";<>?\\/'.replace(r,"").replace(s,""),o=new RegExp("["+i+"]");t.match(o)&&(t=t.substring(0,t.length-1));const l=this.getPrecision(e),h=(t=this.checkInputPrecision(t,l,this.decimalMarker)).replace(new RegExp(r,"g"),"");a=this._formatWithSeparators(h,this.thousandSeparator,this.decimalMarker,l);const d=a.indexOf(",")-t.indexOf(","),p=a.length-t.length;if(p>0&&","!==a[n]){c=!0;let t=0;do{this._shift.add(n+t),t++}while(t0&&!(a.indexOf(",")>=n&&n>3)||!(a.indexOf(".")>=n&&n>3)&&p<=0?(this._shift.clear(),c=!0,u=p,this._shift.add(n+=p)):this._shift.clear()}else for(let _=0,b=d[0];_2){o+=1,this._shiftStep(e,o,d.length),_--,this.leadZeroDateTime&&(a+="0");continue}if("h"===e[o]&&"2"===a&&Number(b)>3){o+=1,_--;continue}if("m"===e[o]&&Number(b)>5){o+=1,this._shiftStep(e,o,d.length),_--,this.leadZeroDateTime&&(a+="0");continue}if("s"===e[o]&&Number(b)>5){o+=1,this._shiftStep(e,o,d.length),_--,this.leadZeroDateTime&&(a+="0");continue}const n=31;if("d"===e[o]&&(Number(b)>3&&this.leadZeroDateTime||Number(t.slice(o,o+2))>n||"/"===t[o+1])){o+=1,this._shiftStep(e,o,d.length),_--,this.leadZeroDateTime&&(a+="0");continue}if("M"===e[o]){const r=12,s=0===o&&(Number(b)>2||Number(t.slice(o,o+2))>r||"/"===t[o+1]),i=t.slice(o-3,o-1).includes("/")&&("/"===t[o-2]&&Number(t.slice(o-1,o+1))>r&&"/"!==t[o]||"/"===t[o]||"/"===t[o-3]&&Number(t.slice(o-2,o))>r&&"/"!==t[o-1]||"/"===t[o-1]),l=Number(t.slice(o-3,o-1))<=n&&!t.slice(o-3,o-1).includes("/")&&"/"===t[o-1]&&(Number(t.slice(o,o+2))>r||"/"===t[o+1]),c=Number(t.slice(o-3,o-1))>n&&!t.slice(o-3,o-1).includes("/")&&!t.slice(o-2,o).includes("/")&&Number(t.slice(o-2,o))>r,u=Number(t.slice(o-3,o-1))<=n&&!t.slice(o-3,o-1).includes("/")&&"/"!==t[o-1]&&Number(t.slice(o-1,o+1))>r;if(Number(b)>1&&this.leadZeroDateTime||s||i||l||c||u){o+=1,this._shiftStep(e,o,d.length),_--,this.leadZeroDateTime&&(a+="0");continue}}a+=b,o++}else-1!==this.maskSpecialCharacters.indexOf(e[o])?(a+=e[o],o++,this._shiftStep(e,o,d.length),_--):this.maskSpecialCharacters.indexOf(b)>-1&&this.maskAvailablePatterns[e[o]]&&this.maskAvailablePatterns[e[o]].optional?(d[o]&&"099.099.099.099"!==e&&"000.000.000-00"!==e&&"00.000.000/0000-00"!==e&&(a+=d[o]),o++,_--):"*"===this.maskExpression[o+1]&&this._findSpecialChar(this.maskExpression[o+2])&&this._findSpecialChar(b)===this.maskExpression[o+2]&&l||"?"===this.maskExpression[o+1]&&this._findSpecialChar(this.maskExpression[o+2])&&this._findSpecialChar(b)===this.maskExpression[o+2]&&l?(o+=3,a+=b):this.showMaskTyped&&this.maskSpecialCharacters.indexOf(b)<0&&b!==this.placeHolderCharacter&&(h=!0);a.length+1===e.length&&-1!==this.maskSpecialCharacters.indexOf(e[e.length-1])&&(a+=e[e.length-1]);let f=n+1;for(;this._shift.has(f);)u++,f++;let g=r?o:this._shift.has(n)?u:0;h&&g--,i(g,c),u<0&&this._shift.clear();let m=!1;s&&(m=d.every(t=>this.maskSpecialCharacters.includes(t)));let y=`${this.prefix}${m?"":a}${this.suffix}`;return 0===a.length&&(y=`${this.prefix}${a}`),y}_findSpecialChar(t){return this.maskSpecialCharacters.find(e=>e===t)}_checkSymbolMask(t,e){return this.maskAvailablePatterns=this.customPattern?this.customPattern:this.maskAvailablePatterns,this.maskAvailablePatterns[e]&&this.maskAvailablePatterns[e].pattern&&this.maskAvailablePatterns[e].pattern.test(t)}_stripToDecimal(t){return t.split("").filter((t,e)=>t.match("^-?\\d")||t.match("\\s")||"."===t||","===t||"-"===t&&0===e&&this.allowNegativeNumbers).join("")}_charToRegExpExpression(t){if(t){const e="[\\^$.|?*+()";return" "===t?"\\s":e.indexOf(t)>=0?"\\"+t:t}return t}_shiftStep(t,e,n){const r=/[*?]/g.test(t.slice(0,e))?n:e;this._shift.add(r+this.prefix.length||0)}}return t.\u0275fac=function(e){return new(e||t)(lr(Cg))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Tg=(()=>{class t{static forRoot(e){return{ngModule:t,providers:[{provide:Sg,useValue:e},{provide:xg,useValue:Eg},{provide:Cg,useFactory:Ag,deps:[xg,Sg]},kg]}}static forChild(){return{ngModule:t}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})();function Ag(t,e){return Object.assign(Object.assign({},t),e instanceof Function?e():e)}const Og="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};Og.KeyboardEvent||(Og.KeyboardEvent=function(t,e){});const Rg=[];let Ig=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[Cf.forRoot(Rg)],Cf]}),t})(),Pg=(()=>{class t{constructor(){this.title="dashboard"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=$t({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(t,e){1&t&&Hi(0,"router-outlet")},directives:[df],encapsulation:2}),t})();function Dg(t,e,n,s){return r(n)&&(s=n,n=void 0),s?Dg(t,e,n).pipe(k(t=>l(t)?s(...t):s(t))):new _(r=>{Ng(t,e,function(t){r.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},r,n)})}function Ng(t,e,n,r,s){let i;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const r=t;t.addEventListener(e,n,s),i=()=>r.removeEventListener(e,n,s)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const r=t;t.on(e,n),i=()=>r.off(e,n)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const r=t;t.addListener(e,n),i=()=>r.removeListener(e,n)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let i=0,o=t.length;i{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class Fg extends Vg{constructor(t,e=Vg.now){super(t,()=>Fg.delegate&&Fg.delegate!==this?Fg.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return Fg.delegate&&Fg.delegate!==this?Fg.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}const Ug=new Fg(jg);function Lg(t){return!l(t)&&t-parseFloat(t)+1>=0}function Hg(t){const{index:e,period:n,subscriber:r}=t;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}class $g{call(t,e){return e.subscribe(new zg(t))}}class zg extends Zu{constructor(t){super(t),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(t){this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(let n=0;nthis.index}hasCompleted(){return this.array.length===this.index}}class Yg extends F{constructor(t,e,n){super(t),this.parent=e,this.observable=n,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[I](){return this}next(){const t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(t){this.buffer.push(t),this.parent.checkIterators()}subscribe(){return U(this.observable,new V(this))}}function Qg(t){return e=>e.lift(new Kg(t))}class Kg{constructor(t){this.notifier=t}call(t,e){const n=new Jg(t),r=U(this.notifier,new V(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n}}class Jg extends F{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function Xg(...t){return e=>{let n;return"function"==typeof t[t.length-1]&&(n=t.pop()),e.lift(new tm(t,n))}}class tm{constructor(t,e){this.observables=t,this.project=e}call(t,e){return e.subscribe(new em(t,this.observables,this.project))}}class em extends Zu{constructor(t,e,n){super(t),this.observables=e,this.project=n,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let s=0;s0){const t=r.indexOf(n);-1!==t&&r.splice(t,1)}}notifyComplete(){}_next(t){if(0===this.toRespond.length){const e=[t,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(t){let e;try{e=this.project.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}function nm(t,e){if(1&t){const t=$i();Ui(0,"button",1),Wi("click",function(){return Pe(t),Zi().close()}),Ui(1,"span",2),mo(2,"\xd7"),Li(),Li()}}const rm=["*"],sm=["dialog"];function im(t){return null!=t}function om(t){return(t||document.body).getBoundingClientRect()}"undefined"==typeof Element||Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){let e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null});const am={animation:!0,transitionTimerDelayMs:5};let lm=(()=>{class t{constructor(){this.animation=am.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();const cm=()=>{},{transitionTimerDelayMs:um}=am,hm=new Map,dm=(t,e,n,r)=>{let s=r.context||{};const i=hm.get(e);if(i)switch(r.runningTransition){case"continue":return nh;case"stop":t.run(()=>i.transition$.complete()),s=Object.assign(i.context,s),hm.delete(e)}const o=n(e,r.animation,s)||cm;if(!r.animation||"none"===window.getComputedStyle(e).transitionProperty)return t.run(()=>o()),qu(void 0).pipe(function(t){return e=>new _(n=>e.subscribe(e=>t.run(()=>n.next(e)),e=>t.run(()=>n.error(e)),()=>t.run(()=>n.complete())))}(t));const a=new S,c=new S,u=a.pipe(function(...t){return e=>eh(e,qu(...t))}(!0));hm.set(e,{transition$:a,complete:()=>{c.next(),c.complete()},context:s});const h=function(t){const{transitionDelay:e,transitionDuration:n}=window.getComputedStyle(t);return 1e3*(parseFloat(e)+parseFloat(n))}(e);return t.runOutsideAngular(()=>{const n=Dg(e,"transitionend").pipe(Qg(u),gh(({target:t})=>t===e));(function(...t){if(1===t.length){if(!l(t[0]))return t[0];t=t[0]}return B(t,void 0).lift(new $g)})(function(t=0,e,n){let r=-1;return Lg(e)?r=Number(e)<1?1:Number(e):E(e)&&(n=e),E(n)||(n=Ug),new _(e=>{const s=Lg(t)?t:+t-n.now();return n.schedule(Hg,s,{index:0,period:r,subscriber:e})})}(h+um).pipe(Qg(u)),n,c).pipe(Qg(u)).subscribe(()=>{hm.delete(e),t.run(()=>{o(),a.next(),a.complete()})})}),a.asObservable()};let pm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),fm=(()=>{class t{constructor(t){this._ngbConfig=t,this.dismissible=!0,this.type="warning"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}return t.\u0275fac=function(e){return new(e||t)(lr(lm))},t.\u0275prov=ut({factory:function(){return new t(lr(lm))},token:t,providedIn:"root"}),t})();const gm=({classList:t})=>{t.remove("show")};let mm=(()=>{class t{constructor(t,e,n,r){this._renderer=e,this._element=n,this._zone=r,this.closed=new Wa,this.dismissible=t.dismissible,this.type=t.type,this.animation=t.animation}close(){const t=dm(this._zone,this._element.nativeElement,gm,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>this.closed.emit()),t}ngOnChanges(t){const e=t.type;e&&!e.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${e.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${e.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}return t.\u0275fac=function(e){return new(e||t)(ji(fm),ji(Wo),ji($o),ji(Ol))},t.\u0275cmp=$t({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert","show"],hostVars:4,hostBindings:function(t,e){2&t&&so("fade",e.animation)("alert-dismissible",e.dismissible)},inputs:{dismissible:"dismissible",type:"type",animation:"animation"},outputs:{closed:"closed"},exportAs:["ngbAlert"],features:[le],ngContentSelectors:rm,decls:2,vars:1,consts:function(){let t;return t=$localize`:@@ngb.alert.close␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`,[["type","button","class","close","aria-label",t,3,"click",4,"ngIf"],["type","button","aria-label",t,1,"close",3,"click"],["aria-hidden","true"]]},template:function(t,e){1&t&&(Qi(),Ki(0),Ni(1,nm,3,0,"button",0)),2&t&&(cs(1),Vi("ngIf",e.dismissible))},directives:[uu],styles:["ngb-alert{display:block}"],encapsulation:2,changeDetection:0}),t})(),ym=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),_m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})(),bm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),vm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})();var wm=function(t){return t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown",t}({});"undefined"!=typeof navigator&&navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));const Cm=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Sm(t){const e=Array.from(t.querySelectorAll(Cm)).filter(t=>-1!==t.tabIndex);return[e[0],e[e.length-1]]}new class{getAllStyles(t){return window.getComputedStyle(t)}getStyle(t,e){return this.getAllStyles(t)[e]}isStaticPositioned(t){return"static"===(this.getStyle(t,"position")||"static")}offsetParent(t){let e=t.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(t,e=!0){let n,r={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(t,"position"))n=t.getBoundingClientRect(),n={top:n.top,bottom:n.bottom,left:n.left,right:n.right,height:n.height,width:n.width};else{const e=this.offsetParent(t);n=this.offset(t,!1),e!==document.documentElement&&(r=this.offset(e,!1)),r.top+=e.clientTop,r.left+=e.clientLeft}return n.top-=r.top,n.bottom-=r.top,n.left-=r.left,n.right-=r.left,e&&(n.top=Math.round(n.top),n.bottom=Math.round(n.bottom),n.left=Math.round(n.left),n.right=Math.round(n.right)),n}offset(t,e=!0){const n=t.getBoundingClientRect(),r=window.pageYOffset-document.documentElement.clientTop,s=window.pageXOffset-document.documentElement.clientLeft;let i={height:n.height||t.offsetHeight,width:n.width||t.offsetWidth,top:n.top+r,bottom:n.bottom+r,left:n.left+s,right:n.right+s};return e&&(i.height=Math.round(i.height),i.width=Math.round(i.width),i.top=Math.round(i.top),i.bottom=Math.round(i.bottom),i.left=Math.round(i.left),i.right=Math.round(i.right)),i}positionElements(t,e,n,r){const[s="top",i="center"]=n.split("-"),o=r?this.offset(t,!1):this.position(t,!1),a=this.getAllStyles(e),l=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),u=parseFloat(a.marginLeft),h=parseFloat(a.marginRight);let d=0,p=0;switch(s){case"top":d=o.top-(e.offsetHeight+l+c);break;case"bottom":d=o.top+o.height;break;case"left":p=o.left-(e.offsetWidth+u+h);break;case"right":p=o.left+o.width}switch(i){case"top":d=o.top;break;case"bottom":d=o.top+o.height-e.offsetHeight;break;case"left":p=o.left;break;case"right":p=o.left+o.width-e.offsetWidth;break;case"center":"top"===s||"bottom"===s?p=o.left+o.width/2-e.offsetWidth/2:d=o.top+o.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(p)}px, ${Math.round(d)}px)`;const f=e.getBoundingClientRect(),g=document.documentElement,m=window.innerHeight||g.clientHeight,y=window.innerWidth||g.clientWidth;return f.left>=0&&f.top>=0&&f.right<=y&&f.bottom<=m}},new Date(1882,10,12),new Date(2174,10,25);let xm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu,wg]]}),t})(),Em=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["",8,"navbar"]]}),t})(),km=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})(),Tm=(()=>{class t{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}return t.\u0275fac=function(e){return new(e||t)(lr(lm))},t.\u0275prov=ut({factory:function(){return new t(lr(lm))},token:t,providedIn:"root"}),t})();class Am{constructor(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}}const Om=()=>{};let Rm=(()=>{class t{constructor(t){this._document=t}compensate(){const t=this._getWidth();return this._isPresent(t)?this._adjustBody(t):Om}_adjustBody(t){const e=this._document.body,n=e.style.paddingRight,r=parseFloat(window.getComputedStyle(e)["padding-right"]);return e.style["padding-right"]=`${r+t}px`,()=>e.style["padding-right"]=n}_isPresent(t){const e=this._document.body.getBoundingClientRect();return window.innerWidth-(e.left+e.right)>=t-.1*t}_getWidth(){const t=this._document.createElement("div");t.className="modal-scrollbar-measure";const e=this._document.body;e.appendChild(t);const n=t.getBoundingClientRect().width-t.clientWidth;return e.removeChild(t),n}}return t.\u0275fac=function(e){return new(e||t)(lr(ac))},t.\u0275prov=ut({factory:function(){return new t(lr(ac))},token:t,providedIn:"root"}),t})(),Im=(()=>{class t{constructor(t,e){this._el=t,this._zone=e}ngOnInit(){this._zone.onStable.asObservable().pipe(ch(1)).subscribe(()=>{dm(this._zone,this._el.nativeElement,(t,e)=>{e&&om(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return dm(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(ji($o),ji(Ol))},t.\u0275cmp=$t({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(t,e){2&t&&(io("modal-backdrop"+(e.backdropClass?" "+e.backdropClass:"")),so("show",!e.animation)("fade",e.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();class Pm{close(t){}dismiss(t){}}class Dm{constructor(t,e,n,r){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=r,this._closed=new S,this._dismissed=new S,this._hidden=new S,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Qg(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Qg(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();e&&e.then?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():qu(void 0);t.subscribe(()=>{const{nativeElement:t}=this._windowCmptRef.location;t.parentNode.removeChild(t),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:t}=this._backdropCmptRef.location;t.parentNode.removeChild(t),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),Bg(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var Nm=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}({});let Mm=(()=>{class t{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new S,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new Wa,this.shown=new S,this.hidden=new S}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement}ngAfterViewInit(){this._show()}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,e={animation:this.animation,runningTransition:"stop"},n=Bg(dm(this._zone,t,()=>t.classList.remove("show"),e),dm(this._zone,this._dialogEl.nativeElement,()=>{},e));return n.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),n}_show(){const t={animation:this.animation,runningTransition:"continue"};Bg(dm(this._zone,this._elRef.nativeElement,(t,e)=>{e&&om(t),t.classList.add("show")},t),dm(this._zone,this._dialogEl.nativeElement,()=>{},t)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{Dg(t,"keydown").pipe(Qg(this._closed$),gh(t=>t.which===wm.Escape)).subscribe(t=>{this.keyboard?requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(Nm.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let e=!1;Dg(this._dialogEl.nativeElement,"mousedown").pipe(Qg(this._closed$),Nh(()=>e=!1),ih(()=>Dg(t,"mouseup").pipe(Qg(this._closed$),ch(1))),gh(({target:e})=>t===e)).subscribe(()=>{e=!0}),Dg(t,"click").pipe(Qg(this._closed$)).subscribe(({target:n})=>{t===n&&("static"===this.backdrop?this._bumpBackdrop():!0!==this.backdrop||e||this._zone.run(()=>this.dismiss(Nm.BACKDROP_CLICK))),e=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=Sm(t)[0];(e||n||t).focus()}}_restoreFocus(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&dm(this._zone,this._elRef.nativeElement,({classList:t})=>(t.add("modal-static"),()=>t.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(ji(ac),ji($o),ji(Ol))},t.\u0275cmp=$t({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(t,e){if(1&t&&sl(sm,3),2&t){let t;rl(t=il())&&(e._dialogEl=t.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(t,e){2&t&&(Di("aria-modal",!0)("aria-labelledby",e.ariaLabelledBy)("aria-describedby",e.ariaDescribedBy),io("modal d-block"+(e.windowClass?" "+e.windowClass:"")),so("fade",e.animation))},inputs:{backdrop:"backdrop",keyboard:"keyboard",animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:rm,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(t,e){1&t&&(Qi(),Ui(0,"div",0,1),Ui(2,"div",2),Ki(3),Li(),Li()),2&t&&io("modal-dialog"+(e.size?" modal-"+e.size:"")+(e.centered?" modal-dialog-centered":"")+(e.scrollable?" modal-dialog-scrollable":"")+(e.modalDialogClass?" "+e.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}"],encapsulation:2}),t})(),jm=(()=>{class t{constructor(t,e,n,r,s,i){this._applicationRef=t,this._injector=e,this._document=n,this._scrollBar=r,this._rendererFactory=s,this._ngZone=i,this._activeWindowCmptHasChanged=new S,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRefs=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass"],this._windowCmpts=[],this._activeInstances=new Wa,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const t=this._windowCmpts[this._windowCmpts.length-1];((t,e,n,r=!1)=>{this._ngZone.runOutsideAngular(()=>{const t=Dg(e,"focusin").pipe(Qg(n),k(t=>t.target));Dg(e,"keydown").pipe(Qg(n),gh(t=>t.which===wm.Tab),Xg(t)).subscribe(([t,n])=>{const[r,s]=Sm(e);n!==r&&n!==e||!t.shiftKey||(s.focus(),t.preventDefault()),n!==s||t.shiftKey||(r.focus(),t.preventDefault())}),r&&Dg(e,"click").pipe(Qg(n),Xg(t),k(t=>t[1])).subscribe(t=>t.focus())})})(0,t.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(t.location.nativeElement)}})}open(t,e,n,r){const s=r.container instanceof HTMLElement?r.container:im(r.container)?this._document.querySelector(r.container):this._document.body,i=this._rendererFactory.createRenderer(null,null),o=this._scrollBar.compensate(),a=()=>{this._modalRefs.length||(i.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!s)throw new Error(`The specified modal container "${r.container||"body"}" was not found in the DOM.`);const l=new Pm,c=this._getContentRef(t,r.injector||e,n,l,r);let u=!1!==r.backdrop?this._attachBackdrop(t,s):void 0,h=this._attachWindowComponent(t,s,c),d=new Dm(h,c,u,r.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(h),d.result.then(o,o),d.result.then(a,a),l.close=t=>{d.close(t)},l.dismiss=t=>{d.dismiss(t)},this._applyWindowOptions(h.instance,r),1===this._modalRefs.length&&i.addClass(this._document.body,"modal-open"),u&&u.instance&&this._applyBackdropOptions(u.instance,r),d}get activeInstances(){return this._activeInstances}dismissAll(t){this._modalRefs.forEach(e=>e.dismiss(t))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(t,e){let n=t.resolveComponentFactory(Im).create(this._injector);return this._applicationRef.attachView(n.hostView),e.appendChild(n.location.nativeElement),n}_attachWindowComponent(t,e,n){let r=t.resolveComponentFactory(Mm).create(this._injector,n.nodes);return this._applicationRef.attachView(r.hostView),e.appendChild(r.location.nativeElement),r}_applyWindowOptions(t,e){this._windowAttributes.forEach(n=>{im(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){this._backdropAttributes.forEach(n=>{im(e[n])&&(t[n]=e[n])})}_getContentRef(t,e,n,r,s){return n?n instanceof ba?this._createFromTemplateRef(n,r):"string"==typeof n?this._createFromString(n):this._createFromComponent(t,e,n,r,s):new Am([])}_createFromTemplateRef(t,e){const n=t.createEmbeddedView({$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}});return this._applicationRef.attachView(n),new Am([n.rootNodes],n)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new Am([[e]])}_createFromComponent(t,e,n,r,s){const i=t.resolveComponentFactory(n),o=_i.create({providers:[{provide:Pm,useValue:r}],parent:e}),a=i.create(o),l=a.location.nativeElement;return s.scrollable&&l.classList.add("component-host-scrollable"),this._applicationRef.attachView(a.hostView),new Am([[l]],a.hostView,a)}_setAriaHidden(t){const e=t.parentElement;e&&t!==this._document.body&&(Array.from(e.children).forEach(e=>{e!==t&&"SCRIPT"!==e.nodeName&&(this._ariaHiddenValues.set(e,e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}),this._setAriaHidden(e))}_revertAriaHidden(){this._ariaHiddenValues.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(t){const e=()=>{const e=this._modalRefs.indexOf(t);e>-1&&(this._modalRefs.splice(e,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(t),this._activeInstances.emit(this._modalRefs),t.result.then(e,e)}_registerWindowCmpt(t){this._windowCmpts.push(t),this._activeWindowCmptHasChanged.next(),t.onDestroy(()=>{const e=this._windowCmpts.indexOf(t);e>-1&&(this._windowCmpts.splice(e,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(lr(Yl),lr(_i),lr(ac),lr(Rm),lr(Bo),lr(Ol))},t.\u0275prov=ut({factory:function(){return new t(lr(Yl),lr(ni),lr(ac),lr(Rm),lr(Bo),lr(Ol))},token:t,providedIn:"root"}),t})(),Vm=(()=>{class t{constructor(t,e,n,r){this._moduleCFR=t,this._injector=e,this._modalStack=n,this._config=r}open(t,e={}){const n=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),e);return this._modalStack.open(this._moduleCFR,this._injector,t,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(t){this._modalStack.dismissAll(t)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(lr(Fo),lr(_i),lr(jm),lr(Tm))},t.\u0275prov=ut({factory:function(){return new t(lr(Fo),lr(ni),lr(jm),lr(Tm))},token:t,providedIn:"root"}),t})(),Fm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({providers:[Vm]}),t})(),Um=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),Lm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),Hm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),$m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),zm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),Bm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),Wm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),qm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})();new Bn("live announcer delay",{providedIn:"root",factory:function(){return 100}});let Gm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})();const Zm=[pm,ym,_m,bm,vm,xm,km,Fm,Um,Lm,Hm,$m,zm,Bm,Wm,qm,Gm];let Ym=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[Zm,pm,ym,_m,bm,vm,xm,km,Fm,Um,Lm,Hm,$m,zm,Bm,Wm,qm,Gm]}),t})();function Qm(t){const{subscriber:e,counter:n,period:r}=t;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}class Km{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new Jm(t,this.dueTime,this.scheduler))}}class Jm extends f{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Xm,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function Xm(t){t.debouncedNext()}let ty=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){}save(){this.activeModal.close(this.rewindDate)}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-rewind-modal"]],inputs:{groupId:"groupId",consumerName:"consumerName"},decls:23,vars:3,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","rewindDate"],[1,"input-group"],["id","rewindDate","placeholder","yyyy-mm-dd hh:MM:ss","type","datetime-local",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Rewind consumers offset"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"label",6),mo(9,"Select the datetime to rewind all the partition-offsets of consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),mo(15,"' "),Li(),Ui(16,"div",7),Ui(17,"input",8),Wi("ngModelChange",function(t){return e.rewindDate=t}),Li(),Li(),Li(),Li(),Ui(18,"div",9),Ui(19,"button",10),Wi("click",function(){return e.activeModal.dismiss()}),mo(20,"Cancel"),Li(),Ui(21,"button",11),Wi("click",function(){return e.save()}),mo(22,"OK"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,""),cs(3),Vi("ngModel",e.rewindDate))},directives:[jf,Kf,mg],encapsulation:2}),t})(),ey=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){this.oldWorkersCount=this.workersCount}save(){this.activeModal.close(this.workersCount)}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-workers-count-modal"]],inputs:{workersCount:"workersCount",groupId:"groupId",consumerName:"consumerName"},decls:28,vars:4,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","oldWorkersCount"],[1,"input-group","mb-2"],["id","oldWorkersCount","type","number","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","workersCount"],[1,"input-group"],["id","workersCount","type","number",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Consumer workers running"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"label"),mo(9,"Update the number of workers in consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),Li(),Ui(15,"label",6),mo(16,"Current Value"),Li(),Ui(17,"div",7),Ui(18,"input",8),Wi("ngModelChange",function(t){return e.oldWorkersCount=t}),Li(),Li(),Ui(19,"label",9),mo(20,"New Value"),Li(),Ui(21,"div",10),Ui(22,"input",11),Wi("ngModelChange",function(t){return e.workersCount=t}),Li(),Li(),Li(),Li(),Ui(23,"div",12),Ui(24,"button",13),Wi("click",function(){return e.activeModal.dismiss()}),mo(25,"Cancel"),Li(),Ui(26,"button",14),Wi("click",function(){return e.save()}),mo(27,"OK"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,"'"),cs(4),Vi("ngModel",e.oldWorkersCount),cs(4),Vi("ngModel",e.workersCount))},directives:[_g,jf,Kf,mg],encapsulation:2}),t})(),ny=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-reset-modal"]],inputs:{groupId:"groupId",consumerName:"consumerName"},decls:23,vars:2,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],[1,"mt-3"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Reset consumers offset"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"span"),mo(9,"Reset the offset you generate a huge lag to consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),mo(15,"'. "),Li(),Ui(16,"h5",6),mo(17,"Are you really sure about it?"),Li(),Li(),Li(),Ui(18,"div",7),Ui(19,"button",8),Wi("click",function(){return e.activeModal.dismiss()}),mo(20,"No, cancel"),Li(),Ui(21,"button",9),Wi("click",function(){return e.activeModal.close()}),mo(22,"Yes"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,""))},encapsulation:2}),t})(),ry=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-pause-modal"]],inputs:{groupId:"groupId",consumerName:"consumerName"},decls:23,vars:2,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],[1,"mt-3"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Pause consumers"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"span"),mo(9,"Pause the consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),mo(15,"' will interrupt the kafka data processing and, probably, generate lag. "),Li(),Ui(16,"h5",6),mo(17,"Are you really sure about it?"),Li(),Li(),Li(),Ui(18,"div",7),Ui(19,"button",8),Wi("click",function(){return e.activeModal.dismiss()}),mo(20,"No, cancel"),Li(),Ui(21,"button",9),Wi("click",function(){return e.activeModal.close()}),mo(22,"Yes"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,""))},encapsulation:2}),t})(),sy=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-resume-modal"]],inputs:{groupId:"groupId",consumerName:"consumerName"},decls:23,vars:2,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],[1,"mt-3"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Resume consumers"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"span"),mo(9,"Resume the consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),mo(15,"' will restart to process the messages. "),Li(),Ui(16,"h5",6),mo(17,"Are you really sure about it?"),Li(),Li(),Li(),Ui(18,"div",7),Ui(19,"button",8),Wi("click",function(){return e.activeModal.dismiss()}),mo(20,"No, cancel"),Li(),Ui(21,"button",9),Wi("click",function(){return e.activeModal.close()}),mo(22,"Yes"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,""))},encapsulation:2}),t})(),iy=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-restart-modal"]],inputs:{groupId:"groupId",consumerName:"consumerName"},decls:23,vars:2,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],[1,"mt-3"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Restart consumers"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"span"),mo(9,"Restart the consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),mo(15,"' will can generate a temporary instability in your system. "),Li(),Ui(16,"h5",6),mo(17,"Are you really sure about it?"),Li(),Li(),Li(),Ui(18,"div",7),Ui(19,"button",8),Wi("click",function(){return e.activeModal.dismiss()}),mo(20,"No, cancel"),Li(),Ui(21,"button",9),Wi("click",function(){return e.activeModal.close()}),mo(22,"Yes"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,""))},encapsulation:2}),t})(); + */const Cg=new Bn("config"),Sg=new Bn("NEW_CONFIG"),xg=new Bn("INITIAL_CONFIG"),Eg={suffix:"",prefix:"",thousandSeparator:" ",decimalMarker:".",clearIfNotMatch:!1,showTemplate:!1,showMaskTyped:!1,placeHolderCharacter:"_",dropSpecialCharacters:!0,hiddenInput:void 0,shownMaskExpression:"",separatorLimit:"",allowNegativeNumbers:!1,validation:!0,specialCharacters:["-","/","(",")",".",":"," ","+",",","@","[","]",'"',"'"],leadZeroDateTime:!1,patterns:{0:{pattern:new RegExp("\\d")},9:{pattern:new RegExp("\\d"),optional:!0},X:{pattern:new RegExp("\\d"),symbol:"*"},A:{pattern:new RegExp("[a-zA-Z0-9]")},S:{pattern:new RegExp("[a-zA-Z]")},d:{pattern:new RegExp("\\d")},m:{pattern:new RegExp("\\d")},M:{pattern:new RegExp("\\d")},H:{pattern:new RegExp("\\d")},h:{pattern:new RegExp("\\d")},s:{pattern:new RegExp("\\d")}}};let kg=(()=>{class t{constructor(t){this._config=t,this.maskExpression="",this.actualValue="",this.shownMaskExpression="",this._formatWithSeparators=(t,e,n,r)=>{const s=t.split(n),i=s.length>1?`${n}${s[1]}`:"";let o=s[0];const a=this.separatorLimit.replace(/\s/g,"");a&&+a&&(o="-"===o[0]?`-${o.slice(1,o.length).slice(0,a.length)}`:o.slice(0,a.length));const l=/(\d+)(\d{3})/;for(;e&&l.test(o);)o=o.replace(l,"$1"+e+"$2");return void 0===r?o+i:0===r?o:o+i.substr(0,r+1)},this.percentage=t=>Number(t)>=0&&Number(t)<=100,this.getPrecision=t=>{const e=t.split(".");return e.length>1?Number(e[e.length-1]):1/0},this.checkAndRemoveSuffix=t=>{var e,n,r;for(let s=(null===(e=this.suffix)||void 0===e?void 0:e.length)-1;s>=0;s--){const e=this.suffix.substr(s,null===(n=this.suffix)||void 0===n?void 0:n.length);if(t.includes(e)&&(s-1<0||!t.includes(this.suffix.substr(s-1,null===(r=this.suffix)||void 0===r?void 0:r.length))))return t.replace(e,"")}return t},this.checkInputPrecision=(t,e,n)=>{if(e<1/0){const r=new RegExp(this._charToRegExpExpression(n)+`\\d{${e}}.*$`),s=t.match(r);s&&s[0].length-1>e&&(t=t.substring(0,t.length-(s[0].length-1-e))),0===e&&t.endsWith(n)&&(t=t.substring(0,t.length-1))}return t},this._shift=new Set,this.clearIfNotMatch=this._config.clearIfNotMatch,this.dropSpecialCharacters=this._config.dropSpecialCharacters,this.maskSpecialCharacters=this._config.specialCharacters,this.maskAvailablePatterns=this._config.patterns,this.prefix=this._config.prefix,this.suffix=this._config.suffix,this.thousandSeparator=this._config.thousandSeparator,this.decimalMarker=this._config.decimalMarker,this.hiddenInput=this._config.hiddenInput,this.showMaskTyped=this._config.showMaskTyped,this.placeHolderCharacter=this._config.placeHolderCharacter,this.validation=this._config.validation,this.separatorLimit=this._config.separatorLimit,this.allowNegativeNumbers=this._config.allowNegativeNumbers,this.leadZeroDateTime=this._config.leadZeroDateTime}applyMaskWithPattern(t,e){const[n,r]=e;return this.customPattern=r,this.applyMask(t,n)}applyMask(t,e,n=0,r=!1,s=!1,i=(()=>{})){if(null==t||void 0===e)return"";let o=0,a="",l=!1,c=!1,u=1,h=!1;t.slice(0,this.prefix.length)===this.prefix&&(t=t.slice(this.prefix.length,t.length)),this.suffix&&(null==t?void 0:t.length)>0&&(t=this.checkAndRemoveSuffix(t));const d=t.toString().split("");"IP"===e&&(this.ipError=!!(d.filter(t=>"."===t).length<3&&d.length<7),e="099.099.099.099");const p=[];for(let _=0;_11?"00.000.000/0000-00":"000.000.000-00"),e.startsWith("percent")){if(t.match("[a-z]|[A-Z]")||t.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/.]/)){t=this._stripToDecimal(t);const n=this.getPrecision(e);t=this.checkInputPrecision(t,n,this.decimalMarker)}if(t.indexOf(".")>0&&!this.percentage(t.substring(0,t.indexOf(".")))){const e=t.substring(0,t.indexOf(".")-1);t=`${e}${t.substring(t.indexOf("."),t.length)}`}a=this.percentage(t)?t:t.substring(0,t.length-1)}else if(e.startsWith("separator")){(t.match("[w\u0430-\u044f\u0410-\u042f]")||t.match("[\u0401\u0451\u0410-\u044f]")||t.match("[a-z]|[A-Z]")||t.match(/[-@#!$%\\^&*()_\xa3\xac'+|~=`{}\[\]:";<>.?\/]/)||t.match("[^A-Za-z0-9,]"))&&(t=this._stripToDecimal(t)),t=t.length>1&&"0"===t[0]&&t[1]!==this.decimalMarker?t.slice(1,t.length):t;const r=this._charToRegExpExpression(this.thousandSeparator),s=this._charToRegExpExpression(this.decimalMarker),i='@#!$%^&*()_+|~=`{}\\[\\]:\\s,\\.";<>?\\/'.replace(r,"").replace(s,""),o=new RegExp("["+i+"]");t.match(o)&&(t=t.substring(0,t.length-1));const l=this.getPrecision(e),h=(t=this.checkInputPrecision(t,l,this.decimalMarker)).replace(new RegExp(r,"g"),"");a=this._formatWithSeparators(h,this.thousandSeparator,this.decimalMarker,l);const d=a.indexOf(",")-t.indexOf(","),p=a.length-t.length;if(p>0&&","!==a[n]){c=!0;let t=0;do{this._shift.add(n+t),t++}while(t0&&!(a.indexOf(",")>=n&&n>3)||!(a.indexOf(".")>=n&&n>3)&&p<=0?(this._shift.clear(),c=!0,u=p,this._shift.add(n+=p)):this._shift.clear()}else for(let _=0,b=d[0];_2){o+=1,this._shiftStep(e,o,d.length),_--,this.leadZeroDateTime&&(a+="0");continue}if("h"===e[o]&&"2"===a&&Number(b)>3){o+=1,_--;continue}if("m"===e[o]&&Number(b)>5){o+=1,this._shiftStep(e,o,d.length),_--,this.leadZeroDateTime&&(a+="0");continue}if("s"===e[o]&&Number(b)>5){o+=1,this._shiftStep(e,o,d.length),_--,this.leadZeroDateTime&&(a+="0");continue}const n=31;if("d"===e[o]&&(Number(b)>3&&this.leadZeroDateTime||Number(t.slice(o,o+2))>n||"/"===t[o+1])){o+=1,this._shiftStep(e,o,d.length),_--,this.leadZeroDateTime&&(a+="0");continue}if("M"===e[o]){const r=12,s=0===o&&(Number(b)>2||Number(t.slice(o,o+2))>r||"/"===t[o+1]),i=t.slice(o-3,o-1).includes("/")&&("/"===t[o-2]&&Number(t.slice(o-1,o+1))>r&&"/"!==t[o]||"/"===t[o]||"/"===t[o-3]&&Number(t.slice(o-2,o))>r&&"/"!==t[o-1]||"/"===t[o-1]),l=Number(t.slice(o-3,o-1))<=n&&!t.slice(o-3,o-1).includes("/")&&"/"===t[o-1]&&(Number(t.slice(o,o+2))>r||"/"===t[o+1]),c=Number(t.slice(o-3,o-1))>n&&!t.slice(o-3,o-1).includes("/")&&!t.slice(o-2,o).includes("/")&&Number(t.slice(o-2,o))>r,u=Number(t.slice(o-3,o-1))<=n&&!t.slice(o-3,o-1).includes("/")&&"/"!==t[o-1]&&Number(t.slice(o-1,o+1))>r;if(Number(b)>1&&this.leadZeroDateTime||s||i||l||c||u){o+=1,this._shiftStep(e,o,d.length),_--,this.leadZeroDateTime&&(a+="0");continue}}a+=b,o++}else-1!==this.maskSpecialCharacters.indexOf(e[o])?(a+=e[o],o++,this._shiftStep(e,o,d.length),_--):this.maskSpecialCharacters.indexOf(b)>-1&&this.maskAvailablePatterns[e[o]]&&this.maskAvailablePatterns[e[o]].optional?(d[o]&&"099.099.099.099"!==e&&"000.000.000-00"!==e&&"00.000.000/0000-00"!==e&&(a+=d[o]),o++,_--):"*"===this.maskExpression[o+1]&&this._findSpecialChar(this.maskExpression[o+2])&&this._findSpecialChar(b)===this.maskExpression[o+2]&&l||"?"===this.maskExpression[o+1]&&this._findSpecialChar(this.maskExpression[o+2])&&this._findSpecialChar(b)===this.maskExpression[o+2]&&l?(o+=3,a+=b):this.showMaskTyped&&this.maskSpecialCharacters.indexOf(b)<0&&b!==this.placeHolderCharacter&&(h=!0);a.length+1===e.length&&-1!==this.maskSpecialCharacters.indexOf(e[e.length-1])&&(a+=e[e.length-1]);let f=n+1;for(;this._shift.has(f);)u++,f++;let g=r?o:this._shift.has(n)?u:0;h&&g--,i(g,c),u<0&&this._shift.clear();let m=!1;s&&(m=d.every(t=>this.maskSpecialCharacters.includes(t)));let y=`${this.prefix}${m?"":a}${this.suffix}`;return 0===a.length&&(y=`${this.prefix}${a}`),y}_findSpecialChar(t){return this.maskSpecialCharacters.find(e=>e===t)}_checkSymbolMask(t,e){return this.maskAvailablePatterns=this.customPattern?this.customPattern:this.maskAvailablePatterns,this.maskAvailablePatterns[e]&&this.maskAvailablePatterns[e].pattern&&this.maskAvailablePatterns[e].pattern.test(t)}_stripToDecimal(t){return t.split("").filter((t,e)=>t.match("^-?\\d")||t.match("\\s")||"."===t||","===t||"-"===t&&0===e&&this.allowNegativeNumbers).join("")}_charToRegExpExpression(t){if(t){const e="[\\^$.|?*+()";return" "===t?"\\s":e.indexOf(t)>=0?"\\"+t:t}return t}_shiftStep(t,e,n){const r=/[*?]/g.test(t.slice(0,e))?n:e;this._shift.add(r+this.prefix.length||0)}}return t.\u0275fac=function(e){return new(e||t)(lr(Cg))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Tg=(()=>{class t{static forRoot(e){return{ngModule:t,providers:[{provide:Sg,useValue:e},{provide:xg,useValue:Eg},{provide:Cg,useFactory:Ag,deps:[xg,Sg]},kg]}}static forChild(){return{ngModule:t}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})();function Ag(t,e){return Object.assign(Object.assign({},t),e instanceof Function?e():e)}const Og="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};Og.KeyboardEvent||(Og.KeyboardEvent=function(t,e){});const Rg=[];let Ig=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[Cf.forRoot(Rg)],Cf]}),t})(),Pg=(()=>{class t{constructor(){this.title="dashboard"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=$t({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(t,e){1&t&&Hi(0,"router-outlet")},directives:[df],encapsulation:2}),t})();function Dg(t,e,n,s){return r(n)&&(s=n,n=void 0),s?Dg(t,e,n).pipe(k(t=>l(t)?s(...t):s(t))):new _(r=>{Mg(t,e,function(t){r.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},r,n)})}function Mg(t,e,n,r,s){let i;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const r=t;t.addEventListener(e,n,s),i=()=>r.removeEventListener(e,n,s)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const r=t;t.on(e,n),i=()=>r.off(e,n)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const r=t;t.addListener(e,n),i=()=>r.removeListener(e,n)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let i=0,o=t.length;i{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class Fg extends Vg{constructor(t,e=Vg.now){super(t,()=>Fg.delegate&&Fg.delegate!==this?Fg.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return Fg.delegate&&Fg.delegate!==this?Fg.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}const Ug=new Fg(jg);function Lg(t){return!l(t)&&t-parseFloat(t)+1>=0}function Hg(t){const{index:e,period:n,subscriber:r}=t;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}class $g{call(t,e){return e.subscribe(new zg(t))}}class zg extends Zu{constructor(t){super(t),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(t){this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(let n=0;nthis.index}hasCompleted(){return this.array.length===this.index}}class Yg extends F{constructor(t,e,n){super(t),this.parent=e,this.observable=n,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[I](){return this}next(){const t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(t){this.buffer.push(t),this.parent.checkIterators()}subscribe(){return U(this.observable,new V(this))}}function Qg(t){return e=>e.lift(new Kg(t))}class Kg{constructor(t){this.notifier=t}call(t,e){const n=new Jg(t),r=U(this.notifier,new V(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n}}class Jg extends F{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function Xg(...t){return e=>{let n;return"function"==typeof t[t.length-1]&&(n=t.pop()),e.lift(new tm(t,n))}}class tm{constructor(t,e){this.observables=t,this.project=e}call(t,e){return e.subscribe(new em(t,this.observables,this.project))}}class em extends Zu{constructor(t,e,n){super(t),this.observables=e,this.project=n,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let s=0;s0){const t=r.indexOf(n);-1!==t&&r.splice(t,1)}}notifyComplete(){}_next(t){if(0===this.toRespond.length){const e=[t,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(t){let e;try{e=this.project.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}function nm(t,e){if(1&t){const t=$i();Ui(0,"button",1),Wi("click",function(){return Pe(t),Zi().close()}),Ui(1,"span",2),mo(2,"\xd7"),Li(),Li()}}const rm=["*"],sm=["dialog"];function im(t){return null!=t}function om(t){return(t||document.body).getBoundingClientRect()}"undefined"==typeof Element||Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){let e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null});const am={animation:!0,transitionTimerDelayMs:5};let lm=(()=>{class t{constructor(){this.animation=am.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();const cm=()=>{},{transitionTimerDelayMs:um}=am,hm=new Map,dm=(t,e,n,r)=>{let s=r.context||{};const i=hm.get(e);if(i)switch(r.runningTransition){case"continue":return nh;case"stop":t.run(()=>i.transition$.complete()),s=Object.assign(i.context,s),hm.delete(e)}const o=n(e,r.animation,s)||cm;if(!r.animation||"none"===window.getComputedStyle(e).transitionProperty)return t.run(()=>o()),qu(void 0).pipe(function(t){return e=>new _(n=>e.subscribe(e=>t.run(()=>n.next(e)),e=>t.run(()=>n.error(e)),()=>t.run(()=>n.complete())))}(t));const a=new S,c=new S,u=a.pipe(function(...t){return e=>eh(e,qu(...t))}(!0));hm.set(e,{transition$:a,complete:()=>{c.next(),c.complete()},context:s});const h=function(t){const{transitionDelay:e,transitionDuration:n}=window.getComputedStyle(t);return 1e3*(parseFloat(e)+parseFloat(n))}(e);return t.runOutsideAngular(()=>{const n=Dg(e,"transitionend").pipe(Qg(u),gh(({target:t})=>t===e));(function(...t){if(1===t.length){if(!l(t[0]))return t[0];t=t[0]}return B(t,void 0).lift(new $g)})(function(t=0,e,n){let r=-1;return Lg(e)?r=Number(e)<1?1:Number(e):E(e)&&(n=e),E(n)||(n=Ug),new _(e=>{const s=Lg(t)?t:+t-n.now();return n.schedule(Hg,s,{index:0,period:r,subscriber:e})})}(h+um).pipe(Qg(u)),n,c).pipe(Qg(u)).subscribe(()=>{hm.delete(e),t.run(()=>{o(),a.next(),a.complete()})})}),a.asObservable()};let pm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),fm=(()=>{class t{constructor(t){this._ngbConfig=t,this.dismissible=!0,this.type="warning"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}return t.\u0275fac=function(e){return new(e||t)(lr(lm))},t.\u0275prov=ut({factory:function(){return new t(lr(lm))},token:t,providedIn:"root"}),t})();const gm=({classList:t})=>{t.remove("show")};let mm=(()=>{class t{constructor(t,e,n,r){this._renderer=e,this._element=n,this._zone=r,this.closed=new Wa,this.dismissible=t.dismissible,this.type=t.type,this.animation=t.animation}close(){const t=dm(this._zone,this._element.nativeElement,gm,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>this.closed.emit()),t}ngOnChanges(t){const e=t.type;e&&!e.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${e.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${e.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}return t.\u0275fac=function(e){return new(e||t)(ji(fm),ji(Wo),ji($o),ji(Ol))},t.\u0275cmp=$t({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert","show"],hostVars:4,hostBindings:function(t,e){2&t&&so("fade",e.animation)("alert-dismissible",e.dismissible)},inputs:{dismissible:"dismissible",type:"type",animation:"animation"},outputs:{closed:"closed"},exportAs:["ngbAlert"],features:[le],ngContentSelectors:rm,decls:2,vars:1,consts:function(){let t;return t=$localize`:@@ngb.alert.close␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`,[["type","button","class","close","aria-label",t,3,"click",4,"ngIf"],["type","button","aria-label",t,1,"close",3,"click"],["aria-hidden","true"]]},template:function(t,e){1&t&&(Qi(),Ki(0),Mi(1,nm,3,0,"button",0)),2&t&&(cs(1),Vi("ngIf",e.dismissible))},directives:[uu],styles:["ngb-alert{display:block}"],encapsulation:2,changeDetection:0}),t})(),ym=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),_m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})(),bm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),vm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})();var wm=function(t){return t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown",t}({});"undefined"!=typeof navigator&&navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));const Cm=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Sm(t){const e=Array.from(t.querySelectorAll(Cm)).filter(t=>-1!==t.tabIndex);return[e[0],e[e.length-1]]}new class{getAllStyles(t){return window.getComputedStyle(t)}getStyle(t,e){return this.getAllStyles(t)[e]}isStaticPositioned(t){return"static"===(this.getStyle(t,"position")||"static")}offsetParent(t){let e=t.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(t,e=!0){let n,r={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(t,"position"))n=t.getBoundingClientRect(),n={top:n.top,bottom:n.bottom,left:n.left,right:n.right,height:n.height,width:n.width};else{const e=this.offsetParent(t);n=this.offset(t,!1),e!==document.documentElement&&(r=this.offset(e,!1)),r.top+=e.clientTop,r.left+=e.clientLeft}return n.top-=r.top,n.bottom-=r.top,n.left-=r.left,n.right-=r.left,e&&(n.top=Math.round(n.top),n.bottom=Math.round(n.bottom),n.left=Math.round(n.left),n.right=Math.round(n.right)),n}offset(t,e=!0){const n=t.getBoundingClientRect(),r=window.pageYOffset-document.documentElement.clientTop,s=window.pageXOffset-document.documentElement.clientLeft;let i={height:n.height||t.offsetHeight,width:n.width||t.offsetWidth,top:n.top+r,bottom:n.bottom+r,left:n.left+s,right:n.right+s};return e&&(i.height=Math.round(i.height),i.width=Math.round(i.width),i.top=Math.round(i.top),i.bottom=Math.round(i.bottom),i.left=Math.round(i.left),i.right=Math.round(i.right)),i}positionElements(t,e,n,r){const[s="top",i="center"]=n.split("-"),o=r?this.offset(t,!1):this.position(t,!1),a=this.getAllStyles(e),l=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),u=parseFloat(a.marginLeft),h=parseFloat(a.marginRight);let d=0,p=0;switch(s){case"top":d=o.top-(e.offsetHeight+l+c);break;case"bottom":d=o.top+o.height;break;case"left":p=o.left-(e.offsetWidth+u+h);break;case"right":p=o.left+o.width}switch(i){case"top":d=o.top;break;case"bottom":d=o.top+o.height-e.offsetHeight;break;case"left":p=o.left;break;case"right":p=o.left+o.width-e.offsetWidth;break;case"center":"top"===s||"bottom"===s?p=o.left+o.width/2-e.offsetWidth/2:d=o.top+o.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(p)}px, ${Math.round(d)}px)`;const f=e.getBoundingClientRect(),g=document.documentElement,m=window.innerHeight||g.clientHeight,y=window.innerWidth||g.clientWidth;return f.left>=0&&f.top>=0&&f.right<=y&&f.bottom<=m}},new Date(1882,10,12),new Date(2174,10,25);let xm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu,wg]]}),t})(),Em=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["",8,"navbar"]]}),t})(),km=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})(),Tm=(()=>{class t{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}return t.\u0275fac=function(e){return new(e||t)(lr(lm))},t.\u0275prov=ut({factory:function(){return new t(lr(lm))},token:t,providedIn:"root"}),t})();class Am{constructor(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}}const Om=()=>{};let Rm=(()=>{class t{constructor(t){this._document=t}compensate(){const t=this._getWidth();return this._isPresent(t)?this._adjustBody(t):Om}_adjustBody(t){const e=this._document.body,n=e.style.paddingRight,r=parseFloat(window.getComputedStyle(e)["padding-right"]);return e.style["padding-right"]=`${r+t}px`,()=>e.style["padding-right"]=n}_isPresent(t){const e=this._document.body.getBoundingClientRect();return window.innerWidth-(e.left+e.right)>=t-.1*t}_getWidth(){const t=this._document.createElement("div");t.className="modal-scrollbar-measure";const e=this._document.body;e.appendChild(t);const n=t.getBoundingClientRect().width-t.clientWidth;return e.removeChild(t),n}}return t.\u0275fac=function(e){return new(e||t)(lr(ac))},t.\u0275prov=ut({factory:function(){return new t(lr(ac))},token:t,providedIn:"root"}),t})(),Im=(()=>{class t{constructor(t,e){this._el=t,this._zone=e}ngOnInit(){this._zone.onStable.asObservable().pipe(ch(1)).subscribe(()=>{dm(this._zone,this._el.nativeElement,(t,e)=>{e&&om(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return dm(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(ji($o),ji(Ol))},t.\u0275cmp=$t({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(t,e){2&t&&(io("modal-backdrop"+(e.backdropClass?" "+e.backdropClass:"")),so("show",!e.animation)("fade",e.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();class Pm{close(t){}dismiss(t){}}class Dm{constructor(t,e,n,r){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=r,this._closed=new S,this._dismissed=new S,this._hidden=new S,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Qg(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Qg(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();e&&e.then?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():qu(void 0);t.subscribe(()=>{const{nativeElement:t}=this._windowCmptRef.location;t.parentNode.removeChild(t),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:t}=this._backdropCmptRef.location;t.parentNode.removeChild(t),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),Bg(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var Mm=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}({});let Nm=(()=>{class t{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new S,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new Wa,this.shown=new S,this.hidden=new S}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement}ngAfterViewInit(){this._show()}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,e={animation:this.animation,runningTransition:"stop"},n=Bg(dm(this._zone,t,()=>t.classList.remove("show"),e),dm(this._zone,this._dialogEl.nativeElement,()=>{},e));return n.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),n}_show(){const t={animation:this.animation,runningTransition:"continue"};Bg(dm(this._zone,this._elRef.nativeElement,(t,e)=>{e&&om(t),t.classList.add("show")},t),dm(this._zone,this._dialogEl.nativeElement,()=>{},t)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{Dg(t,"keydown").pipe(Qg(this._closed$),gh(t=>t.which===wm.Escape)).subscribe(t=>{this.keyboard?requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(Mm.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let e=!1;Dg(this._dialogEl.nativeElement,"mousedown").pipe(Qg(this._closed$),Mh(()=>e=!1),ih(()=>Dg(t,"mouseup").pipe(Qg(this._closed$),ch(1))),gh(({target:e})=>t===e)).subscribe(()=>{e=!0}),Dg(t,"click").pipe(Qg(this._closed$)).subscribe(({target:n})=>{t===n&&("static"===this.backdrop?this._bumpBackdrop():!0!==this.backdrop||e||this._zone.run(()=>this.dismiss(Mm.BACKDROP_CLICK))),e=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=Sm(t)[0];(e||n||t).focus()}}_restoreFocus(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&dm(this._zone,this._elRef.nativeElement,({classList:t})=>(t.add("modal-static"),()=>t.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(ji(ac),ji($o),ji(Ol))},t.\u0275cmp=$t({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(t,e){if(1&t&&sl(sm,3),2&t){let t;rl(t=il())&&(e._dialogEl=t.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(t,e){2&t&&(Di("aria-modal",!0)("aria-labelledby",e.ariaLabelledBy)("aria-describedby",e.ariaDescribedBy),io("modal d-block"+(e.windowClass?" "+e.windowClass:"")),so("fade",e.animation))},inputs:{backdrop:"backdrop",keyboard:"keyboard",animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:rm,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(t,e){1&t&&(Qi(),Ui(0,"div",0,1),Ui(2,"div",2),Ki(3),Li(),Li()),2&t&&io("modal-dialog"+(e.size?" modal-"+e.size:"")+(e.centered?" modal-dialog-centered":"")+(e.scrollable?" modal-dialog-scrollable":"")+(e.modalDialogClass?" "+e.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}"],encapsulation:2}),t})(),jm=(()=>{class t{constructor(t,e,n,r,s,i){this._applicationRef=t,this._injector=e,this._document=n,this._scrollBar=r,this._rendererFactory=s,this._ngZone=i,this._activeWindowCmptHasChanged=new S,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRefs=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass"],this._windowCmpts=[],this._activeInstances=new Wa,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const t=this._windowCmpts[this._windowCmpts.length-1];((t,e,n,r=!1)=>{this._ngZone.runOutsideAngular(()=>{const t=Dg(e,"focusin").pipe(Qg(n),k(t=>t.target));Dg(e,"keydown").pipe(Qg(n),gh(t=>t.which===wm.Tab),Xg(t)).subscribe(([t,n])=>{const[r,s]=Sm(e);n!==r&&n!==e||!t.shiftKey||(s.focus(),t.preventDefault()),n!==s||t.shiftKey||(r.focus(),t.preventDefault())}),r&&Dg(e,"click").pipe(Qg(n),Xg(t),k(t=>t[1])).subscribe(t=>t.focus())})})(0,t.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(t.location.nativeElement)}})}open(t,e,n,r){const s=r.container instanceof HTMLElement?r.container:im(r.container)?this._document.querySelector(r.container):this._document.body,i=this._rendererFactory.createRenderer(null,null),o=this._scrollBar.compensate(),a=()=>{this._modalRefs.length||(i.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!s)throw new Error(`The specified modal container "${r.container||"body"}" was not found in the DOM.`);const l=new Pm,c=this._getContentRef(t,r.injector||e,n,l,r);let u=!1!==r.backdrop?this._attachBackdrop(t,s):void 0,h=this._attachWindowComponent(t,s,c),d=new Dm(h,c,u,r.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(h),d.result.then(o,o),d.result.then(a,a),l.close=t=>{d.close(t)},l.dismiss=t=>{d.dismiss(t)},this._applyWindowOptions(h.instance,r),1===this._modalRefs.length&&i.addClass(this._document.body,"modal-open"),u&&u.instance&&this._applyBackdropOptions(u.instance,r),d}get activeInstances(){return this._activeInstances}dismissAll(t){this._modalRefs.forEach(e=>e.dismiss(t))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(t,e){let n=t.resolveComponentFactory(Im).create(this._injector);return this._applicationRef.attachView(n.hostView),e.appendChild(n.location.nativeElement),n}_attachWindowComponent(t,e,n){let r=t.resolveComponentFactory(Nm).create(this._injector,n.nodes);return this._applicationRef.attachView(r.hostView),e.appendChild(r.location.nativeElement),r}_applyWindowOptions(t,e){this._windowAttributes.forEach(n=>{im(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){this._backdropAttributes.forEach(n=>{im(e[n])&&(t[n]=e[n])})}_getContentRef(t,e,n,r,s){return n?n instanceof ba?this._createFromTemplateRef(n,r):"string"==typeof n?this._createFromString(n):this._createFromComponent(t,e,n,r,s):new Am([])}_createFromTemplateRef(t,e){const n=t.createEmbeddedView({$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}});return this._applicationRef.attachView(n),new Am([n.rootNodes],n)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new Am([[e]])}_createFromComponent(t,e,n,r,s){const i=t.resolveComponentFactory(n),o=_i.create({providers:[{provide:Pm,useValue:r}],parent:e}),a=i.create(o),l=a.location.nativeElement;return s.scrollable&&l.classList.add("component-host-scrollable"),this._applicationRef.attachView(a.hostView),new Am([[l]],a.hostView,a)}_setAriaHidden(t){const e=t.parentElement;e&&t!==this._document.body&&(Array.from(e.children).forEach(e=>{e!==t&&"SCRIPT"!==e.nodeName&&(this._ariaHiddenValues.set(e,e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}),this._setAriaHidden(e))}_revertAriaHidden(){this._ariaHiddenValues.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(t){const e=()=>{const e=this._modalRefs.indexOf(t);e>-1&&(this._modalRefs.splice(e,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(t),this._activeInstances.emit(this._modalRefs),t.result.then(e,e)}_registerWindowCmpt(t){this._windowCmpts.push(t),this._activeWindowCmptHasChanged.next(),t.onDestroy(()=>{const e=this._windowCmpts.indexOf(t);e>-1&&(this._windowCmpts.splice(e,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(lr(Yl),lr(_i),lr(ac),lr(Rm),lr(Bo),lr(Ol))},t.\u0275prov=ut({factory:function(){return new t(lr(Yl),lr(ni),lr(ac),lr(Rm),lr(Bo),lr(Ol))},token:t,providedIn:"root"}),t})(),Vm=(()=>{class t{constructor(t,e,n,r){this._moduleCFR=t,this._injector=e,this._modalStack=n,this._config=r}open(t,e={}){const n=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),e);return this._modalStack.open(this._moduleCFR,this._injector,t,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(t){this._modalStack.dismissAll(t)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(lr(Fo),lr(_i),lr(jm),lr(Tm))},t.\u0275prov=ut({factory:function(){return new t(lr(Fo),lr(ni),lr(jm),lr(Tm))},token:t,providedIn:"root"}),t})(),Fm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({providers:[Vm]}),t})(),Um=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),Lm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),Hm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),$m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),zm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),Bm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),Wm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})(),qm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({}),t})();new Bn("live announcer delay",{providedIn:"root",factory:function(){return 100}});let Gm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[[fu]]}),t})();const Zm=[pm,ym,_m,bm,vm,xm,km,Fm,Um,Lm,Hm,$m,zm,Bm,Wm,qm,Gm];let Ym=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({imports:[Zm,pm,ym,_m,bm,vm,xm,km,Fm,Um,Lm,Hm,$m,zm,Bm,Wm,qm,Gm]}),t})();function Qm(t){const{subscriber:e,counter:n,period:r}=t;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}class Km{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new Jm(t,this.dueTime,this.scheduler))}}class Jm extends f{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Xm,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function Xm(t){t.debouncedNext()}let ty=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){}save(){this.activeModal.close(this.rewindDate)}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-rewind-modal"]],inputs:{groupId:"groupId",consumerName:"consumerName"},decls:23,vars:3,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","rewindDate"],[1,"input-group"],["id","rewindDate","placeholder","yyyy-mm-dd hh:MM:ss","type","datetime-local",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Rewind consumers offset"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"label",6),mo(9,"Select the datetime to rewind all the partition-offsets of consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),mo(15,"' "),Li(),Ui(16,"div",7),Ui(17,"input",8),Wi("ngModelChange",function(t){return e.rewindDate=t}),Li(),Li(),Li(),Li(),Ui(18,"div",9),Ui(19,"button",10),Wi("click",function(){return e.activeModal.dismiss()}),mo(20,"Cancel"),Li(),Ui(21,"button",11),Wi("click",function(){return e.save()}),mo(22,"OK"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,""),cs(3),Vi("ngModel",e.rewindDate))},directives:[jf,Kf,mg],encapsulation:2}),t})(),ey=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){this.oldWorkersCount=this.workersCount}save(){this.activeModal.close(this.workersCount)}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-workers-count-modal"]],inputs:{workersCount:"workersCount",groupId:"groupId",consumerName:"consumerName"},decls:28,vars:4,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","oldWorkersCount"],[1,"input-group","mb-2"],["id","oldWorkersCount","type","number","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","workersCount"],[1,"input-group"],["id","workersCount","type","number",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Consumer workers running"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"label"),mo(9,"Update the number of workers in consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),Li(),Ui(15,"label",6),mo(16,"Current Value"),Li(),Ui(17,"div",7),Ui(18,"input",8),Wi("ngModelChange",function(t){return e.oldWorkersCount=t}),Li(),Li(),Ui(19,"label",9),mo(20,"New Value"),Li(),Ui(21,"div",10),Ui(22,"input",11),Wi("ngModelChange",function(t){return e.workersCount=t}),Li(),Li(),Li(),Li(),Ui(23,"div",12),Ui(24,"button",13),Wi("click",function(){return e.activeModal.dismiss()}),mo(25,"Cancel"),Li(),Ui(26,"button",14),Wi("click",function(){return e.save()}),mo(27,"OK"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,"'"),cs(4),Vi("ngModel",e.oldWorkersCount),cs(4),Vi("ngModel",e.workersCount))},directives:[_g,jf,Kf,mg],encapsulation:2}),t})(),ny=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-reset-modal"]],inputs:{groupId:"groupId",consumerName:"consumerName"},decls:23,vars:2,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],[1,"mt-3"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Reset consumers offset"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"span"),mo(9,"Reset the offset you generate a huge lag to consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),mo(15,"'. "),Li(),Ui(16,"h5",6),mo(17,"Are you really sure about it?"),Li(),Li(),Li(),Ui(18,"div",7),Ui(19,"button",8),Wi("click",function(){return e.activeModal.dismiss()}),mo(20,"No, cancel"),Li(),Ui(21,"button",9),Wi("click",function(){return e.activeModal.close()}),mo(22,"Yes"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,""))},encapsulation:2}),t})(),ry=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-pause-modal"]],inputs:{groupId:"groupId",consumerName:"consumerName"},decls:23,vars:2,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],[1,"mt-3"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Pause consumers"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"span"),mo(9,"Pause the consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),mo(15,"' will interrupt the kafka data processing and, probably, generate lag. "),Li(),Ui(16,"h5",6),mo(17,"Are you really sure about it?"),Li(),Li(),Li(),Ui(18,"div",7),Ui(19,"button",8),Wi("click",function(){return e.activeModal.dismiss()}),mo(20,"No, cancel"),Li(),Ui(21,"button",9),Wi("click",function(){return e.activeModal.close()}),mo(22,"Yes"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,""))},encapsulation:2}),t})(),sy=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-resume-modal"]],inputs:{groupId:"groupId",consumerName:"consumerName"},decls:23,vars:2,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],[1,"mt-3"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Resume consumers"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"span"),mo(9,"Resume the consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),mo(15,"' will restart to process the messages. "),Li(),Ui(16,"h5",6),mo(17,"Are you really sure about it?"),Li(),Li(),Li(),Ui(18,"div",7),Ui(19,"button",8),Wi("click",function(){return e.activeModal.dismiss()}),mo(20,"No, cancel"),Li(),Ui(21,"button",9),Wi("click",function(){return e.activeModal.close()}),mo(22,"Yes"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,""))},encapsulation:2}),t})(),iy=(()=>{class t{constructor(t){this.activeModal=t}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(ji(Pm))},t.\u0275cmp=$t({type:t,selectors:[["app-restart-modal"]],inputs:{groupId:"groupId",consumerName:"consumerName"},decls:23,vars:2,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],[1,"mt-3"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],["type","button",1,"btn","btn-success",3,"click"]],template:function(t,e){1&t&&(Ui(0,"div",0),Ui(1,"h4",1),mo(2,"Restart consumers"),Li(),Ui(3,"button",2),Wi("click",function(){return e.activeModal.dismiss()}),Ui(4,"span",3),mo(5,"\xd7"),Li(),Li(),Li(),Ui(6,"div",4),Ui(7,"div",5),Ui(8,"span"),mo(9,"Restart the consumers "),Ui(10,"b"),mo(11),Li(),mo(12," from group id "),Ui(13,"b"),mo(14),Li(),mo(15,"' will can generate a temporary instability in your system. "),Li(),Ui(16,"h5",6),mo(17,"Are you really sure about it?"),Li(),Li(),Li(),Ui(18,"div",7),Ui(19,"button",8),Wi("click",function(){return e.activeModal.dismiss()}),mo(20,"No, cancel"),Li(),Ui(21,"button",9),Wi("click",function(){return e.activeModal.close()}),mo(22,"Yes"),Li(),Li()),2&t&&(cs(11),_o("'",e.consumerName,"'"),cs(3),_o("'",e.groupId,""))},encapsulation:2}),t})(); /** * @license Angular v11.2.11 * (c) 2010-2021 Google LLC. https://angular.io/ @@ -1510,11 +1510,11 @@ const ky=/^\)\]\}',?\n/;class Ty{}let Ay=(()=>{class t{constructor(){}build(){re * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -const Ry=new Bn("XSRF_COOKIE_NAME"),Iy=new Bn("XSRF_HEADER_NAME");class Py{}let Dy=(()=>{class t{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=iu(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(lr(ac),lr(fl),lr(Ry))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Ny=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const r=this.tokenService.getToken();return null===r||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,r)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(lr(Py),lr(Iy))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),My=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(xy,[]);this.chain=t.reduceRight((t,e)=>new Sy(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(lr(ay),lr(_i))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),jy=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:Ny,useClass:Ey}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Ry,useValue:e.cookieName}:[],e.headerName?{provide:Iy,useValue:e.headerName}:[]]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({providers:[Ny,{provide:xy,useExisting:Ny,multi:!0},{provide:Py,useClass:Dy},{provide:Ry,useValue:"XSRF-TOKEN"},{provide:Iy,useValue:"X-XSRF-TOKEN"}]}),t})(),Vy=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({providers:[Cy,{provide:oy,useClass:My},Oy,{provide:ay,useExisting:Oy},Ay,{provide:Ty,useExisting:Ay}],imports:[[jy.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})(),Fy=(()=>{class t{constructor(t){this.http=t,this.accessPointUrl="/kafka-flow",this.headers=new ly({"Content-Type":"application/json; charset=utf-8"})}get(){return this.http.get(this.accessPointUrl+"/telemetry",{headers:this.headers})}updateWorkersCount(t,e,n){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/change-worker-count`,{workersCount:n},{headers:this.headers})}resetOffset(t,e){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/reset-offsets`,{confirm:!0},{headers:this.headers})}pause(t,e){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/pause`,null,{headers:this.headers})}restart(t,e){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/restart`,null,{headers:this.headers})}resume(t,e){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/resume`,null,{headers:this.headers})}rewindOffset(t,e,n){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/rewind-offsets-to-date`,{date:new Date(n.getTime()-6e4*n.getTimezoneOffset()).toISOString()},{headers:this.headers})}}return t.\u0275fac=function(e){return new(e||t)(lr(Cy))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Uy=(()=>{class t{transform(t,e){return t&&e?t.filter(t=>e(t)):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Yt({name:"callback",type:t,pure:!1}),t})(),Ly=(()=>{class t{transform(t,e){if(!t)return null;const n=t.reduce((t,n)=>(t[n[e]]?t[n[e]].push(n):t[n[e]]=[n],t),{});return Object.keys(n).map(t=>({key:t,value:n[t]}))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Yt({name:"groupBy",type:t,pure:!0}),t})(),Hy=(()=>{class t{transform(t,e,n="asc"){return"asc"!=(n=n.toLowerCase())&&"desc"!=n?t:Array.isArray(t)?(t.sort((t,r)=>t[e]r[e]?"asc"==n?1:-1:0),t):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Yt({name:"sort",type:t,pure:!0}),t})();const $y=["successAlert"];function zy(t,e){if(1&t){const t=$i();Ui(0,"ngb-alert",2,3),Wi("closed",function(){return Pe(t),Zi().successMessage=""}),Ui(2,"div",4),Ui(3,"b"),mo(4,"Success! "),Li(),Ui(5,"span",4),mo(6),Li(),Li(),Li()}if(2&t){const t=Zi();cs(6),yo(t.successMessage)}}function By(t,e){if(1&t){const t=$i();Ui(0,"button",18),Wi("click",function(){Pe(t);const e=Zi().$implicit,n=Zi().$implicit;return Zi().openResumeModal(n.groupId,e.consumerName)}),mo(1,"Resume"),Li()}}function Wy(t,e){if(1&t){const t=$i();Ui(0,"button",19),Wi("click",function(){Pe(t);const e=Zi().$implicit,n=Zi().$implicit;return Zi().openPauseModal(n.groupId,e.consumerName)}),mo(1,"Pause"),Li()}}function qy(t,e){1&t&&Hi(0,"div")}function Gy(t,e){1&t&&(Ui(0,"span"),mo(1,"-"),Li())}function Zy(t,e){1&t&&(Ui(0,"span",27),mo(1,"Paused"),Li())}function Yy(t,e){if(1&t&&(Ui(0,"tr"),Ui(1,"td",23),mo(2),Li(),Ui(3,"td",23),mo(4),Li(),Ui(5,"td",23),Ni(6,qy,1,0,"div",24),Ni(7,Gy,2,0,"ng-template",null,25,al),Ni(9,Zy,2,0,"ng-template",null,26,al),Li(),Ui(11,"td",23),Ui(12,"span",9),mo(13),$a(14,"date"),Li(),Li(),Li()),2&t){const t=Mi(8),e=Mi(10),n=Zi().$implicit;cs(2),yo(n.instanceName),cs(2),yo(n.pausedPartitions),cs(2),Vi("ngIf",n.isLost)("ngIfThen",t)("ngIfElse",e),cs(6),Vi("ngClass",n.isLost?"text-secondary":"text-success"),cs(1),yo(za(14,7,n.lastUpdate,"medium"))}}function Qy(t,e){1&t&&Hi(0,"div")}function Ky(t,e){1&t&&(Ui(0,"span"),mo(1,"-"),Li())}function Jy(t,e){1&t&&(Ui(0,"span",28),mo(1,"Running"),Li())}function Xy(t,e){if(1&t&&(Ui(0,"tr"),Ui(1,"td",23),mo(2),Li(),Ui(3,"td",23),mo(4),Li(),Ui(5,"td",23),Ni(6,Qy,1,0,"div",24),Ni(7,Ky,2,0,"ng-template",null,25,al),Ni(9,Jy,2,0,"ng-template",null,26,al),Li(),Ui(11,"td",23),Ui(12,"span",9),mo(13),$a(14,"date"),Li(),Li(),Li()),2&t){const t=Mi(8),e=Mi(10),n=Zi().$implicit;cs(2),yo(n.hostName),cs(2),yo(n.runningPartitions),cs(2),Vi("ngIf",n.isLost)("ngIfThen",t)("ngIfElse",e),cs(6),Vi("ngClass",n.isLost?"text-secondary":"text-success"),cs(1),yo(za(14,7,n.lastUpdate,"medium"))}}function t_(t,e){if(1&t&&(Ni(0,Yy,15,10,"ng-template",22),Ni(1,Xy,15,10,"ng-template",22)),2&t){const t=e.$implicit;Vi("ngIf",(null==t.pausedPartitions?null:t.pausedPartitions.length)>0),cs(1),Vi("ngIf",(null==t.runningPartitions?null:t.runningPartitions.length)>0)}}function e_(t,e){if(1&t&&(Ui(0,"p",20),mo(1),Li(),Ui(2,"table",21),Ui(3,"thead"),Ui(4,"tr"),Ui(5,"th"),mo(6,"Hostname - consumer instance"),Li(),Ui(7,"th"),mo(8,"Partitions"),Li(),Ui(9,"th"),mo(10,"Status"),Li(),Ui(11,"th"),mo(12,"LastUpdate"),Li(),Li(),Li(),Ui(13,"tbody"),Ni(14,t_,2,2,"ng-template",17),$a(15,"sort"),Li(),Li()),2&t){const t=e.$implicit;cs(1),_o("Topic: ",t.key,""),cs(13),Vi("ngForOf",za(15,2,t.value,"instanceName"))}}const n_=function(t,e,n){return{"text-success":t,"text-warning":e,"text-danger":n}};function r_(t,e){if(1&t){const t=$i();Ui(0,"div"),Ui(1,"h4"),mo(2),Li(),Ui(3,"h4"),mo(4,"Status: "),Ui(5,"span",9),mo(6),Li(),Li(),Ui(7,"h4"),mo(8),Li(),Ui(9,"div",10),Ni(10,By,2,0,"button",11),Ni(11,Wy,2,0,"button",12),Ui(12,"button",13),Wi("click",function(){Pe(t);const n=e.$implicit,r=Zi().$implicit;return Zi().openRestartModal(r.groupId,n.consumerName)}),mo(13,"Restart"),Li(),Ui(14,"button",14),Wi("click",function(){Pe(t);const n=e.$implicit,r=Zi().$implicit;return Zi().openRewindModal(r.groupId,n.consumerName)}),mo(15,"Rewind Offset"),Li(),Ui(16,"button",15),Wi("click",function(){Pe(t);const n=e.$implicit,r=Zi().$implicit;return Zi().openResetModal(r.groupId,n.consumerName)}),mo(17,"Reset Offset"),Li(),Ui(18,"button",16),Wi("click",function(){Pe(t);const n=e.$implicit,r=Zi().$implicit;return Zi().openWorkersCountModal(r.groupId,n.consumerName,n.workersCount)}),mo(19,"Update number of workers"),Li(),Li(),Ni(20,e_,16,5,"ng-template",17),$a(21,"groupBy"),Hi(22,"hr"),Li()}if(2&t){const t=e.$implicit;cs(2),_o("Consumer: ",t.consumerName,""),cs(3),Vi("ngClass",(n=10,r=n_,s="Running"==t.status,i="Paused"==t.status,o="Not Running"==t.status,function(t,e,n,r,s,i,o,a){const l=e+n;return function(t,e,n,r,s){const i=Pi(t,e,n,r);return Ii(t,e+2,s)||i}(t,l,s,i,o)?Ri(t,l+3,a?r.call(a,s,i,o):r(s,i,o)):Ha(t,l+3)}(Re(),Le(),n,r,s,i,o,a))),cs(1),yo(t.status),cs(2),_o("Workers: ",t.workersCount,""),cs(2),Vi("ngIf","Paused"==t.status),cs(1),Vi("ngIf","Running"==t.status),cs(9),Vi("ngForOf",za(21,7,t.partitionAssignments,"topic"))}var n,r,s,i,o,a}function s_(t,e){if(1&t&&(Ui(0,"div",5),Ui(1,"div",6),Ui(2,"div",7),Ui(3,"h3"),mo(4),Li(),Ni(5,r_,23,14,"div",8),Li(),Li(),Li()),2&t){const t=e.$implicit;cs(4),_o("Group Id: ",t.groupId,""),cs(1),Vi("ngForOf",t.consumers)}}let i_=(()=>{class t{constructor(t,e){this.modalService=t,this.consumerService=e,this.groups=[],this.successSubject=new S,this.delayMs=1e3,this.successMessage="",function(t=0,e=Ug){return(!Lg(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=Ug),new _(n=>(n.add(e.schedule(Qm,t,{subscriber:n,counter:0,period:t})),n))}(1e3).subscribe(t=>e.get().subscribe(t=>this.groups=this.enrichGroups(t)))}enrichGroups(t){var e=this;return t.forEach(function(t){t.consumers.forEach(function(t){t.status=t.partitionAssignments.some(t=>{var n;return(null===(n=t.runningPartitions)||void 0===n?void 0:n.length)>0&&e.isActive(t.lastUpdate)})?"Running":t.partitionAssignments.some(t=>{var n;return(null===(n=t.pausedPartitions)||void 0===n?void 0:n.length)>0&&e.isActive(t.lastUpdate)})?"Paused":"Not Running",t.partitionAssignments.forEach(t=>t.isLost=!e.isActive(t.lastUpdate))})}),t}isActive(t){return Math.abs(((new Date).getTime()-new Date(t).getTime())/1e3)<5}removeReadonly(t){return!(1==t.consumers[0].managementDisabled)}openWorkersCountModal(t,e,n){const r=this.modalService.open(ey);r.componentInstance.groupId=t,r.componentInstance.consumerName=e,r.componentInstance.workersCount=n,r.result.then(n=>{this.consumerService.updateWorkersCount(t,e,n).subscribe({next:t=>this.successSubject.next("The number of workers was updated successfully")})})}openResetModal(t,e){const n=this.modalService.open(ny);n.componentInstance.groupId=t,n.componentInstance.consumerName=e,n.result.then(n=>{this.consumerService.resetOffset(t,e).subscribe(t=>this.successSubject.next("The partition-offsets of your consumer were reseted successfully"))})}openPauseModal(t,e){const n=this.modalService.open(ry);n.componentInstance.groupId=t,n.componentInstance.consumerName=e,n.result.then(n=>{this.consumerService.pause(t,e).subscribe(t=>this.successSubject.next("Your consumer was paused successfully"))})}openRestartModal(t,e){const n=this.modalService.open(iy);n.componentInstance.groupId=t,n.componentInstance.consumerName=e,n.result.then(n=>{this.consumerService.restart(t,e).subscribe(t=>this.successSubject.next("Your consumer was restarted successfully"))})}openResumeModal(t,e){const n=this.modalService.open(sy);n.componentInstance.groupId=t,n.componentInstance.consumerName=e,n.result.then(n=>{this.consumerService.resume(t,e).subscribe(t=>this.successSubject.next("Your consumer was resumed successfully"))})}openRewindModal(t,e){const n=this.modalService.open(ty);n.componentInstance.consumerName=e,n.componentInstance.groupId=t,n.result.then(n=>{this.consumerService.rewindOffset(t,e,new Date(n)).subscribe(t=>this.successSubject.next("The partition-offset of your consumer were rewinded successfully"))})}ngOnInit(){this.successSubject.subscribe(t=>this.successMessage=t),this.successSubject.pipe(function(t,e=Ug){return n=>n.lift(new Km(t,e))}(5e3)).subscribe(()=>{var t;null===(t=this.successAlert)||void 0===t||t.close()})}}return t.\u0275fac=function(e){return new(e||t)(ji(Vm),ji(Fy))},t.\u0275cmp=$t({type:t,selectors:[["app-consumer"]],viewQuery:function(t,e){if(1&t&&sl($y,1),2&t){let t;rl(t=il())&&(e.successAlert=t.first)}},decls:3,vars:5,consts:[["type","success",3,"closed",4,"ngIf"],["class","container",4,"ngFor","ngForOf"],["type","success",3,"closed"],["successAlert",""],[1,"text-center"],[1,"container"],[1,"card","my-3"],[1,"card-body"],[4,"ngFor","ngForOf"],[3,"ngClass"],[1,"mt-3","mb-3"],["class","btn btn-outline-success","type","button",3,"click",4,"ngIf"],["class","btn btn-outline-warning ml-2","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger","ml-2",3,"click"],["type","button",1,"btn","btn-outline-info","ml-2",3,"click"],["type","button",1,"btn","btn-outline-secondary","ml-2",3,"click"],["type","button",1,"btn","btn-outline-success","ml-2",3,"click"],["ngFor","",3,"ngForOf"],["type","button",1,"btn","btn-outline-success",3,"click"],["type","button",1,"btn","btn-outline-warning","ml-2",3,"click"],[1,"mb-0","font-weight-bold"],[1,"table","table-striped","table-hover","mt-1"],[3,"ngIf"],[1,"text-left"],[4,"ngIf","ngIfThen","ngIfElse"],["consumer_lost",""],["consumer_on",""],[1,"font-weight-bold","text-warning"],[1,"font-weight-bold","text-success"]],template:function(t,e){1&t&&(Ni(0,zy,7,1,"ngb-alert",0),Ni(1,s_,6,2,"div",1),$a(2,"callback")),2&t&&(Vi("ngIf",e.successMessage),cs(1),Vi("ngForOf",za(2,2,e.enrichGroups(e.groups),e.removeReadonly)))},directives:[uu,lu,mm,ou],pipes:[Uy,Ly,Hy,pu],encapsulation:2}),t})(),o_=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=$t({type:t,selectors:[["app-home"]],decls:12,vars:0,consts:[[1,"navbar","navbar-expand-lg","navbar-light","bg-light"],[1,"container-fluid"],["href","#",1,"navbar-brand"],["type","button","data-bs-toggle","collapse","data-bs-target","#navbarSupportedContent","aria-controls","navbarSupportedContent","aria-expanded","false","aria-label","Toggle navigation",1,"navbar-toggler"],[1,"navbar-toggler-icon"],["id","navbarSupportedContent",1,"collapse","navbar-collapse"],[1,"navbar-nav","me-auto","mb-2","mb-lg-0"],[1,"nav-item"],["aria-current","page","href","#",1,"nav-link","active"]],template:function(t,e){1&t&&(Ui(0,"nav",0),Ui(1,"div",1),Ui(2,"a",2),mo(3,"KafkaFlow - Dashboard"),Li(),Ui(4,"button",3),Hi(5,"span",4),Li(),Ui(6,"div",5),Ui(7,"ul",6),Ui(8,"li",7),Ui(9,"a",8),mo(10,"Consumers"),Li(),Li(),Li(),Li(),Li(),Li(),Hi(11,"app-consumer"))},directives:[Em,i_],encapsulation:2}),t})();class a_{constructor(t,e){this.count=t,this.source=e}call(t,e){return e.subscribe(new l_(t,this.count,this.source))}}class l_ extends f{constructor(t,e,n){super(t),this.count=e,this.source=n}error(t){if(!this.isStopped){const{source:e,count:n}=this;if(0===n)return super.error(t);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}}}class c_{intercept(t,e){return e.handle(t).pipe(function(t=-1){return e=>e.lift(new a_(t,e))}(1),_h(t=>{let e="";return e=t.error instanceof ErrorEvent?`Error: ${t.error.message}`:`Error Code: ${t.status}\nMessage: ${t.message}`,console.error(e),function(t,e){return new _(e=>e.error(t))}(e)}))}}const u_={validation:!1},h_=[{path:"",component:o_}];let d_=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t,bootstrap:[Pg]}),t.\u0275inj=ht({providers:[Fy,{provide:xy,useClass:c_,multi:!0}],imports:[[Wu,Ig,Cf.forRoot(h_),Vy,wg,Ym,Tg.forRoot(u_)],Cf]}),t})();(function(){if($l)throw new Error("Cannot enable prod mode after platform setup.");Hl=!1} +const Ry=new Bn("XSRF_COOKIE_NAME"),Iy=new Bn("XSRF_HEADER_NAME");class Py{}let Dy=(()=>{class t{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=iu(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(lr(ac),lr(fl),lr(Ry))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),My=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const r=this.tokenService.getToken();return null===r||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,r)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(lr(Py),lr(Iy))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Ny=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(xy,[]);this.chain=t.reduceRight((t,e)=>new Sy(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(lr(ay),lr(_i))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),jy=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:My,useClass:Ey}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Ry,useValue:e.cookieName}:[],e.headerName?{provide:Iy,useValue:e.headerName}:[]]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({providers:[My,{provide:xy,useExisting:My,multi:!0},{provide:Py,useClass:Dy},{provide:Ry,useValue:"XSRF-TOKEN"},{provide:Iy,useValue:"X-XSRF-TOKEN"}]}),t})(),Vy=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t}),t.\u0275inj=ht({providers:[Cy,{provide:oy,useClass:Ny},Oy,{provide:ay,useExisting:Oy},Ay,{provide:Ty,useExisting:Ay}],imports:[[jy.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})(),Fy=(()=>{class t{constructor(t){this.http=t,this.accessPointUrl="/kafka-flow",this.headers=new ly({"Content-Type":"application/json; charset=utf-8"})}get(){return this.http.get(this.accessPointUrl+"/telemetry",{headers:this.headers})}updateWorkersCount(t,e,n){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/change-worker-count`,{workersCount:n},{headers:this.headers})}resetOffset(t,e){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/reset-offsets`,{confirm:!0},{headers:this.headers})}pause(t,e){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/pause`,null,{headers:this.headers})}restart(t,e){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/restart`,null,{headers:this.headers})}resume(t,e){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/resume`,null,{headers:this.headers})}rewindOffset(t,e,n){return this.http.post(this.accessPointUrl+`/groups/${t}/consumers/${e}/rewind-offsets-to-date`,{date:new Date(n.getTime()-6e4*n.getTimezoneOffset()).toISOString()},{headers:this.headers})}}return t.\u0275fac=function(e){return new(e||t)(lr(Cy))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Uy=(()=>{class t{transform(t,e){if(!t)return null;const n=t.reduce((t,n)=>(t[n[e]]?t[n[e]].push(n):t[n[e]]=[n],t),{});return Object.keys(n).map(t=>({key:t,value:n[t]}))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Yt({name:"groupBy",type:t,pure:!0}),t})(),Ly=(()=>{class t{transform(t,e,n="asc"){return"asc"!=(n=n.toLowerCase())&&"desc"!=n?t:Array.isArray(t)?(t.sort((t,r)=>t[e]r[e]?"asc"==n?1:-1:0),t):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Yt({name:"sort",type:t,pure:!0}),t})();const Hy=["successAlert"];function $y(t,e){if(1&t){const t=$i();Ui(0,"ngb-alert",2,3),Wi("closed",function(){return Pe(t),Zi().successMessage=""}),Ui(2,"div",4),Ui(3,"b"),mo(4,"Success! "),Li(),Ui(5,"span",4),mo(6),Li(),Li(),Li()}if(2&t){const t=Zi();cs(6),yo(t.successMessage)}}function zy(t,e){if(1&t){const t=$i();Ui(0,"button",18),Wi("click",function(){Pe(t);const e=Zi().$implicit,n=Zi().$implicit;return Zi().openResumeModal(n.groupId,e.name)}),mo(1,"Resume"),Li()}}function By(t,e){if(1&t){const t=$i();Ui(0,"button",19),Wi("click",function(){Pe(t);const e=Zi().$implicit,n=Zi().$implicit;return Zi().openPauseModal(n.groupId,e.name)}),mo(1,"Pause"),Li()}}function Wy(t,e){1&t&&Hi(0,"div")}function qy(t,e){1&t&&(Ui(0,"span"),mo(1,"-"),Li())}function Gy(t,e){1&t&&(Ui(0,"span",27),mo(1,"Paused"),Li())}function Zy(t,e){if(1&t&&(Ui(0,"tr"),Ui(1,"td",23),mo(2),Li(),Ui(3,"td",23),mo(4),Li(),Ui(5,"td",23),Mi(6,Wy,1,0,"div",24),Mi(7,qy,2,0,"ng-template",null,25,al),Mi(9,Gy,2,0,"ng-template",null,26,al),Li(),Ui(11,"td",23),Ui(12,"span",9),mo(13),$a(14,"date"),Li(),Li(),Li()),2&t){const t=Ni(8),e=Ni(10),n=Zi().$implicit;cs(2),yo(n.instanceName),cs(2),yo(n.pausedPartitions),cs(2),Vi("ngIf",n.isLost)("ngIfThen",t)("ngIfElse",e),cs(6),Vi("ngClass",n.isLost?"text-secondary":"text-success"),cs(1),yo(za(14,7,n.lastUpdate,"medium"))}}function Yy(t,e){1&t&&Hi(0,"div")}function Qy(t,e){1&t&&(Ui(0,"span"),mo(1,"-"),Li())}function Ky(t,e){1&t&&(Ui(0,"span",28),mo(1,"Running"),Li())}function Jy(t,e){if(1&t&&(Ui(0,"tr"),Ui(1,"td",23),mo(2),Li(),Ui(3,"td",23),mo(4),Li(),Ui(5,"td",23),Mi(6,Yy,1,0,"div",24),Mi(7,Qy,2,0,"ng-template",null,25,al),Mi(9,Ky,2,0,"ng-template",null,26,al),Li(),Ui(11,"td",23),Ui(12,"span",9),mo(13),$a(14,"date"),Li(),Li(),Li()),2&t){const t=Ni(8),e=Ni(10),n=Zi().$implicit;cs(2),yo(n.instanceName),cs(2),yo(n.runningPartitions),cs(2),Vi("ngIf",n.isLost)("ngIfThen",t)("ngIfElse",e),cs(6),Vi("ngClass",n.isLost?"text-secondary":"text-success"),cs(1),yo(za(14,7,n.lastUpdate,"medium"))}}function Xy(t,e){if(1&t&&(Mi(0,Zy,15,10,"ng-template",22),Mi(1,Jy,15,10,"ng-template",22)),2&t){const t=e.$implicit;Vi("ngIf",(null==t.pausedPartitions?null:t.pausedPartitions.length)>0),cs(1),Vi("ngIf",(null==t.runningPartitions?null:t.runningPartitions.length)>0)}}function t_(t,e){if(1&t&&(Ui(0,"p",20),mo(1),Li(),Ui(2,"table",21),Ui(3,"thead"),Ui(4,"tr"),Ui(5,"th"),mo(6,"Consumer instance"),Li(),Ui(7,"th"),mo(8,"Partitions"),Li(),Ui(9,"th"),mo(10,"Status"),Li(),Ui(11,"th"),mo(12,"LastUpdate"),Li(),Li(),Li(),Ui(13,"tbody"),Mi(14,Xy,2,2,"ng-template",17),$a(15,"sort"),Li(),Li()),2&t){const t=e.$implicit;cs(1),_o("Topic: ",t.key,""),cs(13),Vi("ngForOf",za(15,2,t.value,"instanceName"))}}const e_=function(t,e,n){return{"text-success":t,"text-warning":e,"text-danger":n}};function n_(t,e){if(1&t){const t=$i();Ui(0,"div"),Ui(1,"h4"),mo(2),Li(),Ui(3,"h4"),mo(4,"Status: "),Ui(5,"span",9),mo(6),Li(),Li(),Ui(7,"h4"),mo(8),Li(),Ui(9,"div",10),Mi(10,zy,2,0,"button",11),Mi(11,By,2,0,"button",12),Ui(12,"button",13),Wi("click",function(){Pe(t);const n=e.$implicit,r=Zi().$implicit;return Zi().openRestartModal(r.groupId,n.name)}),mo(13,"Restart"),Li(),Ui(14,"button",14),Wi("click",function(){Pe(t);const n=e.$implicit,r=Zi().$implicit;return Zi().openRewindModal(r.groupId,n.name)}),mo(15,"Rewind Offset"),Li(),Ui(16,"button",15),Wi("click",function(){Pe(t);const n=e.$implicit,r=Zi().$implicit;return Zi().openResetModal(r.groupId,n.name)}),mo(17,"Reset Offset"),Li(),Ui(18,"button",16),Wi("click",function(){Pe(t);const n=e.$implicit,r=Zi().$implicit;return Zi().openWorkersCountModal(r.groupId,n.name,n.workersCount)}),mo(19,"Update number of workers"),Li(),Li(),Mi(20,t_,16,5,"ng-template",17),$a(21,"groupBy"),Hi(22,"hr"),Li()}if(2&t){const t=e.$implicit;cs(2),_o("Consumer: ",t.name,""),cs(3),Vi("ngClass",(n=10,r=e_,s="Running"==t.status,i="Paused"==t.status,o="Not Running"==t.status,function(t,e,n,r,s,i,o,a){const l=e+n;return function(t,e,n,r,s){const i=Pi(t,e,n,r);return Ii(t,e+2,s)||i}(t,l,s,i,o)?Ri(t,l+3,a?r.call(a,s,i,o):r(s,i,o)):Ha(t,l+3)}(Re(),Le(),n,r,s,i,o,a))),cs(1),yo(t.status),cs(2),_o("Workers: ",t.workersCount,""),cs(2),Vi("ngIf","Paused"==t.status),cs(1),Vi("ngIf","Running"==t.status),cs(9),Vi("ngForOf",za(21,7,t.assignments,"topicName"))}var n,r,s,i,o,a}function r_(t,e){if(1&t&&(Ui(0,"div",5),Ui(1,"div",6),Ui(2,"div",7),Ui(3,"h3"),mo(4),Li(),Mi(5,n_,23,14,"div",8),Li(),Li(),Li()),2&t){const t=e.$implicit;cs(4),_o("Group Id: ",t.groupId,""),cs(1),Vi("ngForOf",t.consumers)}}let s_=(()=>{class t{constructor(t,e){this.modalService=t,this.consumerService=e,this.telemetryResponse=[],this.successSubject=new S,this.delayMs=1e3,this.successMessage="",function(t=0,e=Ug){return(!Lg(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=Ug),new _(n=>(n.add(e.schedule(Qm,t,{subscriber:n,counter:0,period:t})),n))}(1e3).subscribe(t=>e.get().subscribe(t=>this.telemetryResponse=this.enrichConsumers(t)))}enrichConsumers(t){var e=this;return t.groups.forEach(function(t){t.consumers.forEach(function(t){t.status=t.assignments.some(t=>{var n;return(null===(n=t.runningPartitions)||void 0===n?void 0:n.length)>0&&e.isActive(t.lastUpdate)})?"Running":t.assignments.some(t=>{var n;return(null===(n=t.pausedPartitions)||void 0===n?void 0:n.length)>0&&e.isActive(t.lastUpdate)})?"Paused":"Not Running",t.assignments.forEach(t=>t.isLost=!e.isActive(t.lastUpdate))})}),t}isActive(t){return Math.abs(((new Date).getTime()-new Date(t).getTime())/1e3)<5}openWorkersCountModal(t,e,n){const r=this.modalService.open(ey);r.componentInstance.groupId=t,r.componentInstance.consumerName=e,r.componentInstance.workersCount=n,r.result.then(n=>{this.consumerService.updateWorkersCount(t,e,n).subscribe({next:t=>this.successSubject.next("The number of workers was updated successfully")})})}openResetModal(t,e){const n=this.modalService.open(ny);n.componentInstance.groupId=t,n.componentInstance.consumerName=e,n.result.then(n=>{this.consumerService.resetOffset(t,e).subscribe(t=>this.successSubject.next("The partition-offsets of your consumer were reseted successfully"))})}openPauseModal(t,e){const n=this.modalService.open(ry);n.componentInstance.groupId=t,n.componentInstance.consumerName=e,n.result.then(n=>{this.consumerService.pause(t,e).subscribe(t=>this.successSubject.next("Your consumer was paused successfully"))})}openRestartModal(t,e){const n=this.modalService.open(iy);n.componentInstance.groupId=t,n.componentInstance.consumerName=e,n.result.then(n=>{this.consumerService.restart(t,e).subscribe(t=>this.successSubject.next("Your consumer was restarted successfully"))})}openResumeModal(t,e){const n=this.modalService.open(sy);n.componentInstance.groupId=t,n.componentInstance.consumerName=e,n.result.then(n=>{this.consumerService.resume(t,e).subscribe(t=>this.successSubject.next("Your consumer was resumed successfully"))})}openRewindModal(t,e){const n=this.modalService.open(ty);n.componentInstance.consumerName=e,n.componentInstance.groupId=t,n.result.then(n=>{this.consumerService.rewindOffset(t,e,new Date(n)).subscribe(t=>this.successSubject.next("The partition-offset of your consumer were rewinded successfully"))})}ngOnInit(){this.successSubject.subscribe(t=>this.successMessage=t),this.successSubject.pipe(function(t,e=Ug){return n=>n.lift(new Km(t,e))}(5e3)).subscribe(()=>{var t;null===(t=this.successAlert)||void 0===t||t.close()})}}return t.\u0275fac=function(e){return new(e||t)(ji(Vm),ji(Fy))},t.\u0275cmp=$t({type:t,selectors:[["app-consumer"]],viewQuery:function(t,e){if(1&t&&sl(Hy,1),2&t){let t;rl(t=il())&&(e.successAlert=t.first)}},decls:2,vars:2,consts:[["type","success",3,"closed",4,"ngIf"],["class","container",4,"ngFor","ngForOf"],["type","success",3,"closed"],["successAlert",""],[1,"text-center"],[1,"container"],[1,"card","my-3"],[1,"card-body"],[4,"ngFor","ngForOf"],[3,"ngClass"],[1,"mt-3","mb-3"],["class","btn btn-outline-success","type","button",3,"click",4,"ngIf"],["class","btn btn-outline-warning ml-2","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger","ml-2",3,"click"],["type","button",1,"btn","btn-outline-info","ml-2",3,"click"],["type","button",1,"btn","btn-outline-secondary","ml-2",3,"click"],["type","button",1,"btn","btn-outline-success","ml-2",3,"click"],["ngFor","",3,"ngForOf"],["type","button",1,"btn","btn-outline-success",3,"click"],["type","button",1,"btn","btn-outline-warning","ml-2",3,"click"],[1,"mb-0","font-weight-bold"],[1,"table","table-striped","table-hover","mt-1"],[3,"ngIf"],[1,"text-left"],[4,"ngIf","ngIfThen","ngIfElse"],["consumer_lost",""],["consumer_on",""],[1,"font-weight-bold","text-warning"],[1,"font-weight-bold","text-success"]],template:function(t,e){1&t&&(Mi(0,$y,7,1,"ngb-alert",0),Mi(1,r_,6,2,"div",1)),2&t&&(Vi("ngIf",e.successMessage),cs(1),Vi("ngForOf",e.telemetryResponse.groups))},directives:[uu,lu,mm,ou],pipes:[Uy,Ly,pu],encapsulation:2}),t})(),i_=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=$t({type:t,selectors:[["app-home"]],decls:12,vars:0,consts:[[1,"navbar","navbar-expand-lg","navbar-light","bg-light"],[1,"container-fluid"],["href","#",1,"navbar-brand"],["type","button","data-bs-toggle","collapse","data-bs-target","#navbarSupportedContent","aria-controls","navbarSupportedContent","aria-expanded","false","aria-label","Toggle navigation",1,"navbar-toggler"],[1,"navbar-toggler-icon"],["id","navbarSupportedContent",1,"collapse","navbar-collapse"],[1,"navbar-nav","me-auto","mb-2","mb-lg-0"],[1,"nav-item"],["aria-current","page","href","#",1,"nav-link","active"]],template:function(t,e){1&t&&(Ui(0,"nav",0),Ui(1,"div",1),Ui(2,"a",2),mo(3,"KafkaFlow - Dashboard"),Li(),Ui(4,"button",3),Hi(5,"span",4),Li(),Ui(6,"div",5),Ui(7,"ul",6),Ui(8,"li",7),Ui(9,"a",8),mo(10,"Consumers"),Li(),Li(),Li(),Li(),Li(),Li(),Hi(11,"app-consumer"))},directives:[Em,s_],encapsulation:2}),t})();class o_{constructor(t,e){this.count=t,this.source=e}call(t,e){return e.subscribe(new a_(t,this.count,this.source))}}class a_ extends f{constructor(t,e,n){super(t),this.count=e,this.source=n}error(t){if(!this.isStopped){const{source:e,count:n}=this;if(0===n)return super.error(t);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}}}class l_{intercept(t,e){return e.handle(t).pipe(function(t=-1){return e=>e.lift(new o_(t,e))}(1),_h(t=>{let e="";return e=t.error instanceof ErrorEvent?`Error: ${t.error.message}`:`Error Code: ${t.status}\nMessage: ${t.message}`,console.error(e),function(t,e){return new _(e=>e.error(t))}(e)}))}}const c_={validation:!1},u_=[{path:"",component:i_}];let h_=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=qt({type:t,bootstrap:[Pg]}),t.\u0275inj=ht({providers:[Fy,{provide:xy,useClass:l_,multi:!0}],imports:[[Wu,Ig,Cf.forRoot(u_),Vy,wg,Ym,Tg.forRoot(c_)],Cf]}),t})();(function(){if($l)throw new Error("Cannot enable prod mode after platform setup.");Hl=!1} /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license - */)(),zu().bootstrapModule(d_).catch(t=>console.error(t))},zn8P:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"}},[[0,0]]]); \ No newline at end of file + */)(),zu().bootstrapModule(h_).catch(t=>console.error(t))},zn8P:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"}},[[0,0]]]); \ No newline at end of file diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/app.module.ts b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/app.module.ts index 14b3ae9b5..d6989562e 100644 --- a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/app.module.ts +++ b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/app.module.ts @@ -2,7 +2,7 @@ import { RouterModule, Routes } from '@angular/router'; import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; -import { NgxMaskModule, IConfig } from 'ngx-mask' +import { NgxMaskModule, IConfig } from 'ngx-mask'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; @@ -11,17 +11,16 @@ import { ConsumerComponent } from './consumer/consumer.component'; import { HttpErrorInterceptor } from './http-error.interceptor'; import { GroupByPipe } from './group-by.pipe'; import { SortPipe } from './sort.pipe'; -import { CallbackPipe } from './callback.pipe'; import { ConsumerService } from './consumer.service'; import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; -import { RewindModalComponent } from './shared/rewind-modal/rewind-modal.component'; -import { WorkersCountModalComponent } from './shared/workers-count-modal/workers-count-modal.component'; -import { ResetModalComponent } from './shared/reset-modal/reset-modal.component'; -import { PauseModalComponent } from './shared/pause-modal/pause-modal.component'; -import { RestartModalComponent } from './shared/restart-modal/restart-modal.component'; -import { ResumeModalComponent } from './shared/resume-modal/resume-modal.component'; +import { RewindModalComponent } from './consumer/shared/rewind-modal/rewind-modal.component'; +import { WorkersCountModalComponent } from './consumer/shared/workers-count-modal/workers-count-modal.component'; +import { ResetModalComponent } from './consumer/shared/reset-modal/reset-modal.component'; +import { PauseModalComponent } from './consumer/shared/pause-modal/pause-modal.component'; +import { RestartModalComponent } from './consumer/shared/restart-modal/restart-modal.component'; +import { ResumeModalComponent } from './consumer/shared/resume-modal/resume-modal.component'; const maskConfig: Partial = { validation: false, @@ -36,7 +35,6 @@ const appRoutes: Routes = [ AppComponent, GroupByPipe, SortPipe, - CallbackPipe, HomeComponent, ConsumerComponent, RewindModalComponent, diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/callback.pipe.ts b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/callback.pipe.ts deleted file mode 100644 index 1a30424c5..000000000 --- a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/callback.pipe.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { PipeTransform, Pipe } from '@angular/core'; - -@Pipe({ - name: 'callback', - pure: false -}) -export class CallbackPipe implements PipeTransform { - transform(items: any[], callback: (item: any) => boolean): any { - if (!items || !callback) { - return items; - } - return items.filter((item: any) => callback(item)); - } -} diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer.service.ts b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer.service.ts index d5c2f3c87..1453e90a6 100644 --- a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer.service.ts +++ b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer.service.ts @@ -7,7 +7,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http'; export class ConsumerService { private headers: HttpHeaders; - private accessPointUrl: string = '/kafka-flow'; + private accessPointUrl = '/kafka-flow'; constructor(private http: HttpClient) { this.headers = new HttpHeaders({'Content-Type': 'application/json; charset=utf-8'}); @@ -19,14 +19,14 @@ export class ConsumerService { public updateWorkersCount(groupId: string, consumerName: string, workersCount: number) { return this.http.post( - this.accessPointUrl +`/groups/${groupId}/consumers/${consumerName}/change-worker-count`, + this.accessPointUrl + `/groups/${groupId}/consumers/${consumerName}/change-worker-count`, { workersCount: workersCount }, {headers: this.headers}); } public resetOffset(groupId: string, consumerName: string) { return this.http.post( - this.accessPointUrl +`/groups/${groupId}/consumers/${consumerName}/reset-offsets`, + this.accessPointUrl + `/groups/${groupId}/consumers/${consumerName}/reset-offsets`, { confirm: true }, {headers: this.headers}); } @@ -40,21 +40,21 @@ export class ConsumerService { public restart(groupId: string, consumerName: string) { return this.http.post( - this.accessPointUrl +`/groups/${groupId}/consumers/${consumerName}/restart`, + this.accessPointUrl + `/groups/${groupId}/consumers/${consumerName}/restart`, null, {headers: this.headers}); } public resume(groupId: string, consumerName: string) { return this.http.post( - this.accessPointUrl +`/groups/${groupId}/consumers/${consumerName}/resume`, + this.accessPointUrl + `/groups/${groupId}/consumers/${consumerName}/resume`, null, {headers: this.headers}); } public rewindOffset(groupId: string, consumerName: string, date: Date) { return this.http.post( - this.accessPointUrl +`/groups/${groupId}/consumers/${consumerName}/rewind-offsets-to-date`, + this.accessPointUrl + `/groups/${groupId}/consumers/${consumerName}/rewind-offsets-to-date`, { date: new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString() }, {headers: this.headers}); } diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/consumer.component.html b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/consumer.component.html index 1d7490353..eead37bf2 100644 --- a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/consumer.component.html +++ b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/consumer.component.html @@ -1,12 +1,12 @@
Success! {{successMessage}}
-
+

Group Id: {{ group.groupId }}

-

Consumer: {{ consumer.consumerName }}

+

Consumer: {{ consumer.name }}

Status: Lag: 55

-->

Workers: {{consumer.workersCount}}

- - - - - - + + + + + +
- -

Topic: {{partitionAssignments.key}}

+ +

Topic: {{assignment.key}}

@@ -36,7 +36,7 @@

Workers: {{consumer.workersCount}}

- + diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/consumer.component.ts b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/consumer.component.ts index af93acea3..90a2291d8 100644 --- a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/consumer.component.ts +++ b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/consumer.component.ts @@ -3,54 +3,49 @@ import { ConsumerService } from '../consumer.service' import {interval, Subject} from 'rxjs'; import { debounceTime } from 'rxjs/operators'; import { NgbModal, NgbAlert } from '@ng-bootstrap/ng-bootstrap'; -import { RewindModalComponent } from '../shared/rewind-modal/rewind-modal.component'; -import { WorkersCountModalComponent } from '../shared/workers-count-modal/workers-count-modal.component'; -import { ResetModalComponent } from '../shared/reset-modal/reset-modal.component'; -import { PauseModalComponent } from '../shared/pause-modal/pause-modal.component'; -import { ResumeModalComponent } from '../shared/resume-modal/resume-modal.component'; -import { RestartModalComponent } from '../shared/restart-modal/restart-modal.component'; +import { RewindModalComponent } from './shared/rewind-modal/rewind-modal.component'; +import { WorkersCountModalComponent } from './shared/workers-count-modal/workers-count-modal.component'; +import { ResetModalComponent } from './shared/reset-modal/reset-modal.component'; +import { PauseModalComponent } from './shared/pause-modal/pause-modal.component'; +import { ResumeModalComponent } from './shared/resume-modal/resume-modal.component'; +import { RestartModalComponent } from './shared/restart-modal/restart-modal.component'; @Component({ selector: 'app-consumer', templateUrl: './consumer.component.html' }) export class ConsumerComponent implements OnInit { - public groups: Array = []; + public telemetryResponse: any = []; @ViewChild('successAlert', { static: false }) successAlert: NgbAlert | undefined; private successSubject = new Subject(); private delayMs = 1000; successMessage = ''; constructor(private modalService: NgbModal, private consumerService: ConsumerService) { - interval(1000).subscribe(_ => consumerService.get().subscribe((data: any) => this.groups = this.enrichGroups(data))); + interval(1000).subscribe(_ => consumerService.get().subscribe((data: any) => this.telemetryResponse = this.enrichConsumers(data))); } - enrichGroups(groups: any) { + enrichConsumers(telemetryResponse: any) { var self = this; - groups.forEach(function (g: any) { + telemetryResponse.groups.forEach(function (g: any) { g.consumers.forEach(function (c: any) { c.status = - c.partitionAssignments.some((pa: any) => pa.runningPartitions?.length > 0 && self.isActive(pa.lastUpdate)) ? + c.assignments.some((pa: any) => pa.runningPartitions?.length > 0 && self.isActive(pa.lastUpdate)) ? "Running" : - c.partitionAssignments.some((pa: any) => pa.pausedPartitions?.length > 0 && self.isActive(pa.lastUpdate)) ? + c.assignments.some((pa: any) => pa.pausedPartitions?.length > 0 && self.isActive(pa.lastUpdate)) ? "Paused" : "Not Running"; - c.partitionAssignments.forEach( (pa: any) => pa.isLost = !self.isActive(pa.lastUpdate) + c.assignments.forEach( (pa: any) => pa.isLost = !self.isActive(pa.lastUpdate) ) }) }); - - return groups; + return telemetryResponse; } isActive(date: string) { return Math.abs((new Date().getTime() - new Date(date).getTime())/1000) < 5; } - removeReadonly(group: any) { - return !(group.consumers[0].managementDisabled==1); - } - openWorkersCountModal(groupId: string, consumerName: string, workersCount: number) { const modalRef = this.modalService.open(WorkersCountModalComponent); modalRef.componentInstance.groupId = groupId; diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/pause-modal/pause-modal.component.html b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/pause-modal/pause-modal.component.html similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/pause-modal/pause-modal.component.html rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/pause-modal/pause-modal.component.html diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/pause-modal/pause-modal.component.ts b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/pause-modal/pause-modal.component.ts similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/pause-modal/pause-modal.component.ts rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/pause-modal/pause-modal.component.ts diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/reset-modal/reset-modal.component.html b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/reset-modal/reset-modal.component.html similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/reset-modal/reset-modal.component.html rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/reset-modal/reset-modal.component.html diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/reset-modal/reset-modal.component.ts b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/reset-modal/reset-modal.component.ts similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/reset-modal/reset-modal.component.ts rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/reset-modal/reset-modal.component.ts diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/restart-modal/restart-modal.component.html b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/restart-modal/restart-modal.component.html similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/restart-modal/restart-modal.component.html rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/restart-modal/restart-modal.component.html diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/restart-modal/restart-modal.component.ts b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/restart-modal/restart-modal.component.ts similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/restart-modal/restart-modal.component.ts rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/restart-modal/restart-modal.component.ts diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/resume-modal/resume-modal.component.html b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/resume-modal/resume-modal.component.html similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/resume-modal/resume-modal.component.html rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/resume-modal/resume-modal.component.html diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/resume-modal/resume-modal.component.ts b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/resume-modal/resume-modal.component.ts similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/resume-modal/resume-modal.component.ts rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/resume-modal/resume-modal.component.ts diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/rewind-modal/rewind-modal.component.html b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/rewind-modal/rewind-modal.component.html similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/rewind-modal/rewind-modal.component.html rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/rewind-modal/rewind-modal.component.html diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/rewind-modal/rewind-modal.component.ts b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/rewind-modal/rewind-modal.component.ts similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/rewind-modal/rewind-modal.component.ts rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/rewind-modal/rewind-modal.component.ts diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/workers-count-modal/workers-count-modal.component.html b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/workers-count-modal/workers-count-modal.component.html similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/workers-count-modal/workers-count-modal.component.html rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/workers-count-modal/workers-count-modal.component.html diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/workers-count-modal/workers-count-modal.component.ts b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/workers-count-modal/workers-count-modal.component.ts similarity index 100% rename from src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/shared/workers-count-modal/workers-count-modal.component.ts rename to src/KafkaFlow.Admin.Dashboard/ClientApp/src/app/consumer/shared/workers-count-modal/workers-count-modal.component.ts diff --git a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/index.html b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/index.html index c458fe7f1..59a4f336f 100644 --- a/src/KafkaFlow.Admin.Dashboard/ClientApp/src/index.html +++ b/src/KafkaFlow.Admin.Dashboard/ClientApp/src/index.html @@ -5,6 +5,7 @@ KafkaFlow - Dashboard + diff --git a/src/KafkaFlow.Admin.WebApi/Adapters/ConsumerResponseAdapter.cs b/src/KafkaFlow.Admin.WebApi/Adapters/ConsumerResponseAdapter.cs index 5e72cb641..d10c573a8 100644 --- a/src/KafkaFlow.Admin.WebApi/Adapters/ConsumerResponseAdapter.cs +++ b/src/KafkaFlow.Admin.WebApi/Adapters/ConsumerResponseAdapter.cs @@ -14,7 +14,7 @@ internal static ConsumerResponse Adapt(this IMessageConsumer consumer) Subscription = consumer.Subscription, ConsumerName = consumer.ConsumerName, GroupId = consumer.GroupId, - FlowStatus = consumer.FlowStatus?.ToString() ?? ConsumerStatus.NotRunning.ToString(), + Status = consumer.FlowStatus?.ToString() ?? ConsumerStatus.NotRunning.ToString(), MemberId = consumer.MemberId, WorkersCount = consumer.WorkersCount, ClientInstanceName = consumer.ClientInstanceName, diff --git a/src/KafkaFlow.Admin.WebApi/Adapters/TelemetryResponseAdapter.cs b/src/KafkaFlow.Admin.WebApi/Adapters/TelemetryResponseAdapter.cs index 327f4ce77..f178252db 100644 --- a/src/KafkaFlow.Admin.WebApi/Adapters/TelemetryResponseAdapter.cs +++ b/src/KafkaFlow.Admin.WebApi/Adapters/TelemetryResponseAdapter.cs @@ -7,7 +7,7 @@ namespace KafkaFlow.Admin.WebApi.Adapters internal static class TelemetryResponseAdapter { - internal static TelemetryResponse Adapt(this IEnumerable metrics) + internal static TelemetryResponse Adapt(this IEnumerable metrics) { return new TelemetryResponse { @@ -24,7 +24,7 @@ internal static TelemetryResponse Adapt(this IEnumerable metrics metric => new TelemetryResponse.Consumer { Name = metric.First().ConsumerName, - WorkersCount = metric.First().WorkersCount, + WorkersCount = metric.OrderByDescending(x=> x.SentAt).First().WorkersCount, Assignments = metric.Select( x => new TelemetryResponse.TopicPartitionAssignment { diff --git a/src/KafkaFlow.Admin.WebApi/Contracts/ConsumerResponse.cs b/src/KafkaFlow.Admin.WebApi/Contracts/ConsumerResponse.cs index dfd66de83..84c1a2daf 100644 --- a/src/KafkaFlow.Admin.WebApi/Contracts/ConsumerResponse.cs +++ b/src/KafkaFlow.Admin.WebApi/Contracts/ConsumerResponse.cs @@ -50,8 +50,8 @@ public class ConsumerResponse public string ClientInstanceName { get; set; } /// - /// Gets or sets the current consumer flow status + /// Gets or sets the current consumer status /// - public string FlowStatus { get; set; } + public string Status { get; set; } } } diff --git a/src/KafkaFlow.Admin.WebApi/Controllers/GroupsController.cs b/src/KafkaFlow.Admin.WebApi/Controllers/GroupsController.cs index dd7c7af7d..c4ac596dd 100644 --- a/src/KafkaFlow.Admin.WebApi/Controllers/GroupsController.cs +++ b/src/KafkaFlow.Admin.WebApi/Controllers/GroupsController.cs @@ -24,7 +24,6 @@ public class GroupsController : ControllerBase /// /// The accessor class that provides access to the consumers /// The producer to publish admin messages - /// The cache interface to get metric data public GroupsController(IConsumerAccessor consumers, IAdminProducer adminProducer) { this.consumers = consumers; diff --git a/src/KafkaFlow.Admin/Extensions/ClusterConfigurationBuilderExtensions.cs b/src/KafkaFlow.Admin/Extensions/ClusterConfigurationBuilderExtensions.cs index 8e9c7996c..e37d5a7e1 100644 --- a/src/KafkaFlow.Admin/Extensions/ClusterConfigurationBuilderExtensions.cs +++ b/src/KafkaFlow.Admin/Extensions/ClusterConfigurationBuilderExtensions.cs @@ -108,7 +108,7 @@ public static IClusterConfigurationBuilder EnableTelemetry( .AddTypedHandlers( handlers => handlers .WithHandlerLifetime(InstanceLifetime.Singleton) - .AddHandlersFromAssemblyOf()))) + .AddHandlersFromAssemblyOf()))) .OnStarted(resolver => resolver.Resolve().Start(telemetryId, topicName)) .OnStopping(resolver => resolver.Resolve().Stop(telemetryId)); } diff --git a/src/KafkaFlow.Admin/Handlers/ConsumerMetricHandler.cs b/src/KafkaFlow.Admin/Handlers/ConsumerTelemetryMetricHandler.cs similarity index 52% rename from src/KafkaFlow.Admin/Handlers/ConsumerMetricHandler.cs rename to src/KafkaFlow.Admin/Handlers/ConsumerTelemetryMetricHandler.cs index 50fd32791..0e7c038c9 100644 --- a/src/KafkaFlow.Admin/Handlers/ConsumerMetricHandler.cs +++ b/src/KafkaFlow.Admin/Handlers/ConsumerTelemetryMetricHandler.cs @@ -4,13 +4,13 @@ namespace KafkaFlow.Admin.Handlers using KafkaFlow.Admin.Messages; using KafkaFlow.TypedHandler; - internal class ConsumerMetricHandler : IMessageHandler + internal class ConsumerTelemetryMetricHandler : IMessageHandler { private readonly ITelemetryStorage storage; - public ConsumerMetricHandler(ITelemetryStorage storage) => this.storage = storage; + public ConsumerTelemetryMetricHandler(ITelemetryStorage storage) => this.storage = storage; - public Task Handle(IMessageContext context, ConsumerMetric message) + public Task Handle(IMessageContext context, ConsumerTelemetryMetric message) { this.storage.Put(message); return Task.CompletedTask; diff --git a/src/KafkaFlow.Admin/ITelemetryStorage.cs b/src/KafkaFlow.Admin/ITelemetryStorage.cs index 4a57970a4..e9c81043b 100644 --- a/src/KafkaFlow.Admin/ITelemetryStorage.cs +++ b/src/KafkaFlow.Admin/ITelemetryStorage.cs @@ -9,15 +9,15 @@ namespace KafkaFlow.Admin public interface ITelemetryStorage { /// - /// Gets the stored metric indexed with the parameters provided + /// Gets all the consumer telemetry metrics /// - /// The list of consumer metrics stored in the cache - IEnumerable Get(); + /// The list of consumer metrics + IEnumerable Get(); /// /// Store the metric provided /// - /// The consumer metric - void Put(ConsumerMetric metric); + /// The consumer telemetry metric + void Put(ConsumerTelemetryMetric telemetryMetric); } } diff --git a/src/KafkaFlow.Admin/MemoryTelemetryStorage.cs b/src/KafkaFlow.Admin/MemoryTelemetryStorage.cs index 27c01757e..43c06245a 100644 --- a/src/KafkaFlow.Admin/MemoryTelemetryStorage.cs +++ b/src/KafkaFlow.Admin/MemoryTelemetryStorage.cs @@ -14,7 +14,7 @@ internal class MemoryTelemetryStorage : ITelemetryStorage private readonly TimeSpan expiryTime; private readonly object cleanSyncRoot = new(); - private readonly ConcurrentDictionary<(string, string, string), ConsumerMetric> metrics = new(); + private readonly ConcurrentDictionary<(string, string, string), ConsumerTelemetryMetric> metrics = new(); private DateTime lastCleanDate; @@ -26,17 +26,17 @@ public MemoryTelemetryStorage(TimeSpan cleanRunInterval, TimeSpan expiryTime, ID this.lastCleanDate = dateTimeProvider.MinValue; } - public IEnumerable Get() => this.metrics.Values; + public IEnumerable Get() => this.metrics.Values; - public void Put(ConsumerMetric metric) + public void Put(ConsumerTelemetryMetric telemetryMetric) { this.TryCleanItems(); - this.metrics[BuildKey(metric)] = metric; + this.metrics[BuildKey(telemetryMetric)] = telemetryMetric; } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static (string, string, string) BuildKey(ConsumerMetric metric) => - (metric.InstanceName, metric.GroupId, metric.ConsumerName); + private static (string, string, string) BuildKey(ConsumerTelemetryMetric telemetryMetric) => + (telemetryMetric.InstanceName, telemetryMetric.GroupId, telemetryMetric.ConsumerName); private void TryCleanItems() { diff --git a/src/KafkaFlow.Admin/Messages/ConsumerMetric.cs b/src/KafkaFlow.Admin/Messages/ConsumerTelemetryMetric.cs similarity index 97% rename from src/KafkaFlow.Admin/Messages/ConsumerMetric.cs rename to src/KafkaFlow.Admin/Messages/ConsumerTelemetryMetric.cs index d91e85ff6..14cbcac20 100644 --- a/src/KafkaFlow.Admin/Messages/ConsumerMetric.cs +++ b/src/KafkaFlow.Admin/Messages/ConsumerTelemetryMetric.cs @@ -9,7 +9,7 @@ namespace KafkaFlow.Admin.Messages /// A message that contains data related to consumers partition assigment /// [DataContract] - public class ConsumerMetric + public class ConsumerTelemetryMetric { /// /// Gets or sets the consumer group id diff --git a/src/KafkaFlow.Admin/TelemetryScheduler.cs b/src/KafkaFlow.Admin/TelemetryScheduler.cs index 03dd4ab65..015696425 100644 --- a/src/KafkaFlow.Admin/TelemetryScheduler.cs +++ b/src/KafkaFlow.Admin/TelemetryScheduler.cs @@ -53,12 +53,12 @@ public void Stop(string telemetryId) private static void ProduceTelemetry( string topicName, - IReadOnlyCollection consumers, + IList consumers, IMessageProducer producer) { var items = consumers.SelectMany( c => c.Assignment.Select( - a => new ConsumerMetric() + a => new ConsumerTelemetryMetric() { ConsumerName = c.ConsumerName, Topic = a.Topic, @@ -70,6 +70,8 @@ private static void ProduceTelemetry( RunningPartitions = c.RunningPartitions .Where(p => p.Topic == a.Topic) .Select(p => p.Partition.Value), + WorkersCount = c.WorkersCount, + Status = c.FlowStatus.GetValueOrDefault(), SentAt = DateTime.Now, })); diff --git a/src/KafkaFlow.UnitTests/MemoryTelemetryStorageTests.cs b/src/KafkaFlow.UnitTests/MemoryTelemetryStorageTests.cs index f2e5467b5..e13828790 100644 --- a/src/KafkaFlow.UnitTests/MemoryTelemetryStorageTests.cs +++ b/src/KafkaFlow.UnitTests/MemoryTelemetryStorageTests.cs @@ -51,7 +51,7 @@ public void Put_OneItem_ReturnsOneItem() .Returns(now); // Act - this.target.Put(new ConsumerMetric { SentAt = now }); + this.target.Put(new ConsumerTelemetryMetric { SentAt = now }); // Assert this.target.Get().Should().HaveCount(1); @@ -67,7 +67,7 @@ public void PutTwoItems_SameInstanceGroupConsumer_ReplaceOlder() .SetupGet(x => x.Now) .Returns(now); - var metric1 = new ConsumerMetric + var metric1 = new ConsumerTelemetryMetric { InstanceName = Guid.NewGuid().ToString(), GroupId = Guid.NewGuid().ToString(), @@ -75,7 +75,7 @@ public void PutTwoItems_SameInstanceGroupConsumer_ReplaceOlder() SentAt = now, }; - var metric2 = new ConsumerMetric + var metric2 = new ConsumerTelemetryMetric { InstanceName = metric1.InstanceName, GroupId = metric1.GroupId, @@ -102,7 +102,7 @@ public void PutTwoItems_DifferentInstanceGroupConsumer_ReturnsTwo() .SetupGet(x => x.Now) .Returns(now); - var metric1 = new ConsumerMetric + var metric1 = new ConsumerTelemetryMetric { InstanceName = Guid.NewGuid().ToString(), GroupId = Guid.NewGuid().ToString(), @@ -110,7 +110,7 @@ public void PutTwoItems_DifferentInstanceGroupConsumer_ReturnsTwo() SentAt = now, }; - var metric2 = new ConsumerMetric + var metric2 = new ConsumerTelemetryMetric { InstanceName = Guid.NewGuid().ToString(), GroupId = Guid.NewGuid().ToString(), @@ -136,7 +136,7 @@ public void PutTwoItems_ExpiryOne_ReturnsOne() .SetupGet(x => x.Now) .Returns(now); - var metric1 = new ConsumerMetric + var metric1 = new ConsumerTelemetryMetric { InstanceName = Guid.NewGuid().ToString(), GroupId = Guid.NewGuid().ToString(), @@ -146,7 +146,7 @@ public void PutTwoItems_ExpiryOne_ReturnsOne() this.target.Put(metric1); - var metric2 = new ConsumerMetric + var metric2 = new ConsumerTelemetryMetric { InstanceName = Guid.NewGuid().ToString(), GroupId = Guid.NewGuid().ToString(), diff --git a/src/KafkaFlow/Consumers/ConsumerFlowManager.cs b/src/KafkaFlow/Consumers/ConsumerFlowManager.cs index 840b7f7e0..ce71922a1 100644 --- a/src/KafkaFlow/Consumers/ConsumerFlowManager.cs +++ b/src/KafkaFlow/Consumers/ConsumerFlowManager.cs @@ -24,7 +24,7 @@ public ConsumerFlowManager( this.logHandler = logHandler; } - public IEnumerable PausedPartitions => this.pausedPartitions.AsReadOnly(); + public IEnumerable PausedPartitions => this.pausedPartitions.AsEnumerable(); public ConsumerStatus Status {
{{partitionAssignment.instanceName}}