vendor: 23,927 bytes, lines 1-3
1var iE=Object.create;var eu=Object.defineProperty;var sE=Object.defineProperties;var aE=Object.getOwnPropertyDescriptor;var cE=Object.getOwnPropertyDescriptors;var uE=Object.getOwnPropertyNames;var Zi$1=Object.getOwnPropertySymbols;var lE=Object.getPrototypeOf;var tu=Object.prototype.hasOwnProperty;var wh=Object.prototype.propertyIsEnumerable;var Eh=(e,t,n)=>t in e?eu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var m=(e,t)=>{for(var n in t||={})tu.call(t,n)&&Eh(e,n,t[n]);if(Zi$1)for(var n of Zi$1(t))wh.call(t,n)&&Eh(e,n,t[n]);return e};var j=(e,t)=>sE(e,cE(t));var dE=(e,t)=>{var n={};for(var r in e)tu.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zi$1)for(var r of Zi$1(e))t.indexOf(r)<0&&wh.call(e,r)&&(n[r]=e[r]);return n};var sR=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}};var fE=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let o of uE(t))!tu.call(e,o)&&o!==n&&eu(e,o,{get:()=>t[o],enumerable:!(r=aE(t,o))||r.enumerable});return e};var aR=(e,t,n)=>(n=e!=null?iE(lE(e)):{},fE(t||!e||!e.__esModule?eu(n,`default`,{value:e,enumerable:!0}):n,e));var V=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{a(n.next(c))}catch(u){o(u)}},s=c=>{try{a(n.throw(c))}catch(u){o(u)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,s);a((n=n.apply(e,t)).next())});var Me$1=null;var Yi$1=!1;var Ln=1;var hE=null;var ye$1=Symbol(`SIGNAL`);function I(e){let t=Me$1;return Me$1=e,t}function Qi$1(){return Me$1}var Un={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:`unknown`,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Bn(e){if(Yi$1)throw new Error(``);if(Me$1===null)return;Me$1.consumerOnSignalRead(e);let t=Me$1.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Me$1.recomputing;if(r&&(n=t!==void 0?t.nextProducer:Me$1.producers,n!==void 0&&n.producer===e)){Me$1.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=Ln;return}let o=e.consumersTail;if(o!==void 0&&o.consumer===Me$1&&(!r||o.knownValidAtEpoch===Ln))return;let i=Dr$1(Me$1),s={producer:e,consumer:Me$1,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:Ln,lastReadVersion:e.version,nextConsumer:void 0};Me$1.producersTail=s,t!==void 0?t.nextProducer=s:Me$1.producers=s,i&&Sh(e,s)}function Ih(){Ln++}function Vn(e){if(!(Dr$1(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Ln)){if(!e.producerMustRecompute(e)&&!Ki$1(e)){vr(e);return}e.producerRecomputeValue(e),vr(e)}}function nu(e){if(e.consumers===void 0)return;let t=Yi$1;Yi$1=!0;try{for(let n=e.consumers;n!==void 0;n=n.nextConsumer){let r=n.consumer;r.dirty||pE(r)}}finally{Yi$1=t}}function ru(){return Me$1?.consumerAllowSignalWrites!==!1}function pE(e){e.dirty=!0,nu(e),e.consumerMarkedDirty?.(e)}function vr(e){e.dirty=!1,e.lastCleanEpoch=Ln}function Hn(e){return e&&Ch(e),I(e)}function Ch(e){if(e.producersTail?.knownValidAtEpoch===Ln){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function yr$1(e,t){I(t),e&&bh(e)}function bh(e){e.recomputing=!1;let t=e.producersTail,n=t!==void 0?t.nextProducer:e.producers;if(n!==void 0){if(Dr$1(e))do n=ou(n);while(n!==void 0);t!==void 0?t.nextProducer=void 0:e.producers=void 0}}function Ki$1(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let n=t.producer,r=t.lastReadVersion;if(r!==n.version||(Vn(n),r!==n.version))return!0}return!1}function yo$1(e){if(Dr$1(e)){let t=e.producers;for(;t!==void 0;)t=ou(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function Sh(e,t){let n=e.consumersTail,r=Dr$1(e);if(n!==void 0?(t.nextConsumer=n.nextConsumer,n.nextConsumer=t):(t.nextConsumer=void 0,e.consumers=t),t.prevConsumer=n,e.consumersTail=t,!r)for(let o=e.producers;o!==void 0;o=o.nextProducer)Sh(o.producer,o)}function ou(e){let t=e.producer,n=e.nextProducer,r=e.nextConsumer,o=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r!==void 0?r.prevConsumer=o:t.consumersTail=o,o!==void 0)o.nextConsumer=r;else if(t.consumers=r,!Dr$1(t)){let i=t.producers;for(;i!==void 0;)i=ou(i)}return n}function Dr$1(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function Do$1(e){hE?.(e)}function Eo$1(e,t){return Object.is(e,t)}function Xi$1(e,t){let n=Object.create(gE);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(Vn(n),Bn(n),n.value===It$1)throw n.error;return n.value};return r[ye$1]=n,Do$1(n),r}var Fn=Symbol(`UNSET`);var jn=Symbol(`COMPUTING`);var It$1=Symbol(`ERRORED`);var gE=j(m({},Un),{value:Fn,dirty:!0,error:null,equal:Eo$1,kind:`computed`,producerMustRecompute(e){return e.value===Fn||e.value===jn},producerRecomputeValue(e){if(e.value===jn)throw new Error(``);let t=e.value;e.value=jn;let n=Hn(e),r,o=!1;try{r=e.computation(),I(null),o=t!==Fn&&t!==It$1&&r!==It$1&&e.equal(t,r)}catch(i){r=It$1,e.error=i}finally{yr$1(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function mE(){throw new Error}var Th=mE;function _h(e){Th(e)}function iu(e){Th=e}var vE=null;function su(e,t){let n=Object.create(wo$1);n.value=e,t!==void 0&&(n.equal=t);let r=()=>Mh(n);return r[ye$1]=n,Do$1(n),[r,s=>fn$1(n,s),s=>Ji$1(n,s)]}function Mh(e){return Bn(e),e.value}function fn$1(e,t){ru()||_h(e),e.equal(e.value,t)||(e.value=t,yE(e))}function Ji$1(e,t){ru()||_h(e),fn$1(e,t(e.value))}var wo$1=j(m({},Un),{equal:Eo$1,value:void 0,kind:`signal`});function yE(e){e.version++,Ih(),nu(e),vE?.(e)}var au;function es(){return au}function Ct$1(e){let t=au;return au=e,t}var Nh=Symbol(`NotFound`);function Er$1(e){return e===Nh||e?.name===`ɵNotFound`}function cu(e,t,n){let r=Object.create(DE);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(Vn(r),Bn(r),r.value===It$1)throw r.error;return r.value};return i[ye$1]=r,Do$1(r),i}function uu(e,t){Vn(e),fn$1(e,t),vr(e)}function Rh(e,t){if(Vn(e),e.value===It$1)throw e.error;Ji$1(e,t),vr(e)}var DE=j(m({},Un),{value:Fn,dirty:!0,error:null,equal:Eo$1,kind:`linkedSignal`,producerMustRecompute(e){return e.value===Fn||e.value===jn},producerRecomputeValue(e){if(e.value===jn)throw new Error(``);let t=e.value;e.value=jn;let n=Hn(e),r,o=!1;try{let i=e.source(),s=t!==Fn&&t!==It$1,a=s?{source:e.sourceValue,value:t}:void 0;r=e.computation(i,a),e.sourceValue=i,I(null),o=s&&r!==It$1&&e.equal(t,r)}catch(i){r=It$1,e.error=i}finally{yr$1(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function Ah(e){let t=I(null);try{return e()}finally{I(t)}}function C(e){return typeof e==`function`}function wr$1(e){let n=e(r=>{Error.call(r),r.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var ts=wr$1(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription: 2${n.map((r,o)=>`${o+1}) ${r.toString()}`).join(` 3 `)}`:``,this.name=`UnsubscriptionError`,this.errors=n});function $n(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ie=class e{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let i of n)i.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(C(r))try{r()}catch(i){t=i instanceof ts?i.errors:[i]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let i of o)try{xh(i)}catch(s){t=t??[],s instanceof ts?t=[...t,...s.errors]:t.push(s)}}if(t)throw new ts(t)}}add(t){var n;if(t&&t!==this)if(this.closed)xh(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&$n(n,t)}remove(t){let{_finalizers:n}=this;n&&$n(n,t),t instanceof e&&t._removeParent(this)}};ie.EMPTY=(()=>{let e=new ie;return e.closed=!0,e})();var lu=ie.EMPTY;function ns(e){return e instanceof ie||e&&`closed`in e&&C(e.remove)&&C(e.add)&&C(e.unsubscribe)}function xh(e){C(e)?e():e.unsubscribe()}var ot$2={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Ir$1={setTimeout(e,t,...n){let{delegate:r}=Ir$1;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Ir$1;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function rs(e){Ir$1.setTimeout(()=>{let{onUnhandledError:t}=ot$2;if(t)t(e);else throw e})}function Io(){}var Oh=du(`C`,void 0,void 0);function kh(e){return du(`E`,void 0,e)}function Ph(e){return du(`N`,e,void 0)}function du(e,t,n){return{kind:e,value:t,error:n}}var zn=null;function Cr$1(e){if(ot$2.useDeprecatedSynchronousErrorHandling){let t=!zn;if(t&&(zn={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=zn;if(zn=null,n)throw r}}else e()}function Lh(e){ot$2.useDeprecatedSynchronousErrorHandling&&zn&&(zn.errorThrown=!0,zn.error=e)}var Gn=class extends ie{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,ns(t)&&t.add(this)):this.destination=bE}static create(t,n,r){return new Ht$1(t,n,r)}next(t){this.isStopped?hu(Ph(t),this):this._next(t)}error(t){this.isStopped?hu(kh(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?hu(Oh,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}};var IE=Function.prototype.bind;function fu(e,t){return IE.call(e,t)}var pu=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){os(r)}}error(t){let{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){os(r)}else os(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){os(n)}}};var Ht$1=class extends Gn{constructor(t,n,r){super();let o;if(C(t)||!t)o={next:t??void 0,error:n??void 0,complete:r??void 0};else{let i;this&&ot$2.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),o={next:t.next&&fu(t.next,i),error:t.error&&fu(t.error,i),complete:t.complete&&fu(t.complete,i)}):o=t}this.destination=new pu(o)}};function os(e){ot$2.useDeprecatedSynchronousErrorHandling?Lh(e):rs(e)}function CE(e){throw e}function hu(e,t){let{onStoppedNotification:n}=ot$2;n&&Ir$1.setTimeout(()=>n(e,t))}var bE={closed:!0,next:Io,error:CE,complete:Io};var br$1=typeof Symbol==`function`&&Symbol.observable||`@@observable`;function it$2(e){return e}function is(...e){return gu(e)}function gu(e){return e.length===0?it$2:e.length===1?e[0]:function(n){return e.reduce((r,o)=>o(r),n)}}var A$1=class e{constructor(t){t&&(this._subscribe=t)}lift(t){let n=new e;return n.source=this,n.operator=t,n}subscribe(t,n,r){let o=TE(t)?t:new Ht$1(t,n,r);return Cr$1(()=>{let{operator:i,source:s}=this;o.add(i?i.call(o,s):s?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return n=Fh(n),new n((r,o)=>{let i=new Ht$1({next:s=>{try{t(s)}catch(a){o(a),i.unsubscribe()}},error:o,complete:r});this.subscribe(i)})}_subscribe(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)}[br$1](){return this}pipe(...t){return gu(t)(this)}toPromise(t){return t=Fh(t),new t((n,r)=>{let o;this.subscribe(i=>o=i,i=>r(i),()=>n(o))})}};A$1.create=e=>new A$1(e);function Fh(e){var t;return(t=e??ot$2.Promise)!==null&&t!==void 0?t:Promise}function SE(e){return e&&C(e.next)&&C(e.error)&&C(e.complete)}function TE(e){return e&&e instanceof Gn||SE(e)&&ns(e)}function _E(e){return C(e?.lift)}function P(e){return t=>{if(_E(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError(`Unable to lift unknown Observable type`)}}function F(e,t,n,r,o){return new mu(e,t,n,r,o)}var mu=class extends Gn{constructor(t,n,r,o,i,s){super(t),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(c){t.error(c)}}:super._next,this._error=o?function(a){try{o(a)}catch(c){t.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};var jh=wr$1(e=>function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`});var te$1=class extends A$1{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new ss(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new jh}next(t){Cr$1(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){Cr$1(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:n}=this;for(;n.length;)n.shift().error(t)}})}complete(){Cr$1(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){let{hasError:n,isStopped:r,observers:o}=this;return n||r?lu:(this.currentObservers=null,o.push(t),new ie(()=>{this.currentObservers=null,$n(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new A$1;return t.source=this,t}};te$1.create=(e,t)=>new ss(e,t);var ss=class extends te$1{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,t)}error(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.call(n,t)}complete(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)}_subscribe(t){var n,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&r!==void 0?r:lu}};var De=class extends te$1{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){let{hasError:t,thrownError:n,_value:r}=this;if(t)throw n;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}};var vu={now(){return(vu.delegate||Date).now()},delegate:void 0};var as=class extends ie{constructor(t,n){super()}schedule(t,n=0){return this}};var Co$1={setInterval(e,t,...n){let{delegate:r}=Co$1;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=Co$1;return(t?.clearInterval||clearInterval)(e)},delegate:void 0};var cs=class extends as{constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){var r;if(this.closed)return this;this.state=t;let o=this.id,i=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(i,o,n)),this.pending=!0,this.delay=n,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(i,this.id,n),this}requestAsyncId(t,n,r=0){return Co$1.setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,n,r=0){if(r!=null&&this.delay===r&&this.pending===!1)return n;n!=null&&Co$1.clearInterval(n)}execute(t,n){if(this.closed)return new Error(`executing a cancelled action`);this.pending=!1;let r=this._execute(t,n);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let r=!1,o;try{this.work(t)}catch(i){r=!0,o=i||new Error(`Scheduled action threw falsy error`)}if(r)return this.unsubscribe(),o}unsubscribe(){if(!this.closed){let{id:t,scheduler:n}=this,{actions:r}=n;this.work=this.state=this.scheduler=null,this.pending=!1,$n(r,this),t!=null&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,super.unsubscribe()}}};var yu=(()=>{class e{constructor(n,r=e.now){this.schedulerActionCtor=n,this.now=r}schedule(n,r=0,o){return new this.schedulerActionCtor(this,n).schedule(o,r)}}return e.now=vu.now,e})();var us=class extends yu{constructor(t,n=yu.now){super(t,n),this.actions=[],this._active=!1}flush(t){let{actions:n}=this;if(this._active){n.push(t);return}let r;this._active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}};var Du=new us(cs);var Uh=Du;var Ee$1=new A$1(e=>e.complete());function ls(e){return e&&C(e.schedule)}function Bh(e){return e[e.length-1]}function ds(e){return C(Bh(e))?e.pop():void 0}function hn$1(e){return ls(Bh(e))?e.pop():void 0}function Hh(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?i(l.value):o(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})}function Vh(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function qn(e){return this instanceof qn?(this.v=e,this):new qn(e)}function $h(e,t,n){if(!Symbol.asyncIterator)throw new TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),a(`next`),a(`throw`),a(`return`,s),o[Symbol.asyncIterator]=function(){return this},o;function s(h){return function(g){return Promise.resolve(g).then(h,d)}}function a(h,g){r[h]&&(o[h]=function(y){return new Promise(function(S,T){i.push([h,y,S,T])>1||c(h,y)})},g&&(o[h]=g(o[h])))}function c(h,g){try{u(r[h](g))}catch(y){f(i[0][3],y)}}function u(h){h.value instanceof qn?Promise.resolve(h.value.v).then(l,d):f(i[0][2],h)}function l(h){c(`next`,h)}function d(h){c(`throw`,h)}function f(h,g){h(g),i.shift(),i.length&&c(i[0][0],i[0][1])}}function zh(e){if(!Symbol.asyncIterator)throw new TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Vh==`function`?Vh(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(u){i({value:u,done:a})},s)}}var Sr$1=(e=>e&&typeof e.length==`number`&&typeof e!=`function`);function fs(e){return C(e?.then)}function hs(e){return C(e[br$1])}function ps(e){return Symbol.asyncIterator&&C(e?.[Symbol.asyncIterator])}function gs(e){return new TypeError(`You provided ${e!==null&&typeof e==`object`?`an invalid object`:`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function ME(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var ms=ME();function vs(e){return C(e?.[ms])}function ys(e){return $h(this,arguments,function*(){let n=e.getReader();try{for(;;){let{value:r,done:o}=yield qn(n.read());if(o)return yield qn(void 0);yield yield qn(r)}}finally{n.releaseLock()}})}function Ds(e){return C(e?.getReader)}function Q(e){if(e instanceof A$1)return e;if(e!=null){if(hs(e))return NE(e);if(Sr$1(e))return RE(e);if(fs(e))return AE(e);if(ps(e))return Gh(e);if(vs(e))return xE(e);if(Ds(e))return OE(e)}throw gs(e)}function NE(e){return new A$1(t=>{let n=e[br$1]();if(C(n.subscribe))return n.subscribe(t);throw new TypeError(`Provided object does not correctly implement Symbol.observable`)})}function RE(e){return new A$1(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function AE(e){return new A$1(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,rs)})}function xE(e){return new A$1(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function Gh(e){return new A$1(t=>{kE(e,t).catch(n=>t.error(n))})}function OE(e){return Gh(ys(e))}function kE(e,t){var n,r,o,i;return Hh(this,void 0,void 0,function*(){try{for(n=zh(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){o={error:s}}finally{try{r&&!r.done&&(i=n.return)&&(yield i.call(n))}finally{if(o)throw o.error}}t.complete()})}function Le(e,t,n,r=0,o=!1){let i=t.schedule(function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}function Es(e,t=0){return P((n,r)=>{n.subscribe(F(r,o=>Le(r,e,()=>r.next(o),t),()=>Le(r,e,()=>r.complete(),t),o=>Le(r,e,()=>r.error(o),t)))})}function ws(e,t=0){return P((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function qh(e,t){return Q(e).pipe(ws(t),Es(t))}function Wh(e,t){return Q(e).pipe(ws(t),Es(t))}function Zh(e,t){return new A$1(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Yh(e,t){return new A$1(n=>{let r;return Le(n,t,()=>{r=e[ms](),Le(n,t,()=>{let o,i;try{({value:o,done:i}=r.next())}catch(s){n.error(s);return}i?n.complete():n.next(o)},0,!0)}),()=>C(r?.return)&&r.return()})}function Is(e,t){if(!e)throw new Error(`Iterable cannot be null`);return new A$1(n=>{Le(n,t,()=>{let r=e[Symbol.asyncIterator]();Le(n,t,()=>{r.next().then(o=>{o.done?n.complete():n.next(o.value)})},0,!0)})})}function Qh(e,t){return Is(ys(e),t)}function Kh(e,t){if(e!=null){if(hs(e))return qh(e,t);if(Sr$1(e))return Zh(e,t);if(fs(e))return Wh(e,t);if(ps(e))return Is(e,t);if(vs(e))return Yh(e,t);if(Ds(e))return Qh(e,t)}throw gs(e)}function X(e,t){return t?Kh(e,t):Q(e)}function _(...e){return X(e,hn$1(e))}function Eu(e,t){let n=C(e)?e:()=>e,r=o=>o.error(n());return new A$1(t?o=>t.schedule(r,0,o):r)}function Cs(e){return!!e&&(e instanceof A$1||C(e.lift)&&C(e.subscribe))}var $t$1=wr$1(e=>function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`});function PE(e,t){let n=typeof t==`object`;return new Promise((r,o)=>{let i=!1,s;e.subscribe({next:a=>{s=a,i=!0},error:o,complete:()=>{i?r(s):n?r(t.defaultValue):o(new $t$1)}})})}function Xh(e){return e instanceof Date&&!isNaN(e)}function q(e,t){return P((n,r)=>{let o=0;n.subscribe(F(r,i=>{r.next(e.call(t,i,o++))}))})}var{isArray:LE}=Array;function FE(e,t){return LE(t)?e(...t):e(t)}function Tr$1(e){return q(t=>FE(e,t))}var{isArray:jE}=Array,{getPrototypeOf:UE,prototype:BE,keys:VE}=Object;function bs(e){if(e.length===1){let t=e[0];if(jE(t))return{args:t,keys:null};if(HE(t)){let n=VE(t);return{args:n.map(r=>t[r]),keys:n}}}return{args:e,keys:null}}function HE(e){return e&&typeof e==`object`&&UE(e)===BE}function Ss(e,t){return e.reduce((n,r,o)=>(n[r]=t[o],n),{})}function Ts(...e){let t=hn$1(e),n=ds(e),{args:r,keys:o}=bs(e);if(r.length===0)return X([],t);let i=new A$1($E(r,t,o?s=>Ss(o,s):it$2));return n?i.pipe(Tr$1(n)):i}function $E(e,t,n=it$2){return r=>{Jh(t,()=>{let{length:o}=e,i=new Array(o),s=o,a=o;for(let c=0;c<o;c++)Jh(t,()=>{let u=X(e[c],t),l=!1;u.subscribe(F(r,d=>{i[c]=d,l||(l=!0,a--),a||r.next(n(i.slice()))},()=>{--s||r.complete()}
3))},r)},r)}}function Jh(e,t,n){e?Le(n,e,t):t()}function ep(e,t,n,r,o,i,s,a){let c=[],u=0,l=0,d=!1,f=()=>{d&&!c.length&&!u&&t.complete()},h=y=>u<r?g(y):c.push(y),g=y=>{i&&t.next(y),u++;let S=!1;Q(n(y,l++)).subscribe(F(t,T=>{o?.(T),i?h(T):t.next(T)},()=>{S=!0},void 0,()=>{if(S)try{for(u--;c.length&&u<r;){let T=c.shift();s?Le(t,s,()=>g(T)):g(T)}f()}catch(T){t.error(T)}}))};return e.subscribe(F(t,h,()=>{d=!0,f()})),()=>{a?.()}}function fe$1(e,t,n=Infinity){return C(t)?fe$1((r,o)=>q((i,s)=>t(r,i,o,s))(Q(e(r,o))),n):(typeof t==`number`&&(n=t),P((r,o)=>ep(r,o,e,n)))}function pn$1(e=Infinity){return fe$1(it$2,e)}function tp(){return pn$1(1)}function _r$1(...e){return tp()(X(e,hn$1(e)))}function bo$1(e){return new A$1(t=>{Q(e()).subscribe(t)})}function zE(...e){let t=ds(e),{args:n,keys:r}=bs(e),o=new A$1(i=>{let{length:s}=n;if(!s){i.complete();return}let a=new Array(s),c=s,u=s;for(let l=0;l<s;l++){let d=!1;Q(n[l]).subscribe(F(i,f=>{d||(d=!0,u--),a[l]=f},()=>c--,void 0,()=>{(!c||!d)&&(u||i.next(r?Ss(r,a):a),i.complete())}))}});return t?o.pipe(Tr$1(t)):o}var GE=[`addListener`,`removeListener`];var qE=[`addEventListener`,`removeEventListener`];var WE=[`on`,`off`];function wu(e,t,n,r){if(C(n)&&(r=n,n=void 0),r)return wu(e,t,n).pipe(Tr$1(r));let[o,i]=QE(e)?qE.map(s=>a=>e[s](t,a,n)):ZE(e)?GE.map(np(e,t)):YE(e)?WE.map(np(e,t)):[];if(!o&&Sr$1(e))return fe$1(s=>wu(s,t,n))(Q(e));if(!o)throw new TypeError(`Invalid event target`);return new A$1(s=>{let a=(...c)=>s.next(1<c.length?c:c[0]);return o(a),()=>i(a)})}function np(e,t){return n=>r=>e[n](t,r)}function ZE(e){return C(e.addListener)&&C(e.removeListener)}function YE(e){return C(e.on)&&C(e.off)}function QE(e){return C(e.addEventListener)&&C(e.removeEventListener)}function KE(e=0,t,n=Uh){let r=-1;return t!=null&&(ls(t)?n=t:r=t),new A$1(o=>{let i=Xh(e)?+e-n.now():e;i<0&&(i=0);let s=0;return n.schedule(function(){o.closed||(o.next(s++),0<=r?this.schedule(void 0,r):o.complete())},i)})}function Ve$1(e,t){return P((n,r)=>{let o=0;n.subscribe(F(r,i=>e.call(t,i,o++)&&r.next(i)))})}function Wn(e){return P((t,n)=>{let r=null,o=!1,i;r=t.subscribe(F(n,void 0,void 0,s=>{i=Q(e(s,Wn(e)(t))),r?(r.unsubscribe(),r=null,i.subscribe(n)):o=!0})),o&&(r.unsubscribe(),r=null,i.subscribe(n))})}function gn$1(e,t){return C(t)?fe$1(e,t,1):fe$1(e,1)}function XE(e,t=Du){return P((n,r)=>{let o=null,i=null,s=null,a=()=>{if(o){o.unsubscribe(),o=null;let u=i;i=null,r.next(u)}};function c(){let u=s+e,l=t.now();if(l<u){o=this.schedule(void 0,u-l),r.add(o);return}a()}n.subscribe(F(r,u=>{i=u,s=t.now(),o||(o=t.schedule(c,e),r.add(o))},()=>{a(),r.complete()},void 0,()=>{i=o=null}))})}function rp(e){return P((t,n)=>{let r=!1;t.subscribe(F(n,o=>{r=!0,n.next(o)},()=>{r||n.next(e),n.complete()}))})}function zt$1(e){return e<=0?()=>Ee$1:P((t,n)=>{let r=0;t.subscribe(F(n,o=>{++r<=e&&(n.next(o),e<=r&&n.complete())}))})}function op(e=JE){return P((t,n)=>{let r=!1;t.subscribe(F(n,o=>{r=!0,n.next(o)},()=>r?n.complete():n.error(e())))})}function JE(){return new $t$1}function Mr$1(e){return P((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function Gt$1(e,t){let n=arguments.length>=2;return r=>r.pipe(e?Ve$1((o,i)=>e(o,i,r)):it$2,zt$1(1),n?rp(t):op(()=>new $t$1))}function _s(e){return e<=0?()=>Ee$1:P((t,n)=>{let r=[];t.subscribe(F(n,o=>{r.push(o),e<r.length&&r.shift()},()=>{for(let o of r)n.next(o);n.complete()},void 0,()=>{r=null}))})}function ew(e={}){let{connector:t=()=>new te$1,resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:o=!0}=e;return i=>{let s,a,c,u=0,l=!1,d=!1,f=()=>{a?.unsubscribe(),a=void 0},h=()=>{f(),s=c=void 0,l=d=!1},g=()=>{let y=s;h(),y?.unsubscribe()};return P((y,S)=>{u++,!d&&!l&&f();let T=c=c??t();S.add(()=>{u--,u===0&&!d&&!l&&(a=Iu(g,o))}),T.subscribe(S),!s&&u>0&&(s=new Ht$1({next:N=>T.next(N),error:N=>{d=!0,f(),a=Iu(h,n,N),T.error(N)},complete:()=>{l=!0,f(),a=Iu(h,r),T.complete()}}),Q(y).subscribe(s))})(i)}}function Iu(e,t,...n){if(t===!0){e();return}if(t===!1)return;let r=new Ht$1({next:()=>{r.unsubscribe(),e()}});return Q(t(...n)).subscribe(r)}function Cu(...e){let t=hn$1(e);return P((n,r)=>
3{(t?_r$1(e,n,t):_r$1(e,n)).subscribe(r)})}function Ne$1(e,t){return P((n,r)=>{let o=null,i=0,s=!1,a=()=>s&&!o&&r.complete();n.subscribe(F(r,c=>{o?.unsubscribe();let u=0,l=i++;Q(e(c,l)).subscribe(o=F(r,d=>r.next(t?t(c,d,l,u++):d),()=>{o=null,a()}))},()=>{s=!0,a()}))})}function So$1(e){return P((t,n)=>{Q(e).subscribe(F(n,()=>n.complete(),Io)),!n.closed&&t.subscribe(n)})}function Ye$1(e,t,n){let r=C(e)||t||n?{next:e,error:t,complete:n}:e;return r?P((o,i)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;o.subscribe(F(i,c=>{var u;(u=r.next)===null||u===void 0||u.call(r,c),i.next(c)},()=>{var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),i.complete()},c=>{var u;a=!1,(u=r.error)===null||u===void 0||u.call(r,c),i.error(c)},()=>{var c,u;a&&((c=r.unsubscribe)===null||c===void 0||c.call(r)),(u=r.finalize)===null||u===void 0||u.call(r)}))}):it$2}var Os=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`;var v=class extends Error{code;constructor(t,n){super(at$2(t,n)),this.code=t}};function tw(e){return`NG0${Math.abs(e)}`}function at$2(e,t){return`${tw(e)}${t?`: `+t:``}`}function H(e){for(let t in e)if(e[t]===H)return t;throw Error(``)}function lp(e,t){for(let n in t)Object.hasOwn(t,n)&&!Object.hasOwn(e,n)&&(e[n]=t[n])}function Ao$1(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(Ao$1).join(`, `)}]`;if(e==null)return``+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return``+n;let r=n.indexOf(` 4`);return r>=0?n.slice(0,r):n}function ks(e,t){return e?t?`${e} ${t}`:e:t||``}var nw=H({__forward_ref__:H});function Ps(e){return e.__forward_ref__=Ps,e}function Fe(e){return Bu(e)?e():e}function Bu(e){return typeof e==`function`&&Object.hasOwn(e,nw)&&e.__forward_ref__===Ps}function b(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function bt(e){return{providers:e.providers||[],imports:e.imports||[]}}function xo$1(e){return rw(e,Ls)}function Vu(e){return xo$1(e)!==null}function rw(e,t){return Object.hasOwn(e,t)&&e[t]||null}function ow(e){return(e?.[Ls]??null)||null}function Su(e){return e&&Object.hasOwn(e,Ns)?e[Ns]:null}var Ls=H({ɵprov:H});var Ns=H({ɵinj:H});var D=class{_desc;ngMetadataName=`InjectionToken`;ɵprov;constructor(t,n){this._desc=t,this.ɵprov=void 0,typeof n==`number`?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.ɵprov=b({token:this,providedIn:n.providedIn||`root`,factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Hu(e){return e&&!!e.ɵproviders}var Oo$1=H({ɵcmp:H});var ko$1=H({ɵdir:H});var $u=H({ɵpipe:H});var zu=H({ɵmod:H});var Mo$1=H({ɵfac:H});var Xn=H({__NG_ELEMENT_ID__:H});var ip=H({__NG_ENV_ID__:H});function dp(e){return Fs(e,`@NgModule`),e[zu]||null}function yn$1(e){return Fs(e,`@Component`),e[Oo$1]||null}function Gu(e){return Fs(e,`@Directive`),e[ko$1]||null}function fp(e){return Fs(e,`@Pipe`),e[$u]||null}function Fs(e,t){if(e==null)throw new v(-919,!1)}function ve$1(e){return typeof e==`string`?e:e==null?``:String(e)}var hp=H({ngErrorCode:H});var iw=H({ngErrorMessage:H});var sw=H({ngTokenPath:H});function qu(e,t){return pp(``,-200,t)}function js(e,t){throw new v(-201,!1)}function pp(e,t,n){let r=new v(t,e);return r[hp]=t,r[iw]=e,n&&(r[sw]=n),r}function aw(e){return e[hp]}var Tu;function gp(){return Tu}function Re(e){let t=Tu;return Tu=e,t}function Wu(e,t,n){let r=xo$1(e);if(r&&r.providedIn==`root`)return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;js(e,``)}var pe=globalThis;var Zn={};var uw=`__NG_DI_FLAG__`;var _u=class{injector;constructor(t){this.injector=t}retrieve(t,n){let r=Yn(n)||0;try{return this.injector.get(t,r&8?null:Zn,r)}catch(o){if(Er$1(o))return o;throw o}}};function lw(e,t=0){let n=es();if(n===void 0)throw new v(-203,!1);if(n===null)return Wu(e,void 0,t);{let r=dw(t),o=n.retrieve(e,r);if(Er$1(o)){if(r.optional)return null;throw o}return o}}function E(e,t=0){return(gp()||lw)(Fe(e),t)}function p(e,t){return E(e,Yn(t))}function Yn(e){return typeof e>`u`||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function dw(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function Mu(e){let t=[];for(let n=0;n<e.length;n++){let r=Fe(e[n]);if(Array.isArray(r)){if(r.length===0)throw new v(900,!1);let o,i=0;for(let s=0;s<r.length;s++){let a=r[s],c=fw(a);typeof c==`number`?c===-1?o=a.token:i|=c:o=a}t.push(E(o,i))}else t.push(E(r))}return t}function fw(e){return e[uw]}function vn$1(e,t){return Object.hasOwn(e,Mo$1)?e[Mo$1]:null}function mp(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let o=e[r],i=t[r];
vendor: 4,229 bytes, line 4
4if(n&&(o=n(o),i=n(i)),i!==o)return!1}return!0}function vp(e){return e.flat(Number.POSITIVE_INFINITY)}function Us(e,t){e.forEach(n=>Array.isArray(n)?Us(n,t):t(n))}function Zu(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Po$1(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function yp(e,t){let n=[];for(let r=0;r<e;r++)n.push(t);return n}function Dp(e,t,n,r){let o=e.length;if(o==t)e.push(n,r);else if(o===1)e.push(r,e[0]),e[0]=n;else{for(o--,e.push(e[o-1],e[o]);o>t;)e[o]=e[o-2],o--;e[t]=n,e[t+1]=r}}function Bs(e,t,n){let r=Ar$1(e,t);return r>=0?e[r|1]=n:(r=~r,Dp(e,r,t,n)),r}function Vs(e,t){let n=Ar$1(e,t);if(n>=0)return e[n|1]}function Ar$1(e,t){return hw(e,t,1)}function hw(e,t,n){let r=0,o=e.length>>n;for(;o!==r;){let i=r+(o-r>>1),s=e[i<<n];if(t===s)return i<<n;s>t?o=i:r=i+1}return~(o<<n)}var Dn={};var Ae$1=[];var En$1=new D(``);var Lo$1=new D(``,-1);var Yu=new D(``);var Rr$1=class{get(t,n=Zn){if(n===Zn){let o=pp(``,-201);throw o.name=`ɵNotFound`,o}return n}};function Yt(e){return{ɵproviders:e}}function Ep(...e){return{ɵproviders:Qu(!0,e),ɵfromNgModule:!0}}function Qu(e,...t){let n=[],r=new Set,o,i=s=>{n.push(s)};return Us(t,s=>{let a=s;Rs(a,i,[],r)&&(o||=[],o.push(a))}),o!==void 0&&wp(o,i),n}function wp(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:o}=e[n];Ku(o,i=>{t(i,r)})}}function Rs(e,t,n,r){if(e=Fe(e),!e)return!1;let o=null,i=Su(e),s=!i&&yn$1(e);if(!i&&!s){let c=e.ngModule;if(i=Su(c),i)o=c;else return!1}else{if(s&&!s.standalone)return!1;o=e}let a=r.has(o);if(s){if(a)return!1;if(r.add(o),s.dependencies){let c=typeof s.dependencies==`function`?s.dependencies():s.dependencies;for(let u of c)Rs(u,t,n,r)}}else if(i){if(i.imports!=null&&!a){r.add(o);let u;Us(i.imports,l=>{Rs(l,t,n,r)&&(u||=[],u.push(l))}),u!==void 0&&wp(u,t)}if(!a){let u=vn$1(o)||(()=>new o);t({provide:o,useFactory:u,deps:Ae$1},o),t({provide:Yu,useValue:o,multi:!0},o),t({provide:En$1,useValue:()=>E(o),multi:!0},o)}let c=i.providers;if(c!=null&&!a){let u=e;Ku(c,l=>{t(l,u)})}}else return!1;return o!==e&&e.providers!==void 0}function Ku(e,t){for(let n of e)Hu(n)&&(n=n.ɵproviders),Array.isArray(n)?Ku(n,t):t(n)}var pw=H({provide:String,useValue:H});function Ip(e){return e!==null&&typeof e==`object`&&pw in e}function gw(e){return!!(e&&e.useExisting)}function mw(e){return!!(e&&e.useFactory)}function As(e){return typeof e==`function`}var Fo$1=new D(``);var Ms={};var sp={};var bu;function jo$1(){return bu===void 0&&(bu=new Rr$1),bu}var ee=class{};var Qn=class extends ee{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,n,r,o){super(),this.parent=n,this.source=r,this.scopes=o,Ru(t,s=>this.processProvider(s)),this.records.set(Lo$1,Nr$1(void 0,this)),o.has(`environment`)&&this.records.set(ee,Nr$1(void 0,this));let i=this.records.get(Fo$1);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Yu,Ae$1,{self:!0}))}retrieve(t,n){let r=Yn(n)||0;try{return this.get(t,Zn,r)}catch(o){if(Er$1(o))return o;throw o}}destroy(){To$1(this),this._destroyed=!0;let t=I(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),I(t)}}onDestroy(t){return To$1(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){To$1(this);let n=Ct$1(this),r=Re(void 0);try{return t()}finally{Ct$1(n),Re(r)}}get(t,n=Zn,r){if(To$1(this),Object.hasOwn(t,ip))return t[ip](this);let o=Yn(r),s=Ct$1(this),a=Re(void 0);try{if(!(o&4)){let u=this.records.get(t);if(u===void 0){let l=ww(t)&&xo$1(t);l&&this.injectableDefInScope(l)?u=Nr$1(Nu(t),Ms):u=null,this.records.set(t,u)}if(u!=null)return this.hydrate(t,u,o)}let c=o&2?jo$1():this.parent;return n=o&8&&n===Zn?null:n,c.get(t,n)}catch(c){let u=aw(c);throw u===-200||u===-201?new v(u,null):c}finally{Re(a),Ct$1(s)}}resolveInjectorInitializers(){let t=I(null),n=Ct$1(this),r=Re(void 0);try{let i=this.get(En$1,Ae$1,{self:!0});for(let s of i)s()}finally{Ct$1(n),Re(r),I(t)}}toString(){return`R3Injector[...]`}processProvider(t){t=Fe(t);
4let n=As(t)?t:Fe(t&&t.provide),r=yw(t);if(!As(t)&&t.multi===!0){let o=this.records.get(n);o||(o=Nr$1(void 0,Ms,!0),o.factory=()=>Mu(o.multi),this.records.set(n,o)),n=t,o.multi.push(t)}this.records.set(n,r)}hydrate(t,n,r){let o=I(null);try{if(n.value===sp)throw qu(``);return n.value===Ms&&(n.value=sp,n.value=n.factory(void 0,r)),typeof n.value==`object`&&n.value&&Ew(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{I(o)}}injectableDefInScope(t){if(!t.providedIn)return!1;let n=Fe(t.providedIn);return typeof n==`string`?n===`any`||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){let n=this._onDestroyHooks.indexOf(t);n!==-1&&this._onDestroyHooks.splice(n,1)}};function Nu(e){let t=xo$1(e),n=t!==null?t.factory:vn$1(e);if(n!==null)return n;if(e instanceof D)throw new v(-204,!1);if(e instanceof Function)return vw(e);throw new v(-204,!1)}function vw(e){if(e.length>0)throw new v(-204,!1);let n=ow(e);return n!==null?()=>n.factory(e):()=>new e}function yw(e){if(Ip(e))return Nr$1(void 0,e.useValue);return Nr$1(Cp(e),Ms)}function Cp(e,t,n){let r;if(As(e)){let o=Fe(e);return vn$1(o)||Nu(o)}else if(Ip(e))r=()=>Fe(e.useValue);else if(mw(e))r=()=>e.useFactory(...Mu(e.deps||[]));else if(gw(e))r=(o,i)=>E(Fe(e.useExisting),i!==void 0&&i&8?8:void 0);else{let o=Fe(e&&(e.useClass||e.provide));if(Dw(e))r=()=>new o(...Mu(e.deps));else return vn$1(o)||Nu(o)}return r}function To$1(e){if(e.destroyed)throw new v(-205,!1)}function Nr$1(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Dw(e){return!!e.deps}function Ew(e){return e!==null&&typeof e==`object`&&typeof e.ngOnDestroy==`function`}function ww(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Ru(e,t){for(let n of e)Array.isArray(n)?Ru(n,t):n&&Hu(n)?Ru(n.ɵproviders,t):t(n)}function ue$1(e,t){let n;e instanceof Qn?(To$1(e),n=e):n=new _u(e);let o=Ct$1(n),i=Re(void 0);try{return t()}finally{Ct$1(o),Re(i)}}function Xu(){return gp()!==void 0||es()!=null}var ct$2=0;var w=1;var R=2;var he=3;var Qe=4;var we=5;var Jn=6;var xr$1=7;var se$1=8;var St=9;var ut$1=10;var K=11;var Or$1=12;var Ju=13;var wn$1=14;var Oe=15;var In=16;var er$1=17;var Tt$1=18;var _t$1=19;var el=20;var qt$1=21;var Hs=22;var kr$1=23;var He=24;var tr$1=25;var Mt$1=26;var re=27;var bp=1;var tl=6;var nr$1=7;var Uo$1=8;var rr$1=9;var ne$1=10;function Qt(e){return Array.isArray(e)&&typeof e[bp]==`object`}function Ke(e){return Array.isArray(e)&&e[bp]===!0}function nl(e){return(e.flags&4)!==0}function Kt(e){return e.componentOffset>-1}function $s(e){return(e.flags&1)===1}function Xt$1(e){return!!e.template}function Pr$1(e){return(e[R]&512)!==0}function or$1(e){return(e[R]&256)===256}var J=(function(e){return e[e.NONE=0]=`NONE`,e[e.HTML=1]=`HTML`,e[e.STYLE=2]=`STYLE`,e[e.SCRIPT=3]=`SCRIPT`,e[e.URL=4]=`URL`,e[e.RESOURCE_URL=5]=`RESOURCE_URL`,e[e.ATTRIBUTE_NO_BINDING=6]=`ATTRIBUTE_NO_BINDING`,e})(J||{});var _o$1;var Kn=`svg`;var zs=`math`;var Au=``;var ap=`*`;var xu=()=>Object.create(null);function Iw(){return _o$1||(_o$1=xu(),mn$1(J.HTML,void 0,[[`iframe`,[`srcdoc`]],[`*`,[`innerHTML`,`outerHTML`]]]),mn$1(J.STYLE,void 0,[[`*`,[`style`]]]),mn$1(J.URL,void 0,[[`*`,[`formAction`]],[`area`,[`href`]],[`a`,[`href`,`xlink:href`]],[`form`,[`action`]],[`img`,[`src`]],[`video`,[`src`]]]),mn$1(J.URL,zs,[[`*`,[`href`,`xlink:href`]]]),mn$1(J.RESOURCE_URL,void 0,[[`base`,[`href`]],[`embed`,[`src`]],[`frame`,[`src`]],[`iframe`,[`src`]],[`link`,[`href`]],[`object`,[`codebase`,`data`]]]),mn$1(J.URL,Kn,[[`a`,[`href`,`xlink:href`]]]),mn$1(J.ATTRIBUTE_NO_BINDING,Kn,[[`animate`,[`attributeName`,`values`,`to`,`from`]],[`set`,[`to`,`attributeName`]],[`animateMotion`,[`attributeName`]],[`animateTransform`,[`attributeName`]]]),mn$1(J.ATTRIBUTE_NO_BINDING,void 0,[[`unknown`,[`attributeName`,`values`,`to`,`from`,`sandbox`,`allow`,`allowFullscreen`,`referrerPolicy`,`csp`,`fetchPriority`,`credentialless`]],[`iframe`,[`sandbox`,`allow`,`allowFullscreen`,`referrerPolicy`,`csp`,`fetchPriority`,`credentialless`]]]),_o$1)}function mn$1(e,t,n){let r=t??Au;for(let[o,i]of n){let s=o.toLowerCase();for(let a of i){let c=a.toLowerCase(),u=_o$1[c]??=xu(),l=u[r]??=xu();l[s]=e}}}
vendor: 4,590 bytes, line 4
4function Sp(e,t,n){let o=Iw()[t.toLowerCase()];if(!o)return J.NONE;let i=e.toLowerCase(),s;if(n){let a=o[n];a&&(s=a[i]??a[ap])}if(s===void 0){let a=o[Au];a&&(s=a[i]??a[ap])}if(s===void 0&&(!n||n===Au)){let a=o[Kn];a&&(s=a[i])}return s??J.NONE}function Ie(e){for(;Array.isArray(e);)e=e[ct$2];return e}function rl(e,t){return Ie(t[e])}function Xe(e,t){return Ie(t[e.index])}function Gs(e,t){return e.data[t]}function ol(e,t){return e[t]}function il(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Je(e,t){let n=t[e];return Qt(n)?n:n[ct$2]}function Tp(e){return(e[R]&4)===4}function qs(e){return(e[R]&128)===128}function _p(e){return Ke(e[he])}function Nt$1(e,t){return t==null?null:e[t]}function sl(e){e[er$1]=0}function al(e){e[R]&1024||(e[R]|=1024,qs(e)&&Lr$1(e))}function Mp(e,t){for(;e>0;)t=t[wn$1],e--;return t}function Bo$1(e){return!!(e[R]&9216||e[He]?.dirty)}function Ws(e){e[ut$1].changeDetectionScheduler?.notify(8),e[R]&64&&(e[R]|=1024),Bo$1(e)&&Lr$1(e)}function Lr$1(e){e[ut$1].changeDetectionScheduler?.notify(0);let t=Wt(e);for(;t!==null&&!(t[R]&8192||(t[R]|=8192,!qs(t)));)t=Wt(t)}function Zs(e,t){if(or$1(e))throw new v(911,!1);e[qt$1]===null&&(e[qt$1]=[]),e[qt$1].push(t)}function Np(e,t){if(e[qt$1]===null)return;let n=e[qt$1].indexOf(t);n!==-1&&e[qt$1].splice(n,1)}function Wt(e){let t=e[he];return Ke(t)?t[he]:t}function cl(e){return e[xr$1]??=[]}function ul(e){return e.cleanup??=[]}function Rp(e,t,n,r){let o=cl(t);o.push(n),e.firstCreatePass&&ul(e).push(r,o.length-1)}var O={lFrame:$p(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Ou=!1;function Ap(){return O.lFrame.elementDepthCount}function xp(){O.lFrame.elementDepthCount++}function ll(){O.lFrame.elementDepthCount--}function Op(){return O.bindingsEnabled}function dl(){return O.skipHydrationRootTNode!==null}function fl(e){return O.skipHydrationRootTNode===e}function hl(){O.skipHydrationRootTNode=null}function M(){return O.lFrame.lView}function ge(){return O.lFrame.tView}function kp(e){return O.lFrame.contextLView=e,e[se$1]}function Pp(e){return O.lFrame.contextLView=null,e}function Se(){let e=pl();for(;e!==null&&e.type===64;)e=e.parent;return e}function pl(){return O.lFrame.currentTNode}function Lp(){let e=O.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Fr$1(e,t){let n=O.lFrame;n.currentTNode=e,n.isParent=t}function gl(){return O.lFrame.isParent}function ml(){O.lFrame.isParent=!1}function Fp(){return O.lFrame.contextLView}function vl(){return Ou}function yl(e){let t=Ou;return Ou=e,t}function Dl(){let e=O.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Vo(){return O.lFrame.bindingIndex}function El(e){return O.lFrame.bindingIndex=e}function Cn$1(){return O.lFrame.bindingIndex++}function jr$1(e){let t=O.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function jp(){return O.lFrame.inI18n}function Up(e,t){let n=O.lFrame;n.bindingIndex=n.bindingRootIndex=e,Ys(t)}function Bp(){return O.lFrame.currentDirectiveIndex}function Ys(e){O.lFrame.currentDirectiveIndex=e}function Vp(e){let t=O.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function wl(){return O.lFrame.currentQueryIndex}function Qs(e){O.lFrame.currentQueryIndex=e}function Cw(e){let t=e[w];return t.type===2?t.declTNode:t.type===1?e[we]:null}function Il(e,t,n){if(n&4){let o=t,i=e;for(;o=o.parent,o===null&&!(n&1);)if(o=Cw(i),o===null||(i=i[wn$1],o.type&10))break;if(o===null)return!1;t=o,e=i}let r=O.lFrame=Hp();return r.currentTNode=t,r.lView=e,!0}function Ks(e){let t=Hp(),n=e[w];O.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Hp(){let e=O.lFrame,t=e===null?null:e.child;return t===null?$p(e):t}function $p(e){let t={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:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function zp(){let e=O.lFrame;return O.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Cl=zp;function Xs(){let e=zp();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Gp(e){return(O.lFrame.contextLView=Mp(e,O.lFrame.contextLView))[se$1]}function Ue$2(){return O.lFrame.selectedIndex}function bn$1(e){O.lFrame.selectedIndex=e}function Ho$1(){let e=O.lFrame;
4return Gs(e.tView,e.selectedIndex)}function qp(){O.lFrame.currentNamespace=Kn}function Wp(){bw()}function bw(){O.lFrame.currentNamespace=null}function bl(){return O.lFrame.currentNamespace}var Zp=!0;function Js(){return Zp}function ea$1(e){Zp=e}function ku(e,t=null,n=null,r){let o=Sl(e,t,n,r);return o.resolveInjectorInitializers(),o}function Sl(e,t=null,n=null,r,o=new Set){return new Qn([n||Ae$1,Ep(e)],t||jo$1(),null,o)}var je$1=class e{static THROW_IF_NOT_FOUND=Zn;static NULL=new Rr$1;static create(t,n){if(Array.isArray(t))return ku({name:``},n,t,``);{let r=t.name??``;return ku({name:r},t.parent,t.providers,r)}}static ɵprov=b({token:e,providedIn:`any`,factory:()=>E(Lo$1)});static __NG_ELEMENT_ID__=-1};var Z=new D(``);var xe=class{static __NG_ELEMENT_ID__=Sw;static __NG_ENV_ID__=t=>t};var Pu=class extends xe{_lView;constructor(t){super(),this._lView=t}get destroyed(){return or$1(this._lView)}onDestroy(t){let n=this._lView;return Zs(n,t),()=>Np(n,t)}};function Sw(){return new Pu(M())}var Tl=!1;var Yp=new D(``);var lt$1=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new De(!1);debugTaskTracker=p(Yp,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new A$1(n=>{n.next(!1),n.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),this.debugTaskTracker?.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.debugTaskTracker?.remove(n),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static ɵprov=b({token:e,providedIn:`root`,factory:()=>new e})}return e})();var Lu=class extends te$1{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,Xu()&&(this.destroyRef=p(xe,{optional:!0})??void 0,this.pendingTasks=p(lt$1,{optional:!0})??void 0)}emit(t){let n=I(null);try{super.next(t)}finally{I(n)}}subscribe(t,n,r){let o=t,i=n||(()=>null),s=r;if(t&&typeof t==`object`){let c=t;o=c.next?.bind(c),i=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(i=this.wrapInTimeout(i),o&&(o=this.wrapInTimeout(o)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:o,error:i,complete:s});return t instanceof ie&&t.add(a),a}wrapInTimeout(t){return n=>{let r=this.pendingTasks?.add();setTimeout(()=>{try{t(n)}finally{r!==void 0&&this.pendingTasks?.remove(r)}})}}};var be=Lu;function xs(...e){}function _l(e){let t,n;function r(){e=xs;try{n!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch(o){}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame==`function`&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Qp(e){return queueMicrotask(()=>e()),()=>{e=xs}}var Ml=`isAngularZone`;var No$1=Ml+`_ID`;var Tw=0;var z$1=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new be(!1);onMicrotaskEmpty=new be(!1);onStable=new be(!1);onError=new be(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:i=Tl}=t;if(typeof Zone>`u`)throw new v(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!o&&r,s.shouldCoalesceRunChangeDetection=o,s.callbackScheduled=!1,s.scheduleInRootZone=i,Nw(s)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Ml)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new v(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new v(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,o){let i=this._inner,s=i.scheduleEventTask(`NgZoneEvent: `+o,t,_w,xs,xs);try{return i.runTask(s,n,r)}finally{i.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}};var _w={};function Nl(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function Mw(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){_l(()=>{e.callbackScheduled=!1,Fu(e),e.isCheckStableRunning=!0,Nl(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Fu(e)}function Nw(e){let t=()=>{Mw(e)},n=Tw++;e._inner=e._inner.fork({name:`angular`,properties:{[Ml]:!0,[No$1]:n,[No$1+n]:!0},onInvokeTask:(r,o,i,s,a,c)=>{if(Rw(c))return r.invokeTask(i,s,a,c);try{return cp(e),r.invokeTask(i,s,a,c)}finally{(e.shouldCoalesceEventChangeDetection&&s.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),up(e)}},onInvoke:(r,o,i,s,a,c,u)=>{try{return cp(e),r.invoke(i,s,a,c,u)}
4finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Aw(c)&&t(),up(e)}},onHasTask:(r,o,i,s)=>{r.hasTask(i,s),o===i&&(s.change==`microTask`?(e._hasPendingMicrotasks=s.microTask,Fu(e),Nl(e)):s.change==`macroTask`&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,o,i,s)=>(r.handleError(i,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function Fu(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function cp(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function up(e){e._nesting--,Nl(e)}var Ro$1=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new be;onMicrotaskEmpty=new be;onStable=new be;onError=new be;run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,o){return t.apply(n,r)}};function Rw(e){return Kp(e,`__ignore_ng_zone__`)}function Aw(e){return Kp(e,`__scheduler_tick__`)}function Kp(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var st$1=class{_console=console;handleError(t){this._console.error(`ERROR`,t)}};var $e=new D(``,{factory:()=>{let e=p(z$1),t=p(ee),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(st$1),n.handleError(r))})}}});var Xp={provide:En$1,useValue:()=>{p(st$1,{optional:!0})},multi:!0};function ae(e,t){let[n,r,o]=su(e,t?.equal),i=n;i[ye$1];return i.set=r,i.update=o,i.asReadonly=ta$1.bind(i),i}function ta$1(){let e=this[ye$1];if(e.readonlyFn===void 0){let t=()=>this();t[ye$1]=e,e.readonlyFn=t}return e.readonlyFn}var $o=new D(``,{factory:()=>xw});var xw=`ng`;var na$1=new D(``);var zo$1=new D(``,{providedIn:`platform`,factory:()=>`unknown`});var Ow=new D(``);var Go$1=new D(``,{factory:()=>p(Z).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null});var ra$1=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=kw}return e})();function kw(){return new ra$1(M(),Se())}var Zt$1=class{};var Ur$1=new D(``,{factory:()=>!0});var oa$1=new D(``);var Rl=(()=>{class e{static ɵprov=b({token:e,providedIn:`root`,factory:()=>new ju})}return e})();var ju=class{dirtyEffectCount=0;queues=new Map;add(t){this.enqueue(t),this.schedule(t)}schedule(t){t.dirty&&this.dirtyEffectCount++}remove(t){let n=t.zone,r=this.queues.get(n);r.has(t)&&(r.delete(t),t.dirty&&this.dirtyEffectCount--)}enqueue(t){let n=t.zone;this.queues.has(n)||this.queues.set(n,new Set);let r=this.queues.get(n);r.has(t)||r.add(t)}flush(){for(;this.dirtyEffectCount>0;){let t=!1;for(let[n,r]of this.queues)n===null?t||=this.flushQueue(r):t||=n.run(()=>this.flushQueue(r));t||(this.dirtyEffectCount=0)}}flushQueue(t){let n=!1;for(let r of t)r.dirty&&(this.dirtyEffectCount--,n=!0,r.run());return n}};var Br$1=(()=>{class e{internalPendingTasks=p(lt$1);scheduler=p(Zt$1);errorHandler=p($e);add(){let n=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(n)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(n))}}run(n){let r=this.add();try{n().catch(this.errorHandler).finally(r)}catch(o){this.errorHandler(o),r()}}static ɵprov=b({token:e,providedIn:`root`,factory:()=>new e})}return e})();var wd=Symbol(`InputSignalNode#UNSET`);var Pg=j(m({},wo$1),{transformFn:void 0,applyValueToInputSignal(e,t){fn$1(e,t)}});function ri(e){return{toString:e}.toString()}var L=(function(e){return e[e.TemplateCreateStart=0]=`TemplateCreateStart`,e[e.TemplateCreateEnd=1]=`TemplateCreateEnd`,e[e.TemplateUpdateStart=2]=`TemplateUpdateStart`,e[e.TemplateUpdateEnd=3]=`TemplateUpdateEnd`,e[e.LifecycleHookStart=4]=`LifecycleHookStart`,e[e.LifecycleHookEnd=5]=`LifecycleHookEnd`,e[e.OutputStart=6]=`OutputStart`,e[e.OutputEnd=7]=`OutputEnd`,e[e.BootstrapApplicationStart=8]=`BootstrapApplicationStart`,e[e.BootstrapApplicationEnd=9]=`BootstrapApplicationEnd`,e[e.BootstrapComponentStart=10]=`BootstrapComponentStart`,e[e.BootstrapComponentEnd=11]=`BootstrapComponentEnd`,e[e.ChangeDetectionStart=12]=`ChangeDetectionStart`,e[e.ChangeDetectionEnd=13]=`ChangeDetectionEnd`,e[e.ChangeDetectionSyncStart=14]=`ChangeDetectionSyncStart`,e[e.ChangeDetectionSyncEnd=15]=`ChangeDetectionSyncEnd`,e[e.AfterRenderHooksStart=16]=`AfterRenderHooksStart`,e[e.AfterRenderHooksEnd=17]=`AfterRenderHooksEnd`,e[e.ComponentStart=18]=`ComponentStart`,e[e.ComponentEnd=19]=`ComponentEnd`,e[e.DeferBlockStateStart=20]=`DeferBlockStateStart`,e[e.DeferBlockStateEnd=21]=`DeferBlockStateEnd`,e[e.DynamicComponentStart=22]=`DynamicComponentStart`,e[e.DynamicComponentEnd=23]=`DynamicComponentEnd`,e[e.HostBindingsUpdateStart=24]=`HostBindingsUpdateStart`,e[e.HostBindingsUpdateEnd=25]=`HostBindingsUpdateEnd`,e})(L||{});var pa$1=class{previousValue;currentValue;firstChange;constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}};function Lg(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var Fg=null;var ur$1=(()=>{Fg=Jp;let e=()=>Jp;return e.ngInherit=!0,e})();function zw(){return Fg}function Jp(e){return e.type.prototype.ngOnChanges&&(e.setInput=qw),Gw}function Gw(){let e=jg(this),t=e?.current;if(t){let n=e.previous;if(n===Dn)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function qw(e,t,n,r,o){let i=this.declaredInputs[r],s=jg(e)||Ww(e,{previous:Dn,current:null}),a=s.current||(s.current={}),c=s.previous,u=c[i];a[i]=new pa$1(u&&u.currentValue,n,c===Dn),Lg(e,t,o,n)}var Bl=`__ngSimpleChanges__`;function jg(e){return Object.hasOwn(e,Bl)&&e[Bl]||null}function Ww(e,t){return e[Bl]=t}var eg=[];var $=function(e,t=null,n){for(let r=0;r<eg.length;r++){let o=eg[r];o(e,t,n)}};function Zw(e,t,n){let{ngOnChanges:r,ngOnInit:o,ngDoCheck:i}=t.type.prototype;if(r){let s=zw()(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}o&&(n.preOrderHooks??=[]).push(0-e,o),i&&((n.preOrderHooks??=[]).push(e,i),(n.preOrderCheckHooks??=[]).push(e,i))}function Yw(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:c,ngAfterViewChecked:u,ngOnDestroy:l}=e.data[n].type.prototype;s&&(e.contentHooks??=[]).push(-n,s),a&&((e.contentHooks??=[]).push(n,a),(e.contentCheckHooks??=[]).push(n,a)),c&&(e.viewHooks??=[]).push(-n,c),u&&((e.viewHooks??=[]).push(n,u),(e.viewCheckHooks??=[]).push(n,u)),l!=null&&(e.destroyHooks??=[]).push(n,l)}}function ua$1(e,t,n){Ug(e,t,3,n)}function la(e,t,n,r){(e[R]&3)===n&&Ug(e,t,n,r)}function Al(e,t){let n=e[R];(n&3)===t&&(n&=16383,n+=1,e[R]=n)}function Ug(e,t,n,r){let o=r!==void 0?e[er$1]&65535:0,i=r??-1,s=t.length-1,a=0;for(let c=o;c<s;c++)if(typeof t[c+1]==`number`){if(a=t[c],r!=null&&a>=r)break}else t[c]<0&&(e[er$1]+=65536),(a<i||i==-1)&&(Qw(e,n,t,c),e[er$1]=(e[er$1]&4294901760)+c+2),c++}function tg(e,t){$(L.LifecycleHookStart,e,t);let n=I(null);try{t.call(e)}finally{I(n),$(L.LifecycleHookEnd,e,t)}}function Qw(e,t,n,r){let o=n[r]<0,i=n[r+1],a=e[o?-n[r]:n[r]];o?e[R]>>14<e[er$1]>>16&&(e[R]&3)===t&&(e[R]+=16384,tg(a,i)):tg(a,i)}var Hr$1=-1;var Qo=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,n,r,o){this.factory=t,this.name=o,this.canSeeViewProviders=n,this.injectImpl=r}};function Kw(e){return(e.flags&8)!==0}function Xw(e){return(e.flags&16)!==0}
vendor: 4,676 bytes, line 4
4function Jw(e,t,n){let r=0;for(;r<n.length;){let o=n[r];if(typeof o==`number`){if(o!==0)break;r++;let i=n[r++],s=n[r++],a=n[r++];e.setAttribute(t,s,a,i)}else{let i=o,s=n[++r];eI(i)?e.setProperty(t,i,s):e.setAttribute(t,i,s),r++}}return r}function Bg(e){return e===3||e===4||e===6}function eI(e){return e.charCodeAt(0)===64}function $r$1(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let o=t[r];typeof o==`number`?n=o:n===0||(n===-1||n===2?ng(e,n,o,null,t[++r]):ng(e,n,o,null,null))}}return e}function ng(e,t,n,r,o){let i=0,s=e.length;if(t===-1)s=-1;else for(;i<e.length;){let a=e[i++];if(typeof a==`number`){if(a===t){s=-1;break}else if(a>t){s=i-1;break}}}for(;i<e.length;){let a=e[i];if(typeof a==`number`)break;if(a===n){o!==null&&(e[i+1]=o);return}i++,o!==null&&i++}s!==-1&&(e.splice(s,0,t),i=s+1),e.splice(i++,0,n),o!==null&&e.splice(i++,0,o)}function Vg(e){return e!==Hr$1}function ga$1(e){return e&32767}function tI(e){return e>>16}function ma$1(e,t){let n=tI(e),r=t;for(;n>0;)r=r[wn$1],n--;return r}var Vl=!0;function va$1(e){let t=Vl;return Vl=e,t}var Hg=255;var $g=5;var rI=0;var Rt$1={};function oI(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Xn)&&(r=n[Xn]),r??=n[Xn]=rI++;let o=r&Hg,i=1<<o;t.data[e+(o>>$g)]|=i}function zg(e,t){let n=Gg(e,t);if(n!==-1)return n;let r=t[w];r.firstCreatePass&&(e.injectorIndex=t.length,xl(r.data,e),xl(t,null),xl(r.blueprint,null));let o=Id(e,t),i=e.injectorIndex;if(Vg(o)){let s=ga$1(o),a=ma$1(o,t),c=a[w].data;for(let u=0;u<8;u++)t[i+u]=a[s+u]|c[s+u]}return t[i+8]=o,i}function xl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Gg(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Id(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,o=t;for(;o!==null;){if(r=Kg(o),r===null)return Hr$1;if(n++,o=o[wn$1],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Hr$1}function iI(e,t,n){oI(e,t,n)}function sI(e,t){if(t===`class`)return e.classes;if(t===`style`)return e.styles;let n=e.attrs;if(n){let r=n.length,o=0;for(;o<r;){let i=n[o];if(Bg(i))break;if(i===0)o=o+2;else if(typeof i==`number`)for(o++;o<r&&typeof n[o]==`string`;)o++;else{if(i===t)return n[o+1];o=o+2}}}return null}function qg(e,t,n){if(n&8||e!==void 0)return e;js(t,`NodeInjector`)}function Wg(e,t,n,r){if(n&8&&r===void 0&&(r=null),(n&3)===0){let o=e[St],i=Re(void 0);try{return o?o.get(t,r,n&8):Wu(t,r,n&8)}finally{Re(i)}}return qg(r,t,n)}function Zg(e,t,n,r=0,o){if(e!==null){if(t[R]&2048&&!(r&2)){let s=lI(e,t,n,r,Rt$1);if(s!==Rt$1)return s}let i=Yg(e,t,n,r,Rt$1);if(i!==Rt$1)return i}return Wg(t,n,r,o)}function Yg(e,t,n,r,o){let i=cI(n);if(typeof i==`function`){if(!Il(t,e,r))return r&1?qg(o,n,r):Wg(t,n,r,o);try{let s;if(s=i(r),s==null&&!(r&8))js(n);else return s}finally{Cl()}}else if(typeof i==`number`){let s=null,a=Gg(e,t),c=Hr$1,u=r&1?t[Oe][we]:null;for((a===-1||r&4)&&(c=a===-1?Id(e,t):t[a+8],c===Hr$1||!og(r,!1)?a=-1:(s=t[w],a=ga$1(c),t=ma$1(c,t)));a!==-1;){let l=t[w];if(rg(i,a,l.data)){let d=aI(a,t,n,s,r,u);if(d!==Rt$1)return d}c=t[a+8],c!==Hr$1&&og(r,t[w].data[a+8]===u)&&rg(i,a,t)?(s=l,a=ga$1(c),t=ma$1(c,t)):a=-1}}return o}function aI(e,t,n,r,o,i){let s=t[w],a=s.data[e+8],l=da$1(a,s,n,r==null?Kt(a)&&Vl:r!=s&&(a.type&3)!==0,o&1&&i===a);return l!==null?ya$1(t,s,l,a,o):Rt$1}function da$1(e,t,n,r,o){let i=e.providerIndexes,s=t.data,a=i&1048575,c=e.directiveStart,u=e.directiveEnd,l=i>>20,d=r?a:a+l,f=o?a+l:u;for(let h=d;h<f;h++){let g=s[h];if(h<c&&n===g||h>=c&&g.type===n)return h}if(o){let h=s[c];if(h&&Xt$1(h)&&h.type===n)return c}return null}function ya$1(e,t,n,r,o){let i=e[n],s=t.data;if(i instanceof Qo){let a=i;if(a.resolving)throw qu(``);let c=va$1(a.canSeeViewProviders);a.resolving=!0;s[n].type||s[n];let d=a.injectImpl?Re(a.injectImpl):null;Il(e,r,0);try{i=e[n]=a.factory(void 0,o,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&Zw(n,s[n],t)}finally{d!==null&&Re(d),va$1(c),a.resolving=!1,Cl()}}return i}function cI(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Xn)?e[Xn]:void 0;return typeof t==`number`?t>=0?t&Hg:uI:t}function rg(e,t,n){let r=1<<e;return!!(n[t+(e>>$g)]&r)}function og(e,t){return!(e&2)&&!(e&1&&t)}var Sn$1=class{_tNode;_lView;constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return Zg(this._tNode,this._lView,t,Yn(r),n)}};function uI(){return new Sn$1(Se(),M())}function Qg(e){return ri(()=>{let t=e.prototype.constructor,n=t[Mo$1]||Hl(t),r=Object.prototype,o=Object.getPrototypeOf(e.prototype).constructor;for(;o&&o!==r;){let i=o[Mo$1]||Hl(o);if(i&&i!==n)return i;
4o=Object.getPrototypeOf(o)}return i=>new i})}function Hl(e){return Bu(e)?()=>{let t=Hl(Fe(e));return t&&t()}:vn$1(e)}function lI(e,t,n,r,o){let i=e,s=t;for(;i!==null&&s!==null&&s[R]&2048&&!Pr$1(s);){let a=Yg(i,s,n,r|2,Rt$1);if(a!==Rt$1)return a;r&=-5;let c=i.parent;if(!c){let u=s[el];if(u){let l=u.get(n,Rt$1,r);if(l!==Rt$1)return l}c=Kg(s),s=s[wn$1]}i=c}return o}function Kg(e){let t=e[w],n=t.type;return n===2?t.declTNode:n===1?e[we]:null}function oi(e){return sI(Se(),e)}function U(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function dI(){return Yr$1(Se(),M())}function Yr$1(e,t){return new xt(Xe(e,t))}var xt=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=dI}return e})();function fI(e){return e instanceof xt?e.nativeElement:e}function hI(){return this._results[Symbol.iterator]()}var Da$1=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new te$1}constructor(t=!1){this._emitDistinctChangesOnly=t}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;let r=vp(t);(this._changesDetected=!mp(this._results,r,n))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=hI};function Xg(e){return(e.flags&128)===128}var Cd=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Cd||{});var Jg=new Map;var pI=0;function gI(){return pI++}function mI(e){Jg.set(e[_t$1],e)}function $l(e){Jg.delete(e[_t$1])}var ig=`__ngContext__`;function zr$1(e,t){Qt(t)?(e[ig]=t[_t$1],mI(t)):e[ig]=t}function em(e){return nm(e[Or$1])}function tm(e){return nm(e[Qe])}function nm(e){for(;e!==null&&!Ke(e);)e=e[Qe];return e}var zl;function bd(e){zl=e}function rm(){if(zl!==void 0)return zl;if(typeof document<`u`)return document;throw new v(210,!1)}var om=`r`;var im=`di`;var Sd=new D(``);var sm=!1;var am=new D(``,{factory:()=>sm});var xa$1=new D(``);var sg=new WeakMap;function vI(e,t){if(e==null||typeof e!=`object`)return;let n=sg.get(e);n||(n=new WeakSet,sg.set(e,n)),n.add(t)}function Oa$1(e){return(e.flags&32)===32}var EI=()=>null;function cm(e,t,n=!1){return EI(e,t,n)}function um(e,t){let n=e.contentQueries;if(n!==null){let r=I(null);try{for(let o=0;o<n.length;o+=2){let i=n[o],s=n[o+1];if(s!==-1){let a=e.data[s];Qs(i),a.contentQueries(2,t[s],s)}}}finally{I(r)}}}function Gl(e,t,n){Qs(0);let r=I(null);try{t(e,n)}finally{I(r)}}function lm(e,t,n){if(nl(t)){let r=I(null);try{let o=t.directiveStart,i=t.directiveEnd;for(let s=o;s<i;s++){let a=e.data[s];if(a.contentQueries){let c=n[s];a.contentQueries(1,c,s)}}}finally{I(r)}}}var ht$1=(function(e){return e[e.Emulated=0]=`Emulated`,e[e.None=2]=`None`,e[e.ShadowDom=3]=`ShadowDom`,e[e.ExperimentalIsolatedShadowDom=4]=`ExperimentalIsolatedShadowDom`,e})(ht$1||{});var wI={"http://www.w3.org/2000/svg":Kn,"http://www.w3.org/1998/Math/MathML":zs};var ia$1;function dm(){if(ia$1===void 0&&(ia$1=null,pe.trustedTypes))try{ia$1=pe.trustedTypes.createPolicy(`angular`,{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch(e){}return ia$1}function ka$1(e){return dm()?.createHTML(e)||e}function II(e){return dm()?.createScriptURL(e)||e}var sa$1;function CI(){if(sa$1===void 0&&(sa$1=null,pe.trustedTypes))try{sa$1=pe.trustedTypes.createPolicy(`angular#unsafe-bypass`,{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch(e){}return sa$1}function ag(e){return CI()?.createScriptURL(e)||e}var Jt$1=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Os})`}};var ql=class extends Jt$1{getTypeName(){return`HTML`}};var Wl=class extends Jt$1{getTypeName(){return`Style`}};
4var Zl=class extends Jt$1{getTypeName(){return`Script`}};var Yl=class extends Jt$1{getTypeName(){return`URL`}};var Ql=class extends Jt$1{getTypeName(){return`ResourceURL`}};function ze$2(e){return e instanceof Jt$1?e.changingThisBreaksApplicationSecurity:e}function en$2(e,t){let n=fm(e);if(n!=null&&n!==t){if(n===`ResourceURL`&&t===`URL`)return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${Os})`)}return n===t}function fm(e){return e instanceof Jt$1&&e.getTypeName()||null}function Td(e){return new ql(e)}function _d(e){return new Wl(e)}function Md(e){return new Zl(e)}function Nd(e){return new Yl(e)}function Rd(e){return new Ql(e)}function bI(e){let t=new Xl(e);return SI()?new Kl(t):t}var Kl=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=`<body><remove></remove>`+t;try{let n=new window.DOMParser().parseFromString(ka$1(t),`text/html`).body;return n===null?this.inertDocumentHelper.getInertBodyElement(t):(n.firstChild?.remove(),n)}catch(n){return null}}};var Xl=class{defaultDoc;inertDocument;constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument(`sanitization-inert`)}getInertBodyElement(t){let n=this.inertDocument.createElement(`template`);return n.innerHTML=ka$1(t),n}};function SI(){try{return!!new window.DOMParser().parseFromString(ka$1(``),`text/html`)}catch(e){return!1}}var TI=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function ii(e){return e=String(e),e.match(TI)?e:`unsafe:`+e}function tn$1(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=!0;return t}function si(...e){let t=Object.create(null);for(let n of e)for(let r in n)Object.hasOwn(n,r)&&(t[r]=!0);return t}var hm=tn$1(`area,br,col,hr,img,wbr`);var pm=tn$1(`colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr`);var gm=tn$1(`rp,rt`);var _I=si(gm,pm);var cg=si(hm,si(pm,tn$1(`address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul`)),si(gm,tn$1(`a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video`)),_I);var mm=tn$1(`background,cite,href,itemtype,longdesc,poster,src,xlink:href`);var xI=si(mm,tn$1(`abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width`),tn$1(`aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext`));var OI=tn$1(`script,style,template`);var Jl=class{sanitizedSomething=!1;buf=[];sanitizeChildren(t){let n=t.firstChild,r=!0,o=[];for(;n;){if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild){o.push(n),n=LI(n);continue}for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let i=PI(n);if(i){n=i;break}n=o.pop()}}return this.buf.join(``)}startElement(t){let n=ug(t).toLowerCase();if(!Object.hasOwn(cg,n))return this.sanitizedSomething=!0,!Object.hasOwn(OI,n);this.buf.push(`<`),this.buf.push(n);let r=t.attributes;for(let o=0;o<r.length;o++){let i=r.item(o),s=i.name,a=s.toLowerCase();if(!Object.hasOwn(xI,a)){this.sanitizedSomething=!0;continue}let c=i.value;mm[a]&&(c=ii(c)),this.buf.push(` `,s,`="`,lg(c),`"`)}return this.buf.push(`>`),!0}endElement(t){let n=ug(t).toLowerCase();Object.hasOwn(cg,n)&&!Object.hasOwn(hm,n)&&(this.buf.push(`</`),this.buf.push(n),this.buf.push(`>`))}chars(t){this.buf.push(lg(t))}};function kI(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function PI(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw vm(t);return t}function LI(e){let t=e.firstChild;if(t&&kI(e,t))throw vm(t);return t}function ug(e){let t=e.nodeName;return typeof t==`string`?t:`FORM`}function vm(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var FI=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var jI=/([^\#-~ |!])/g;function lg(e){return e.replace(/&/g,`&`).replace(FI,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return`&#`+((n-55296)*1024+(r-56320)+65536)+`;`}).replace(jI,function(t){return`&#`+t.charCodeAt(0)+`;`}).replace(/</g,`<`).replace(/>/g,`>`)}var aa$1;function Ad(e,t){let n=null;try{aa$1=aa$1||bI(e);let r=t?String(t):``;n=aa$1.getInertBodyElement(r);let o=5,i=r;do{if(o===0)throw new Error(`Failed to sanitize html because the input is unstable`);o--,r=i,i=n.innerHTML,n=aa$1.getInertBodyElement(r)}while(r!==i);return ka$1(new Jl().sanitizeChildren(dg(n)||n))}finally{if(n){let r=dg(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function dg(e){return`content`in e&&UI(e)?e.content:null}
4function UI(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===`TEMPLATE`}function BI(e,t){return e.createText(t)}function VI(e,t,n){e.setValue(t,n)}function ym(e,t,n){return e.createElement(t,n)}function ir$1(e,t,n,r,o){e.insertBefore(t,n,r,o)}function Dm(e,t,n){e.appendChild(t,n)}function fg(e,t,n,r,o){r!==null?ir$1(e,t,n,r,o):Dm(e,t,n)}function Em(e,t,n,r){e.removeChild(null,t,n,r)}function HI(e,t,n){e.setAttribute(t,`style`,n)}function $I(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function wm(e,t,n){let{mergedAttrs:r,classes:o,styles:i}=n;r!==null&&Jw(e,t,r),o!==null&&$I(e,t,o),i!==null&&HI(e,t,i)}function zI(e,t=!0){if(e[0]!=`:`)return[null,e];let n=e.indexOf(`:`,1);if(n===-1){if(t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[null,e]}return[e.slice(1,n),e.slice(n+1)]}function Im(e){let t=bm();return t?t.sanitize(J.URL,e)||``:en$2(e,`URL`)?ze$2(e):ii(ve$1(e))}function Cm(e){let t=bm();if(t)return ag(t.sanitize(J.RESOURCE_URL,e)||``);if(en$2(e,`ResourceURL`))return ag(ze$2(e));throw new v(904,!1)}function GI(e){return II(e[0])}function qI(e,t){switch(WI(e,t)){case J.RESOURCE_URL:return Cm;case J.URL:return Im;default:return null}}function xd(e,t,n){return qI(t,n)?.(e)??e}function bm(){let e=M();return e&&e[ut$1].sanitizer}function WI(e,t){let[n,r]=ZI(e);return Sp(r,t,n)}function ZI(e){e=e.toLowerCase();let t=zI(e,!1);if(t[0])return t;let r=Ue$2()===-1?null:Ho$1(),o=r?.namespace;if(e===`#host`&&r?.type===2){let i=Xe(r,M());if(i.tagName&&(e=i.tagName.toLowerCase()),o==null){let s=i.namespaceURI;o=s&&wI[s]}}return[o,e]}function YI(e){return e.ownerDocument.defaultView}function QI(e){return e instanceof Function?e():e}function KI(e,t,n){let r=e.length;for(;;){let o=e.indexOf(t,n);if(o===-1)return o;if(o===0||e.charCodeAt(o-1)<=32){let i=t.length;if(o+i===r||e.charCodeAt(o+i)<=32)return o}n=o+1}}var Sm=`ng-template`;function XI(e,t,n,r){let o=0;if(r){for(;o<t.length&&typeof t[o]==`string`;o+=2)if(t[o]===`class`&&KI(t[o+1].toLowerCase(),n,0)!==-1)return!0}else if(Od(e))return!1;if(o=t.indexOf(1,o),o>-1){let i;for(;++o<t.length&&typeof(i=t[o])==`string`;)if(i.toLowerCase()===n)return!0}return!1}function Od(e){return e.type===4&&e.value!==Sm}function JI(e,t,n){return t===(e.type===4&&!n?Sm:e.value)}function eC(e,t,n){let r=4,o=e.attrs,i=o!==null?rC(o):0,s=!1;for(let a=0;a<t.length;a++){let c=t[a];if(typeof c==`number`){if(!s&&!dt$1(r)&&!dt$1(c))return!1;if(s&&dt$1(c))continue;s=!1,r=c|r&1;continue}if(!s)if(r&4){if(r=2|r&1,c!==``&&!JI(e,c,n)||c===``&&t.length===1){if(dt$1(r))return!1;s=!0}}else if(r&8){if(o===null||!XI(e,o,c,n)){if(dt$1(r))return!1;s=!0}}else{let u=t[++a],l=tC(c,o,Od(e),n);if(l===-1){if(dt$1(r))return!1;s=!0;continue}if(u!==``){let d;if(l>i?d=``:d=o[l+1].toLowerCase(),r&2&&u!==d){if(dt$1(r))return!1;s=!0}}}}return dt$1(r)||s}function dt$1(e){return(e&1)===0}function tC(e,t,n,r){if(t===null)return-1;let o=0;if(r||!n){let i=!1;for(;o<t.length;){let s=t[o];if(s===e)return o;if(s===3||s===6)i=!0;else if(s===1||s===2){let a=t[++o];for(;typeof a==`string`;)a=t[++o];continue}else{if(s===4)break;if(s===0){o+=4;continue}}o+=i?1:2}return-1}else return oC(t,e)}function Tm(e,t,n=!1){for(let r=0;r<t.length;r++)if(eC(e,t[r],n))return!0;return!1}function nC(e){let t=e.attrs;if(t!=null){let n=t.indexOf(5);if((n&1)===0)return t[n+1]}return null}function rC(e){for(let t=0;t<e.length;t++){let n=e[t];if(Bg(n))return t}return e.length}function oC(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r==`number`)return-1;if(r===t)return n;n++}return-1}function iC(e,t){e:for(let n=0;n<t.length;n++){let r=t[n];if(e.length===r.length){for(let o=0;o<e.length;o++)if(e[o]!==r[o])continue e;return!0}}return!1}function hg(e,t){return e?`:not(`+t.trim()+`)`:t}function sC(e){let t=e[0],n=1,r=2,o=``,i=!1;for(;n<e.length;){let s=e[n];if(typeof s==`string`)if(r&2){let a=e[++n];o+=`[`+s+(a.length>0?`="`+a+`"`:``)+`]`}else r&8?o+=`.`+s:r&4&&(o+=` `+s);else o!==``&&!dt$1(s)&&(t+=hg(i,o),o=``),r=s,i=i||!dt$1(r);n++}return o!==``&&(t+=hg(i,o)),t}function aC(e){return e.map(sC).join(`,`)}function cC(e){let t=[],n=[],r=1,o=2;for(;r<e.length;){let i=e[r];if(typeof i==`string`)o===2?i!==``&&t.push(i,e[++r]):o===8&&n.push(i);else{if(!dt$1(o))break;o=i}r++}return n.length&&t.push(1,...n),t}var oe$1={};var At$1=(function(e){return e[e.Important=1]=`Important`,e[e.DashCase=2]=`DashCase`,e})(At$1||{});var uC;function kd(e,t){return uC(e,t)}var Tn$1=new Set;typeof document<`u`&&document?.documentElement?.getAnimations;var ed=new WeakMap;function _m(e){return e?e[wn$1]??e:null}var Wo$1=new WeakSet;function lC(e,t,n){let r=ed.get(e);if(!r||r.length===0)return;let o=t.parentNode,i=t.previousSibling,s=_m(n);for(let a=r.length-1;a>=0;a--){let{el:c,declarationView:u}=r[a],l=c.parentNode;c===t?(r.splice(a,1),Wo$1.add(c),c.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}}))):i&&c===i?(r.splice(a,1),c.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),c.parentNode?.removeChild(c)):l&&o&&l!==o&&(s===null||u===null||s===u)&&(r.splice(a,1),c.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),c.parentNode?.removeChild(c))}}function dC(e,t,n){let r=_m(n),o=ed.get(e);o?o.some(i=>i.el===t)||o.push({el:t,declarationView:r}):ed.set(e,[{el:t,declarationView:r}])}var Pa$1=(function(e){return e[e.CHANGE_DETECTION=0]=`CHANGE_DETECTION`,e[e.AFTER_NEXT_RENDER=1]=`AFTER_NEXT_RENDER`,e})(Pa$1||{});var Ot$1=new D(``);var pg=new Set;function pt$1(e){pg.has(e)||(pg.add(e),performance?.mark?.(`mark_feature_usage`,{detail:{feature:e}}))}var Pd=(()=>{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=b({token:e,providedIn:`root`,factory:()=>new e})}return e})();var Mm=[0,1,2,3];var Nm=(()=>{class e{ngZone=p(z$1);
4scheduler=p(Zt$1);errorHandler=p(st$1,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){p(Ot$1,{optional:!0})}execute(){let n=this.sequences.size>0;n&&$(L.AfterRenderHooksStart),this.executing=!0;for(let r of Mm)for(let o of this.sequences)if(!(o.erroredOrDestroyed||!o.hooks[r]))try{o.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let i=o.hooks[r];return i(o.pipelinedValue)},o.snapshot))}catch(i){o.erroredOrDestroyed=!0,this.errorHandler?.handleError(i)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&$(L.AfterRenderHooksEnd)}register(n){let{view:r}=n;r!==void 0?((r[tr$1]??=[]).push(n),Lr$1(r),r[R]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(Pa$1.AFTER_NEXT_RENDER,n):n()}static ɵprov=b({token:e,providedIn:`root`,factory:()=>new e})}return e})();var Ea$1=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,n,r,o,i,s=null){this.impl=t,this.hooks=n,this.view=r,this.once=o,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let t=this.view?.[tr$1];t&&(this.view[tr$1]=t.filter(n=>n!==this))}};function La$1(e,t){let n=t?.injector??p(je$1);return pt$1(`NgAfterNextRender`),hC(e,n,t,!0)}function fC(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function hC(e,t,n,r){let o=t.get(Pd);o.impl??=t.get(Nm);let i=t.get(Ot$1,null,{optional:!0}),s=n?.manualCleanup!==!0?t.get(xe):null,a=t.get(ra$1,null,{optional:!0}),c=new Ea$1(o.impl,fC(e),a?.view,r,s,i?.snapshot(null));return o.impl.register(c),c}var Ld=new D(``,{factory:()=>{let e=p(ee),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Rm(e,t,n){let r=e.get(Ld);if(Array.isArray(t))for(let o of t)r.queue.add(o),n?.detachedLeaveAnimationFns?.push(o);else r.queue.add(t),n?.detachedLeaveAnimationFns?.push(t);r.scheduler&&r.scheduler(e)}function pC(e,t){let n=e.get(Ld);if(Array.isArray(t))for(let r of t)n.queue.delete(r);else n.queue.delete(t)}function gC(e,t){let n=e.get(Ld);if(t.detachedLeaveAnimationFns){for(let r of t.detachedLeaveAnimationFns)n.queue.delete(r);t.detachedLeaveAnimationFns=void 0}}function mC(e,t){for(let[n,r]of t)Rm(e,r.animateFns)}function gg(e,t,n,r){let o=e?.[Mt$1]?.enter;t!==null&&o&&o.has(n.index)&&mC(r,o)}function mg(e,t,n,r){try{n.get(Lo$1)}catch(s){return r(!1)}let o=e?.[Mt$1];o?.enter?.has(t.index)&&pC(n,o.enter.get(t.index).animateFns);let i=vC(e,t,o);if(i.size===0){let s=!1;if(e){let a=[];Fa$1(e,t,a),s=a.length>0}if(!s)return r(!1)}e&&Tn$1.add(e[_t$1]),Rm(n,()=>yC(e,t,o||void 0,i,r),o||void 0)}function vC(e,t,n){let r=new Map,o=n?.leave;if(o&&o.has(t.index)&&r.set(t.index,o.get(t.index)),e&&o)for(let[i,s]of o){if(r.has(i))continue;let c=e[w].data[i].parent;for(;c;){if(c===t){r.set(i,s);break}c=c.parent}}return r}function yC(e,t,n,r,o){let i=[];if(n&&n.leave)for(let[s]of r){if(!n.leave.has(s))continue;let a=n.leave.get(s);for(let c of a.animateFns){let{promise:u}=c();i.push(u)}n.detachedLeaveAnimationFns=void 0}if(e&&Fa$1(e,t,i),i.length>0){let s=n||e?.[Mt$1];if(s){let a=s.running;a&&i.push(a),s.running=Promise.allSettled(i),EC(e,s.running,o)}else Promise.allSettled(i).then(()=>{e&&Tn$1.delete(e[_t$1]),o(!0)})}else e&&Tn$1.delete(e[_t$1]),o(!1)}function Fa$1(e,t,n){if(t.type&12){let o=e[t.index];if(Ke(o))for(let i=ne$1;i<o.length;i++){let s=o[i];s[w].type===2&&DC(s,n)}}let r=t.child;for(;r;)Fa$1(e,r,n),r=r.next}function DC(e,t){let n=e[Mt$1];if(n&&n.leave)for(let o of n.leave.values())for(let i of o.animateFns){let{promise:s}=i();t.push(s)}let r=e[w].firstChild;for(;r;)Fa$1(e,r,t),r=r.next}function EC(e,t,n){t.then(()=>{e[Mt$1]?.running===t&&(e[Mt$1].running=void 0,Tn$1.delete(e[_t$1])),n(!0)})}function Vr$1(e,t,n,r,o,i,s,a){if(o!=null){let c,u=!1;Ke(o)?c=o:Qt(o)&&(u=!0,o=o[ct$2]);let l=Ie(o);e===0&&r!==null?(gg(a,r,i,n),s==null?Dm(t,r,l):ir$1(t,r,l,s||null,!0)):e===1&&r!==null?(gg(a,r,i,n),ir$1(t,r,l,s||null,!0),lC(i,l,a)):e===2?(a?.[Mt$1]?.leave?.has(i.index)&&dC(i,l,a),Wo$1.delete(l),mg(a,i,n,d=>{if(Wo$1.has(l)){Wo$1.delete(l);return}Em(t,l,u,d)})):e===3&&(Wo$1.delete(l),mg(a,i,n,()=>{t.destroyNode(l)})),c!=null&&AC(t,e,n,c,i,r,s)}}function wC(e,t){Am(e,t),t[ct$2]=null,t[we]=null}function IC(e,t,n,r,o,i){r[ct$2]=o,r[we]=t,Ua$1(e,r,n,1,o,i)}function Am(e,t){t[ut$1].changeDetectionScheduler?.notify(9),Ua$1(e,t,t[K],2,null,null)}function CC(e){let t=e[Or$1];if(!t)return Ol(e[w],e);for(;t;){let n=null;if(Qt(t))n=t[Or$1];else{let r=t[ne$1];r&&(n=r)}if(!n){for(;t&&!t[Qe]&&t!==e;)Qt(t)&&Ol(t[w],t),t=t[he];t===null&&(t=e),Qt(t)&&Ol(t[w],t),n=t&&t[Qe]}t=n}}function Fd(e,t){let n=e[rr$1],r=n.indexOf(t);n.splice(r,1)}function ja$1(e,t){if(or$1(t))return;let n=t[K];n.destroyNode&&Ua$1(e,t,n,3,null,null),CC(t)}function Ol(e,t){if(or$1(t))return;let n=I(null);try{t[R]&=-129,t[R]|=256,t[He]&&yo$1(t[He]),SC(e,t),bC(e,t),t[w].type===1&&t[K].destroy();let r=t[In];if(r!==null&&Ke(t[he])){r!==t[he]&&Fd(r,t);let o=t[Tt$1];o!==null&&o.detachView(e)}$l(t)}finally{I(n)}}function bC(e,t){let n=e.cleanup,r=t[xr$1];if(n!==null)for(let s=0;s<n.length-1;s+=2)if(typeof n[s]==`string`){let a=n[s+3];a>=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[xr$1]=null);let o=t[qt$1];if(o!==null){t[qt$1]=null;for(let s=0;s<o.length;s++){let a=o[s];a()}}let i=t[kr$1];if(i!==null){t[kr$1]=null;for(let s of i)s.destroy()}}function SC(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let o=t[n[r]];if(!(o instanceof Qo)){let i=n[r+1];if(Array.isArray(i))for(let s=0;s<i.length;s+=2){let a=o[i[s]],c=i[s+1];$(L.LifecycleHookStart,a,c);try{c.call(a)}finally{$(L.LifecycleHookEnd,a,c)}}else{$(L.LifecycleHookStart,o,i);
4try{i.call(o)}finally{$(L.LifecycleHookEnd,o,i)}}}}}function xm(e,t,n){if(t===null)throw new v(510,!1);return TC(e,t.parent,n)}function TC(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[ct$2];if(Kt(r)){let{encapsulation:o}=e.data[r.directiveStart+r.componentOffset];if(o===ht$1.None||o===ht$1.Emulated)return null}return Xe(r,n)}function Om(e,t,n){return MC(e,t,n)}function _C(e,t,n){return e.type&40?Xe(e,n):null}var MC=_C;var vg;function jd(e,t,n,r){let o=xm(e,r,t),i=t[K],a=Om(r.parent||t[we],r,t);if(o!=null)if(Array.isArray(n))for(let c=0;c<n.length;c++)fg(i,o,n[c],a,!1);else fg(i,o,n,a,!1);vg!==void 0&&vg(i,r,t,n,o)}function Zo(e,t){if(t!==null){let n=t.type;if(n&3)return Xe(t,e);if(n&4)return td(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Zo(e,r);{let o=e[t.index];return Ke(o)?td(-1,o):Ie(o)}}else{if(n&128)return Zo(e,t.next);if(n&32)return kd(t,e)()||Ie(e[t.index]);{let r=km(e,t);if(r!==null){if(Array.isArray(r))return r[0];return Zo(Wt(e[Oe]),r)}else return Zo(e,t.next)}}}return null}function km(e,t){if(t!==null){let r=e[Oe][we],o=t.projection;return r.projection[o]}return null}function td(e,t){let n=ne$1+e+1;if(n<t.length){let r=t[n],o=r[w].firstChild;if(o!==null)return Zo(r,o)}return t[nr$1]}function Ud(e,t,n,r,o,i,s){for(;n!=null;){let a=r[St];if(n.type===128){n=n.next;continue}let c=r[n.index],u=n.type;if(s&&t===0&&(c&&zr$1(Ie(c),r),n.flags|=2),!Oa$1(n))if(u&8)Ud(e,t,n.child,r,o,i,!1),Vr$1(t,e,a,o,c,n,i,r);else if(u&32){let l=kd(n,r),d;for(;d=l();)Vr$1(t,e,a,o,d,n,i,r);Vr$1(t,e,a,o,c,n,i,r)}else u&16?Pm(e,t,r,n,o,i):Vr$1(t,e,a,o,c,n,i,r);n=s?n.projectionNext:n.next}}function Ua$1(e,t,n,r,o,i){e.type===3?NC(n,r,t,o,i):Ud(n,r,e.firstChild,t,o,i,!1)}function NC(e,t,n,r,o){let s=n[w].firstChild,a=s.next,c=Ie(n[s.index]),u=Ie(n[a.index]),l=a.index+1,d=n[l];if(t===1||t===0)r!==null&&(d&&d.hasChildNodes()?ir$1(e,r,d,o,!0):(ir$1(e,r,c,o,!0),ir$1(e,r,u,o,!0)));else if(t===2){if(d||(d=document.createDocumentFragment(),n[l]=d),c&&c.parentNode===d)return;let f=c;for(;f!==null;){let h=f.nextSibling;if(d.appendChild(f),f===u)break;f=h}}}function RC(e,t,n){let r=t[K];Pm(r,0,t,n,xm(e,n,t),Om(n.parent||t[we],n,t))}function Pm(e,t,n,r,o,i){let s=n[Oe],c=s[we].projection[r.projection];if(Array.isArray(c))for(let u=0;u<c.length;u++){let l=c[u];Vr$1(t,e,n[St],o,l,r,i,n)}else{let u=c,l=s[he];Xg(r)&&(u.flags|=128),Ud(e,t,u,l,o,i,!0)}}function AC(e,t,n,r,o,i,s){let a=r[nr$1];if(a!==Ie(r)&&Vr$1(t,e,n,i,a,o,s),(r[R]&4)===0)for(let u=ne$1;u<r.length;u++){let l=r[u];Ua$1(l[w],l,e,t,i,a)}}function xC(e,t,n,r,o){if(t)o?e.addClass(n,r):e.removeClass(n,r);else{let i=r.indexOf(`-`)===-1?void 0:At$1.DashCase;o==null?e.removeStyle(n,r,i):(typeof o==`string`&&o.endsWith(`!important`)&&(o=o.slice(0,-10),i|=At$1.Important),e.setStyle(n,r,o,i))}}function Bd(e,t,n,r,o,i,s,a,c,u,l){let d=re+r,f=d+o,h=OC(d,f),g=typeof u==`function`?u():u;return h[w]={type:e,blueprint:h,template:n,queries:null,viewQuery:a,declTNode:t,data:h.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof i==`function`?i():i,pipeRegistry:typeof s==`function`?s():s,firstChild:null,schemas:c,consts:g,incompleteFirstPass:!1,ssrId:l}}function OC(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:oe$1);return n}function kC(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=Bd(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function Vd(e,t,n,r,o,i,s,a,c,u,l){let d=t.blueprint.slice();return d[ct$2]=o,d[R]=r|1228,(u!==null||e&&e[R]&2048)&&(d[R]|=2048),sl(d),d[he]=d[wn$1]=e,d[se$1]=n,d[ut$1]=s||e&&e[ut$1],d[K]=a||e&&e[K],d[St]=c||e&&e[St]||null,d[we]=i,d[_t$1]=gI(),d[Jn]=l,d[el]=u,d[Oe]=t.type==2?e[Oe]:d,d}
vendor: 12,095 bytes, line 4
4function PC(e,t,n){let r=Xe(t,e),o=kC(n),i=e[ut$1].rendererFactory,s=Hd(e,Vd(e,o,null,Lm(n),r,t,null,i.createRenderer(r,n),null,null,null));return e[t.index]=s}function Lm(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function Fm(e,t,n,r){if(n===0)return-1;let o=t.length;for(let i=0;i<n;i++)t.push(r),e.blueprint.push(r),e.data.push(null);return o}function Hd(e,t){return e[Or$1]?e[Ju][Qe]=t:e[Or$1]=t,e[Ju]=t,t}function LC(e=1){jm(ge(),M(),Ue$2()+e,!1)}function jm(e,t,n,r){if(!r)if((t[R]&3)===3){let i=e.preOrderCheckHooks;i!==null&&ua$1(t,i,n)}else{let i=e.preOrderHooks;i!==null&&la(t,i,0,n)}bn$1(n)}var Ba$1=(function(e){return e[e.None=0]=`None`,e[e.SignalBased=1]=`SignalBased`,e[e.HasDecoratorInputTransform=2]=`HasDecoratorInputTransform`,e})(Ba$1||{});function nd(e,t,n,r){let o=I(null);try{let[i,s,a]=e.inputs[n],c=null;(s&Ba$1.SignalBased)!==0&&(c=t[i][ye$1]),c!==null&&c.transformFn!==void 0?r=c.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,c,r,n,i):Lg(t,c,i,r)}finally{I(o)}}function Um(e,t,n,r,o){let i=Ue$2(),s=r&2;try{bn$1(-1),s&&t.length>re&&jm(e,t,re,!1);$(s?L.TemplateUpdateStart:L.TemplateCreateStart,o,n),n(r,o)}finally{bn$1(i);$(s?L.TemplateUpdateEnd:L.TemplateCreateEnd,o,n)}}function Bm(e,t,n){$C(e,t,n),(n.flags&64)===64&&zC(e,t,n)}function $d(e,t,n=Xe){let r=t.localNames;if(r!==null){let o=t.index+1;for(let i=0;i<r.length;i+=2){let s=r[i+1],a=s===-1?n(t,e):e[s];e[o++]=a}}}function FC(e,t,n,r){let i=r.get(am,sm)||n===ht$1.ShadowDom||n===ht$1.ExperimentalIsolatedShadowDom;return e.selectRootElement(t,i)}function BC(e){return e===`class`?`className`:e===`for`?`htmlFor`:e===`formaction`?`formAction`:e===`innerHtml`?`innerHTML`:e===`readonly`?`readOnly`:e===`tabindex`?`tabIndex`:e}function VC(e,t,n,r,o,i){let s=t[w];if(zd(e,s,t,n,r)){Kt(e)&&HC(t,e.index);return}e.type&3&&(n=BC(n)),Vm(e,t,n,r,o,i)}function Vm(e,t,n,r,o,i){if(e.type&3){let s=Xe(e,t);r=i!=null?i(r,e.value||``,n):r,o.setProperty(s,n,r)}else e.type&12}function HC(e,t){let n=Je(t,e);n[R]&16||(n[R]|=64)}function $C(e,t,n){let r=n.directiveStart,o=n.directiveEnd;Kt(n)&&PC(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||zg(n,t);let i=n.initialInputs;for(let s=r;s<o;s++){let a=e.data[s],c=ya$1(t,e,s,n);if(zr$1(c,t),i!==null&&YC(t,s-r,c,a,n,i),Xt$1(a)){let u=Je(n.index,t);u[se$1]=ya$1(t,e,s,n)}}}function zC(e,t,n){let r=n.directiveStart,o=n.directiveEnd,i=n.index,s=Bp();try{bn$1(i);for(let a=r;a<o;a++){let c=e.data[a],u=t[a];Ys(a),(c.hostBindings!==null||c.hostVars!==0||c.hostAttrs!==null)&&GC(c,u)}}finally{bn$1(-1),Ys(s)}}function GC(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function qC(e,t){let n=e.directiveRegistry,r=null;if(n)for(let o=0;o<n.length;o++){let i=n[o];Tm(t,i.selectors,!1)&&(r??=[],Xt$1(i)?r.unshift(i):r.push(i))}return r}function WC(e,t,n,r,o,i){let s=Xe(e,t);ZC(t[K],s,i,e.value,n,r,o)}function ZC(e,t,n,r,o,i,s){if(i==null)s?.(i,r||``,o),e.removeAttribute(t,o,n);else{let a=s==null?ve$1(i):s(i,r||``,o);e.setAttribute(t,o,a,n)}}function YC(e,t,n,r,o,i){let s=i[t];if(s!==null)for(let a=0;a<s.length;a+=2){let c=s[a],u=s[a+1];nd(r,n,c,u)}}function Hm(e,t,n,r,o){let i=re+n,s=t[w],a=o(s,t,e,r,n);t[i]=a,Fr$1(e,!0);let c=e.type===2;return c?(wm(t[K],a,e),(Ap()===0||$s(e))&&zr$1(a,t),xp()):zr$1(a,t),Js()&&(!c||!Oa$1(e))&&jd(s,t,a,e),e}function $m(e){let t=e;return gl()?ml():(t=t.parent,Fr$1(t,!1)),t}function QC(e,t){let n=e[St];if(!n)return;let r;try{r=n.get($e,null)}catch(o){r=null}r?.(t)}function zd(e,t,n,r,o){let i=e.inputs?.[r],s=e.hostDirectiveInputs?.[r],a=!1;if(s)for(let c=0;c<s.length;c+=2){let u=s[c],l=s[c+1],d=t.data[u];nd(d,n[u],l,o),a=!0}if(i)for(let c of i){let u=n[c],l=t.data[c];nd(l,u,r,o),a=!0}return a}function KC(e,t){let n=Je(t,e),r=n[w];XC(r,n);let o=n[ct$2];o!==null&&n[Jn]===null&&(n[Jn]=cm(o,n[St])),$(L.ComponentStart);try{Gd(r,n,n[se$1])}finally{$(L.ComponentEnd,n[se$1])}}function XC(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function Gd(e,t,n){Ks(t);try{let r=e.viewQuery;r!==null&&Gl(1,r,n);let o=e.template;o!==null&&Um(e,t,o,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Tt$1]?.finishViewCreation(e),e.staticContentQueries&&um(e,t),e.staticViewQueries&&Gl(2,e.viewQuery,n);let i=e.components;i!==null&&JC(t,i)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[R]&=-5,Xs()}}function JC(e,t){for(let n=0;n<t.length;n++)KC(e,t[n])}function ai(e,t,n,r){let o=I(null);try{let i=t.tView,c=Vd(e,i,n,e[R]&4096?4096:16,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null);c[In]=e[t.index];let l=e[Tt$1];return l!==null&&(c[Tt$1]=l.createEmbeddedView(i)),Gd(i,c,n),c}finally{I(o)}}function Gr$1(e,t){return!t||t.firstChild===null||Xg(e)}function Ko(e,t,n,r,o=!1){if(e.type===3){let i=e.firstChild,s=i.next,a=Ie(t[i.index]),c=Ie(t[s.index]),u=a;for(;u!==null&&(r.push(u),u!==c);)u=u.nextSibling;return r}for(;n!==null;){if(n.type===128){n=o?n.projectionNext:n.next;continue}let i=t[n.index];if(i!==null)if(Ke(i)){let a=i[nr$1];a!==i[ct$2]&&r.push(Ie(i)),i[R]&4||zm(i,r),r.push(a)}else r.push(Ie(i));let s=n.type;if(s&8)Ko(e,t,n.child,r);else if(s&32){let a=kd(n,t),c;for(;c=a();)r.push(c)}else if(s&16){let a=km(t,n);if(Array.isArray(a))r.push(...a);else{let c=Wt(t[Oe]);Ko(c[w],c,a,r,!0)}}n=o?n.projectionNext:n.next}return r}function zm(e,t){for(let n=ne$1;n<e.length;n++){let r=e[n],o=r[w].firstChild;o!==null&&Ko(r[w],r,o,t)}}function Gm(e){if(e[tr$1]!==null){for(let t of e[tr$1])t.impl.addSequence(t);e[tr$1].length=0}}var qm=[];function eb(e){return e[He]??tb(e)}function tb(e){let t=qm.pop()??Object.create(rb);return t.lView=e,t}function nb(e){e.lView[He]!==e&&(e.lView=null,qm.push(e))}var rb=j(m({},Un),{consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{Lr$1(e.lView)},consumerOnSignalRead(){this.lView[He]=this}});function ob(e){let t=e[He]??Object.create(ib);return t.lView=e,t}var ib=j(m({},Un),{consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Wt(e.lView);for(;t&&!Wm(t[w]);)t=Wt(t);t&&al(t)},consumerOnSignalRead(){this.lView[He]=this}});function Wm(e){return e.type!==2}function Zm(e){if(e[kr$1]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[kr$1])if(r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()),e[kr$1]===null))return;t=n&&!!(e[R]&8192)}}var sb=100;function Ym(e,t=0){let r=e[ut$1].rendererFactory;r.begin?.();try{ab(e,t)}finally{r.end?.()}}function ab(e,t){let n=vl();try{yl(!0),rd(e,t);let r=0;for(;Bo$1(e);){if(r===sb)throw new v(103,!1);r++,rd(e,1)}}finally{yl(n)}}function cb(e,t,n,r){if(or$1(t))return;let o=t[R];Ks(t);let a=!0,c=null,u=null;Wm(e)?(u=eb(t),c=Hn(u)):Qi$1()===null?(a=!1,u=ob(t),c=Hn(u)):t[He]&&(yo$1(t[He]),t[He]=null);try{sl(t),El(e.bindingStartIndex),n!==null&&Um(e,t,n,2,r);let l=(o&3)===3;if(l){let h=e.preOrderCheckHooks;h!==null&&ua$1(t,h,null)}else{let h=e.preOrderHooks;h!==null&&la(t,h,0,null),Al(t,0)}if(ub(t),Zm(t),Qm(t,0),e.contentQueries!==null&&um(e,t),true)if(l){let h=e.contentCheckHooks;h!==null&&ua$1(t,h)}else{let h=e.contentHooks;h!==null&&la(t,h,1),Al(t,1)}db(e,t);let d=e.components;d!==null&&Xm(t,d,0);let f=e.viewQuery;if(f!==null&&Gl(2,f,r),true)if(l){let h=e.viewCheckHooks;h!==null&&ua$1(t,h)}else{let h=e.viewHooks;h!==null&&la(t,h,2),Al(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[Hs]){for(let h of t[Hs])h();t[Hs]=null}Gm(t),t[R]&=-73}catch(l){throw Lr$1(t),l}finally{u!==null&&(yr$1(u,c),a&&nb(u)),Xs()}}function Qm(e,t){for(let n=em(e);n!==null;n=tm(n))for(let r=ne$1;r<n.length;r++){let o=n[r];Km(o,t)}}function ub(e){for(let t=em(e);t!==null;t=tm(t)){if(!(t[R]&2))continue;let n=t[rr$1];for(let r=0;r<n.length;r++){let o=n[r];al(o)}}}function lb(e,t,n){$(L.ComponentStart);let r=Je(t,e);try{Km(r,n)}finally{$(L.ComponentEnd,r[se$1])}}function Km(e,t){qs(e)&&rd(e,t)}function rd(e,t){let r=e[w],o=e[R],i=e[He],s=!!(t===0&&o&16);if(s||=!!(o&64&&t===0),s||=!!(o&1024),s||=!!(i?.dirty&&Ki$1(i)),s||=!1,i&&(i.dirty=!1),e[R]&=-9217,s)cb(r,e,r.template,e[se$1]);else if(o&8192){let a=I(null);try{Zm(e),Qm(e,1);let c=r.components;c!==null&&Xm(e,c,1),Gm(e)}finally{I(a)}}}function Xm(e,t,n){for(let r=0;r<t.length;r++)lb(e,t[r],n)}function db(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let o=n[r];if(o<0)bn$1(~o);else{let i=o,s=n[++r],a=n[++r];Up(s,i);let c=t[i];$(L.HostBindingsUpdateStart,c);try{a(2,c)}finally{$(L.HostBindingsUpdateEnd,c)}}}}finally{bn$1(-1)}}function qd(e,t){let n=vl()?64:1088;for(e[ut$1].changeDetectionScheduler?.notify(t);e;){e[R]|=n;let r=Wt(e);if(Pr$1(e)&&!r)return e;e=r}return null}function Jm(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function ev(e,t){let n=ne$1+t;if(n<e.length)return e[n]}function ci(e,t,n,r=!0){let o=t[w];if(fb(o,t,e,n),r){let s=td(n,e),a=t[K],c=a.parentNode(e[nr$1]);c!==null&&IC(o,e[we],a,t,c,s)}let i=t[Jn];i!==null&&i.firstChild!==null&&(i.firstChild=null)}function tv(e,t){let n=Xo(e,t);return n!==void 0&&ja$1(n[w],n),n}function Xo(e,t){if(e.length<=ne$1)return;let n=ne$1+t,r=e[n];if(r){let o=r[In];o!==null&&o!==e&&Fd(o,r),t>0&&(e[n-1][Qe]=r[Qe]);let i=Po$1(e,ne$1+t);wC(r[w],r);let s=i[Tt$1];s!==null&&s.detachView(i[w]),r[he]=null,r[Qe]=null,r[R]&=-129}return r}function fb(e,t,n,r){let o=ne$1+r,i=n.length;r>0&&(n[o-1][Qe]=t),r<i-ne$1?(t[Qe]=n[o],Zu(n,ne$1+r,t)):(n.push(t),t[Qe]=null),t[he]=n;let s=t[In];s!==null&&n!==s&&nv(s,t);let a=t[Tt$1];a!==null&&a.insertView(e),Ws(t),t[R]|=128}function nv(e,t){let n=e[rr$1],r=t[he];if(Qt(r))e[R]|=2;else{let o=r[he][Oe];t[Oe]!==o&&(e[R]|=2)}n===null?e[rr$1]=[t]:n.push(t)}var _n$1=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,n=t[w];return Ko(n,t,n.firstChild,[])}constructor(t,n){this._lView=t,this._cdRefInjectingView=n}get context(){return this._lView[se$1]}set context(t){this._lView[se$1]=t}get destroyed(){return or$1(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[he];if(Ke(t)){let n=t[Uo$1],r=n?n.indexOf(this):-1;r>-1&&(Xo(t,r),Po$1(n,r))}this._attachedToViewContainer=!1}ja$1(this._lView[w],this._lView)}onDestroy(t){Zs(this._lView,t)}markForCheck(){qd(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[R]&=-129}reattach(){Ws(this._lView),this._lView[R]|=128}detectChanges(){this._lView[R]|=1024,Ym(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new v(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=Pr$1(this._lView),n=this._lView[In];n!==null&&!t&&Fd(n,this._lView),Am(this._lView[w],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new v(902,!1);this._appRef=t;let n=Pr$1(this._lView),r=this._lView[In];r!==null&&!n&&nv(r,this._lView),Ws(this._lView)}};var qr$1=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=hb;constructor(n,r,o){this._declarationLView=n,this._declarationTContainer=r,this.elementRef=o}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(n,r){return this.createEmbeddedViewImpl(n,r)}createEmbeddedViewImpl(n,r,o){return new _n$1(ai(this._declarationLView,this._declarationTContainer,n,{embeddedViewInjector:r,dehydratedView:o}))}}return e})();function hb(){return Wd(Se(),M())}function Wd(e,t){return e.type&4?new qr$1(t,e,Yr$1(e,t)):null}function ui(e,t,n,r,o){let i=e.data[t];if(i===null)i=pb(e,t,n,r,o),jp()&&(i.flags|=32);else if(i.type&64){i.type=n,i.value=r,i.attrs=o;let s=Lp();i.injectorIndex=s===null?-1:s.injectorIndex}return Fr$1(i,!0),i}function pb(e,t,n,r,o){let i=pl(),s=gl(),a=s?i:i&&i.parent,c=e.data[t]=mb(e,a,n,t,r,o);return gb(e,c,i,s),c}function gb(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function mb(e,t,n,r,o,i){let s=t?t.injectorIndex:-1,a=0;return dl()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOff
4set:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:o,namespace:bl(),attrs:i,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function vb(e){let t=e[tl]??[],r=e[he][K],o=[];for(let i of t)i.data[im]!==void 0?o.push(i):yb(i,r);e[tl]=o}function yb(e,t){let n=0,r=e.firstChild;if(r){let o=e.data[om];for(;n<o;){let i=r.nextSibling;Em(t,r,!1),r=i,n++}}}var Db=()=>null;var Eb=()=>null;function wa$1(e,t){return Db(e,t)}function rv(e,t,n){return Eb(e,t,n)}var ov=class{};var sr$1=class{};var Mn$1=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>wb()};function wb(){let e=M(),n=Je(Se().index,e);return(Qt(n)?n:e)[K]}var iv=(()=>{class e{static ɵprov=b({token:e,providedIn:`root`,factory:()=>null})}return e})();function sv(e){return e.debugInfo?.className||e.type.name||null}var fa$1={};var Ia=class{injector;parentInjector;constructor(t,n){this.injector=t,this.parentInjector=n}get(t,n,r){let o=this.injector.get(t,fa$1,r);return o!==fa$1||n===fa$1?o:this.parentInjector.get(t,n,r)}};function av(e,t,n){return e[t]=n}function Ib(e,t){return e[t]}function et$1(e,t,n){if(n===oe$1)return!1;let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function Jo$1(e,t,n,r){let o=et$1(e,t,n);return et$1(e,t+1,r)||o}function cv(e,t,n,r,o,i){let s=Jo$1(e,t,n,r);return Jo$1(e,t+2,o,i)||s}function ha$1(e,t,n){return function r(o){let i=r.__ngNativeEl__;i!==void 0&&vI(o,i);qd(Kt(e)?Je(e.index,t):t,5);let a=t[se$1],c=yg(t,a,n,o),u=r.__ngNextListenerFn__;for(;u;)c=yg(t,a,u,o)&&c,u=u.__ngNextListenerFn__;return c}}function yg(e,t,n,r){let o=I(null);try{return $(L.OutputStart,t,n),n(r)!==!1}catch(i){return QC(e,i),!1}finally{$(L.OutputEnd,t,n),I(o)}}function uv(e,t,n,r,o,i,s,a){let c=$s(e),u=!1,l=null;if(!r&&c&&(l=bb(t,n,i,e.index)),l!==null){let d=l.__ngLastListenerFn__||l;d.__ngNextListenerFn__=s,l.__ngLastListenerFn__=s,u=!0}else{let d=Xe(e,n),f=r?r(d):d;r||(a.__ngNativeEl__=d);let h=o.listen(f,i,a);if(!Cb(i))lv(r?y=>r(Ie(y[e.index])):e.index,t,n,i,a,h,!1)}return u}function Cb(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function bb(e,t,n,r){let o=e.cleanup;if(o!=null)for(let i=0;i<o.length-1;i+=2){let s=o[i];if(s===n&&o[i+1]===r){let a=t[xr$1],c=o[i+2];return a&&a.length>c?a[c]:null}typeof s==`string`&&(i+=2)}return null}function lv(e,t,n,r,o,i,s){let a=t.firstCreatePass?ul(t):null,c=cl(n),u=c.length;c.push(o,i),a&&a.push(r,e,u,(u+1)*(s?-1:1))}function Dg(e,t,n,r,o,i){let s=t[n],a=t[w],d=s[a.data[n].outputs[r]].subscribe(i);lv(e.index,a,t,o,i,d,!0)}var od=Symbol(`BINDING`);var lr$1=new D(``);function Ca$1(e,t,n){let r=n?e.styles:null,o=n?e.classes:null,i=0;if(t!==null)for(let s=0;s<t.length;s++){let a=t[s];if(typeof a==`number`)i=a;else if(i==1)o=ks(o,a);else if(i==2){let c=a,u=t[++s];r=ks(r,c+`: `+u+`;`)}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=o:e.classesWithoutHost=o}function Ce(e,t=0){let n=M();if(n===null)return E(e,t);return Zg(Se(),n,Fe(e),t)}function li(){throw new Error(`invalid`)}function Sb(e,t,n,r,o){let i=r===null?null:{"":-1},s=o(e,n);if(s!==null){let a=s,c=null,u=null;for(let l of s)if(l.resolveHostDirectives!==null){[a,c,u]=l.resolveHostDirectives(s);break}Mb(e,t,n,a,i,c,u)}i!==null&&r!==null&&Tb(n,r,i)}function Tb(e,t,n){let r=e.localNames=[];for(let o=0;o<t.length;o+=2){let i=n[t[o+1]];if(i==null)throw new v(-301,!1);r.push(t[o],i)}}function _b(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function Mb(e,t,n,r,o,i,s){let a=r.length,c=null;for(let f=0;f<a;f++){let h=r[f];c===null&&Xt$1(h)&&(c=h,_b(e,n,f)),iI(zg(n,t),e,h.type)}kb(n,e.data.length,a),c?.viewProvidersResolver&&c.viewProvidersResolver(c);for(let f=0;f<a;f++){let h=r[f];h.providersResolver&&h.providersResolver(h)}let u=!1,l=!1,d=Fm(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let f=0;f<a;f++){let h=r[f];if(n.mergedAttrs=$r$1(n.mergedAttrs,h.hostAttrs),Rb(e,n,t,d,h),Ob(d,h,o),s!==null&&s.has(h)){let[y,S]=s.get(h);n.directiveToIndex.set(h.type,[d,y+n.directiveStart,S+n.directiveStart])}else(i===null||!i.has(h))&&n.directiveToIndex.set(h.type,d);h.contentQueries!==null&&(n.flags|=4),(h.hostBindings!==null||h.hostAttrs!==null||h.hostVars!==0)&&(n.flags|=64);let g=h.type.prototype;
4!u&&(g.ngOnChanges||g.ngOnInit||g.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),u=!0),!l&&(g.ngOnChanges||g.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),l=!0),d++}Nb(e,n,i)}function Nb(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let o=e.data[r];if(n===null||!n.has(o))Eg(0,t,o,r),Eg(1,t,o,r),Ig(t,r,!1);else{let i=n.get(o);wg(0,t,i,r),wg(1,t,i,r),Ig(t,r,!0)}}}function Eg(e,t,n,r){let o=e===0?n.inputs:n.outputs;for(let i in o)if(Object.hasOwn(o,i)){let s;e===0?s=t.inputs??={}:s=t.outputs??={},s[i]??=[],s[i].push(r),dv(t,i)}}function wg(e,t,n,r){let o=e===0?n.inputs:n.outputs;for(let i in o)if(Object.hasOwn(o,i)){let s=o[i],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,i),dv(t,s)}}function dv(e,t){t===`class`?e.flags|=8:t===`style`&&(e.flags|=16)}function Ig(e,t,n){let{attrs:r,inputs:o,hostDirectiveInputs:i}=e;if(r===null||!n&&o===null||n&&i===null||Od(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let s=null,a=0;for(;a<r.length;){let c=r[a];if(c===0){a+=4;continue}else if(c===5){a+=2;continue}else if(typeof c==`number`)break;if(!n&&Object.hasOwn(o,c)){let u=o[c];for(let l of u)if(l===t){s??=[],s.push(c,r[a+1]);break}}else if(n&&Object.hasOwn(i,c)){let u=i[c];for(let l=0;l<u.length;l+=2)if(u[l]===t){s??=[],s.push(u[l+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(s)}function Rb(e,t,n,r,o){e.data[r]=o;let s=new Qo(o.factory||(o.factory=vn$1(o.type,!0)),Xt$1(o),Ce,null);e.blueprint[r]=s,n[r]=s,Ab(e,t,r,Fm(e,n,o.hostVars,oe$1),o)}function Ab(e,t,n,r,o){let i=o.hostBindings;if(i){let s=e.hostBindingOpCodes;s===null&&(s=e.hostBindingOpCodes=[]);let a=~t.index;xb(s)!=a&&s.push(a),s.push(n,r,i)}}function xb(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function Ob(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Xt$1(t)&&(n[``]=e)}}function kb(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function fv(e,t,n,r,o,i,s,a){let c=t[w],u=c.consts,d=ui(c,e,n,r,Nt$1(u,s));return i&&Sb(c,t,d,Nt$1(u,a),o),d.mergedAttrs=$r$1(d.mergedAttrs,d.attrs),d.attrs!==null&&Ca$1(d,d.attrs,!1),d.mergedAttrs!==null&&Ca$1(d,d.mergedAttrs,!0),c.queries!==null&&c.queries.elementStart(c,d),d}function hv(e,t){Yw(e,t),nl(t)&&e.queries.elementEnd(t)}function Pb(e,t,n,r,o,i){let s=t.consts,c=ui(t,e,n,r,Nt$1(s,o));if(c.mergedAttrs=$r$1(c.mergedAttrs,c.attrs),i!=null){let u=Nt$1(s,i);c.localNames=[];for(let l=0;l<u.length;l+=2)c.localNames.push(u[l],-1)}return c.attrs!==null&&Ca$1(c,c.attrs,!1),c.mergedAttrs!==null&&Ca$1(c,c.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,c),c}var pv=typeof ShadowRoot<`u`;var Lb=typeof Document<`u`;function Fb(e){return Object.keys(e).map(t=>{let[n,r,o]=e[t],i={propName:n,templateName:t,isSignal:(r&Ba$1.SignalBased)!==0};return o&&(i.transform=o),i})}function jb(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Ub(e,t,n){let r=t instanceof ee?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Ia(n,r):n}function Bb(e){let t=e.get(sr$1,null);if(t===null)throw new v(407,!1);return{rendererFactory:t,sanitizer:e.get(iv,null),changeDetectionScheduler:e.get(Zt$1,null),ngReflect:!1,tracingService:e.get(Ot$1,null,{optional:!0})}}function Vb(e,t,n){let r=gv(e);return ym(t,r,r===`svg`?Kn:r===`math`?zs:n)}function Hb(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new v(905,!1)}function gv(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Wr$1=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Fb(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=jb(this.componentDef.outputs),this.cachedOutputs}constructor(t,n){this.componentDef=t,this.ngModule=n,this.componentType=t.type,this.selector=aC(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!n}create(t,n,r,o,i,s,a){$(L.DynamicComponentStart);let c=I(null);try{let u=this.componentDef,l=Ub(u,o||this.ngModule,t),d=Bb(l),f=d.tracingService;return f&&f.componentCreate?f.componentCreate(sv(u),()=>this.createComponentRef(d,l,n,r,i,s,a)):this.createComponentRef(d,l,n,r,i,s,a)}finally{I(c)}}createComponentRef(t,n,r,o,i,s,a){let c=this.componentDef,u=$b(o,c,s,i),l=t.rendererFactory.createRenderer(null,c),d=o?FC(l,o,c.encapsulation,n):Vb(c,l,a??null);Hb(d);let f=n.get(lr$1,null),h=zb(d,()=>n.get(Z,null)??rm());f&&f.addHost(h);let g=s?.some(Cg)||i?.some(T=>typeof T!=`function`&&T.bindings.some(Cg)),y=Vd(null,u,null,512|Lm(c),null,null,t,l,n,null,cm(d,n,!0));f&&pv&&h instanceof ShadowRoot&&Zs(y,()=>{f.removeHost(h)}),y[re]=d,Ks(y);let S=null;try{let T=fv(re,y,2,`#host`,()=>u.directiveRegistry,!0,0);wm(l,d,T),zr$1(d,y),Bm(u,y,T),lm(u,T,y),hv(u,T),r!==void 0&&qb(T,this.ngContentSelectors,r),S=Je(T.index,y),y[se$1]=S[se$1],Gd(u,y,null)}catch(T){throw S!==null&&$l(S),$l(y),T}finally{$(L.DynamicComponentEnd),Xs()}return new ba$1(this.componentType,y,!!g)}};function $b(e,t,n,r){let o=e?[`ng-version`,`22.1.7`]:cC(t.selectors[0]),i=null,s=null,a=0;if(n)for(let l of n)a+=l[od].requiredVars,l.create&&(l.targetIdx=0,(i??=[]).push(l)),l.update&&(l.targetIdx=0,(s??=[]).push(l));if(r)for(let l=0;l<r.length;l++){let d=r[l];if(typeof d!=`function`)for(let f of d.bindings){a+=f[od].requiredVars;let h=l+1;f.create&&(f.targetIdx=h,(i??=[]).push(f)),f.update&&(f.targetIdx=h,(s??=[]).push(f))}}let c=[t];if(r)for(let l of r){let f=Gu(typeof l==`function`?l:l.type);c.push(f)}return Bd(0,null,Gb(i,s),1,a,c,null,null,null,[o],null)}function zb(e,t){let n=e.getRootNode?.();return Lb&&n instanceof Document?n.head:n&&pv&&n instanceof ShadowRoot?n:t().head}function Gb(e,t){return!e&&!t?null:n=>{if(n&1&&e)for(let r of e)r.create();
vendor: 16,820 bytes, line 4
4if(n&2&&t)for(let r of t)r.update()}}function Cg(e){let t=e[od].kind;return t===`input`||t===`twoWay`}var ba$1=class extends ov{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,n,r){super(),this._rootLView=n,this._hasInputBindings=r,this._tNode=Gs(n[w],re),this.location=Yr$1(this._tNode,n),this.instance=Je(this._tNode.index,n)[se$1],this.hostView=this.changeDetectorRef=new _n$1(n,void 0),this.componentType=t}setInput(t,n){this._hasInputBindings;let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),n))return;let o=this._rootLView;zd(r,o[w],o,t,n);this.previousInputValues.set(t,n);qd(Je(r.index,o),1)}get injector(){return new Sn$1(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function qb(e,t,n){let r=e.projection=[];for(let o=0;o<t.length;o++){let i=n[o];r.push(i!=null&&i.length?Array.from(i):null)}}var dr$1=(()=>{class e{static __NG_ELEMENT_ID__=Wb}return e})();function Wb(){return mv(Se(),M())}var id=class e extends dr$1{_lContainer;_hostTNode;_hostLView;constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return Yr$1(this._hostTNode,this._hostLView)}get injector(){return new Sn$1(this._hostTNode,this._hostLView)}get parentInjector(){let t=Id(this._hostTNode,this._hostLView);if(Vg(t)){let n=ma$1(t,this._hostLView),r=ga$1(t),o=n[w].data[r+8];return new Sn$1(o,n)}else return new Sn$1(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let n=bg(this._lContainer);return n!==null&&n[t]||null}get length(){return this._lContainer.length-ne$1}createEmbeddedView(t,n,r){let o,i;typeof r==`number`?o=r:r!=null&&(o=r.index,i=r.injector);let s=wa$1(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(n||{},i,s);return this.insertImpl(a,o,Gr$1(this._hostTNode,s)),a}createComponent(t,n,r,o,i,s,a){let c,u=n||{};c=u.index,r=u.injector,o=u.projectableNodes,i=u.environmentInjector||u.ngModuleRef,s=u.directives,a=u.bindings;let l=new Wr$1(yn$1(t)),d=r||this.parentInjector;if(!i&&l.ngModule==null){let T=this.parentInjector.get(ee,null);T&&(i=T)}let f=yn$1(l.componentType??{}),h=wa$1(this._lContainer,f?.id??null),g=h?.firstChild??null,y=l.create(d,o,g,i,s,a,this._getHostElementNamespace());return this.insertImpl(y.hostView,c,Gr$1(this._hostTNode,h)),y}_getHostElementNamespace(){if(this._hostTNode.type&2){let t=this._hostTNode.parent??this._hostLView[we];return t!==null&&t.type&2&&typeof t.value==`string`&&t.value.toLowerCase()===`foreignobject`?null:t?.namespace??null}return this._hostTNode.namespace}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){let o=t._lView;if(_p(o)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let c=o[he],u=new e(c,c[we],c[he]);u.detach(u.indexOf(t))}}let i=this._adjustIndex(n),s=this._lContainer;return ci(s,o,i,r),t.attachToViewContainerRef(),Zu(kl(s),i,t),t}move(t,n){return this.insert(t,n)}indexOf(t){let n=bg(this._lContainer);return n!==null?n.indexOf(t):-1}remove(t){let n=this._adjustIndex(t,-1),r=Xo(this._lContainer,n);r&&(Po$1(kl(this._lContainer),n),ja$1(r[w],r))}detach(t){let n=this._adjustIndex(t,-1),r=Xo(this._lContainer,n);return r&&Po$1(kl(this._lContainer),n)!=null?new _n$1(r):null}_adjustIndex(t,n=0){return t??this.length+n}};function bg(e){return e[Uo$1]}function kl(e){return e[Uo$1]||(e[Uo$1]=[])}function mv(e,t){let n,r=t[e.index];return Ke(r)?n=r:(n=Jm(r,t,null,e),t[e.index]=n,Hd(t,n)),Yb(n,t,e,r),new id(n,e,t)}function Zb(e,t){let n=e[K],r=n.createComment(``),o=Xe(t,e);return ir$1(n,n.parentNode(o),r,n.nextSibling(o),!1),r}var Yb=Xb;var Qb=()=>!1;function Kb(e,t,n){return Qb(e,t,n)}function Xb(e,t,n,r){if(e[nr$1])return;let o;n.type&8?o=Ie(r):o=Zb(t,n),e[nr$1]=o}var sd=class e{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}};var ad=class e{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,o=[];for(let i=0;i<r;i++){let s=n.getByIndex(i),a=this.queries[s.indexInDeclarationView];o.push(a.clone())}return new e(o)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)Zd(t,n).matches!==null&&this.queries[n].setDirty()}};var Sa$1=class{flags;read;predicate;constructor(t,n,r=null){this.flags=n,this.read=r,typeof t==`string`?this.predicate=sS(t):this.predicate=t}};var cd=class e{queries;constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){let o=n!==null?n.length:0,i=this.getByIndex(r).embeddedTView(t,o);i&&(i.indexInDeclarationView=r,n!==null?n.push(i):n=[i])}return n!==null?new e(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}};var ud=class e{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,n=-1){this.metadata=t,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new e(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];this.matchTNodeWithReadOption(t,n,Jb(n,i)),this.matchTNodeWithReadOption(t,n,da$1(n,t,i,!1,!1))}else r===qr$1?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,da$1(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let o=this.metadata.read;if(o!==null)if(o===xt||o===dr$1||o===qr$1&&n.type&4)this.addMatch(n.index,-2);else{let i=da$1(n,t,o,!1,!1);i!==null&&this.addMatch(n.index,i)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function Jb(e,t){let n=e.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1]}return null}function eS(e,t){return e.type&11?Yr$1(e,t):e.type&4?Wd(e,t):null}function tS(e,t,n,r){return n===-1?eS(t,e):n===-2?nS(e,t,r):ya$1(e,e[w],n,t)}function nS(e,t,n){if(n===xt)return Yr$1(t,e);if(n===qr$1)return Wd(t,e);if(n===dr$1)return mv(t,e)}function vv(e,t,n,r){let o=t[Tt$1].queries[r];if(o.matches===null){let i=e.data,s=n.matches,a=[];for(let c=0;s!==null&&c<s.length;c+=2){let u=s[c];if(u<0)a.push(null);else{let l=i[u];a.push(tS(t,l,s[c+1],n.metadata.read))}}o.matches=a}return o.matches}function ld(e,t,n,r){let o=e.queries.getByIndex(n),i=o.matches;if(i!==null){let s=vv(e,t,o,n);for(let a=0;a<i.length;a+=2){let c=i[a];if(c>0)r.push(s[a/2]);else{let u=i[a+1],l=t[-c];for(let d=ne$1;d<l.length;d++){let f=l[d];f[In]===f[he]&&ld(f[w],f,u,r)}if(l[rr$1]!==null){let d=l[rr$1];for(let f=0;f<d.length;f++){let h=d[f];ld(h[w],h,u,r)}}}}}return r}function rS(e,t){return e[Tt$1].queries[t].queryList}function yv(e,t,n){let r=new Da$1((n&4)===4);return Rp(e,t,r,r.destroy),(t[Tt$1]??=new ad).queries.push(new sd(r))-1}function oS(e,t,n){let r=ge();return r.firstCreatePass&&(Dv(r,new Sa$1(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),yv(r,M(),t)}function iS(e,t,n,r){let o=ge();if(o.firstCreatePass){let i=Se();Dv(o,new Sa$1(t,n,r),i.index),aS(o,e),(n&2)===2&&(o.staticContentQueries=!0)}return yv(o,M(),n)}function sS(e){return e.split(`,`).map(t=>t.trim())}function Dv(e,t,n){e.queries===null&&(e.queries=new cd),e.queries.track(new ud(t,n))}function aS(e,t){let n=e.contentQueries||(e.contentQueries=[]);t!==(n.length?n[n.length-1]:-1)&&n.push(e.queries.length-1,t)}function Zd(e,t){return e.queries.getByIndex(t)}function cS(e,t){let n=e[w],r=Zd(n,t);return r.crossesNgTemplate?ld(n,e,t,[]):vv(n,e,r,t)}function Qr$1(e){return!!e&&typeof e.then==`function`}function Yd(e){return!!e&&typeof e.subscribe==`function`}var ar$1=class{};var Va$1=class{};var Ta$1=class extends ar$1{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];constructor(t,n,r,o=!0){super(),this.ngModuleType=t,this._parent=n;let i=dp(t);this._bootstrapComponents=QI(i.bootstrap),this._r3Injector=Sl(t,n,[{provide:ar$1,useValue:this},...r],Ao$1(t),new Set([`environment`])),o&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}};var _a$1=class extends Va$1{moduleType;constructor(t){super(),this.moduleType=t}create(t){return new Ta$1(this.moduleType,t,[])}};var ei=class extends ar$1{injector;instance=null;constructor(t){super();let n=new Qn([...t.providers,{provide:ar$1,useValue:this}],t.parent||jo$1(),t.debugName,new Set([`environment`]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function Kr$1(e,t,n=null){return new ei({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var uS=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=Qu(!1,n.type),o=r.length>0?Kr$1([r],this._injector,``):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=b({token:e,providedIn:`environment`,factory:()=>new e(E(ee))})}return e})();function Qd(e){return ri(()=>{let t=Ev(e),n=j(m({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Cd.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?o=>o.get(uS).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||ht$1.Emulated,styles:e.styles||Ae$1,_:null,schemas:e.schemas||null,tView:null,id:``});t.standalone&&pt$1(`NgStandalone`),wv(n);let r=e.dependencies;return n.directiveDefs=Sg(r,lS),n.pipeDefs=Sg(r,fp),n.id=hS(n),n})}function lS(e){return yn$1(e)||Gu(e)}function nn$1(e){return ri(()=>({type:e.type,bootstrap:e.bootstrap||Ae$1,declarations:e.declarations||Ae$1,imports:e.imports||Ae$1,exports:e.exports||Ae$1,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function dS(e,t){if(e==null)return Dn;let n={};for(let r in e)if(Object.hasOwn(e,r)){let o=e[r],i,s,a,c;Array.isArray(o)?(a=o[0],i=o[1],s=o[2]??i,c=o[3]||null):(i=o,s=o,a=Ba$1.None,c=null),n[i]=[r,a,c],t[i]=s}return n}function fS(e){if(e==null)return Dn;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function fr$1(e){return ri(()=>{let t=Ev(e);return wv(t),t})}function Kd(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function Ev(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||Dn,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Ae$1,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:dS(e.inputs,t),outputs:fS(e.outputs),debugInfo:null}}function wv(e){e.features?.forEach(t=>t(e))}function Sg(e,t){return e?()=>{let n=typeof e==`function`?e():e,r=[];for(let o of n){let i=t(o);i!==null&&r.push(i)}return r}:null}function hS(e){let t=0,n=typeof e.consts==`function`?``:e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join(`|`))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,`c`+t}var Xd=new D(``);function Ha$1(e){return Yt([{provide:Xd,multi:!0,useValue:e}])}var Jd=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=p(Xd,{optional:!0})??[];injector=p(je$1);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let i=ue$1(this.injector,o);if(Qr$1(i))n.push(i);else if(Yd(i)){let s=new Promise((a,c)=>{i.subscribe({complete:a,error:c})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),n.length===0&&r(),this.initialized=!0}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function pS(e){return Object.getPrototypeOf(e.prototype).constructor}function Iv(e){let t=pS(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let o,i=Object.hasOwn(t,Oo$1)?t[Oo$1]:void 0,s=Object.hasOwn(t,ko$1)?t[ko$1]:void 0;if(Xt$1(e))o=i??s;else{if(i)throw new v(903,!1);o=s}if(o){if(n){r.push(o);let c=e;c.inputs=Pl(e.inputs),c.declaredInputs=Pl(e.declaredInputs),c.outputs=Pl(e.outputs);let u=o.hostBindings;u&&DS(e,u);let l=o.viewQuery,d=o.contentQueries;if(l&&vS(e,l),d&&yS(e,d),gS(e,o),lp(e.outputs,o.outputs),Xt$1(o)&&o.data.animation){let f=e.data;f.animation=(f.animation||[]).concat(o.data.animation)}}let a=o.features;if(a)for(let c=0;c<a.length;c++){let u=a[c];u&&u.ngInherit&&u(e),u===Iv&&(n=!1)}}t=Object.getPrototypeOf(t)}mS(r)}function gS(e,t){for(let n in t.inputs){if(!Object.hasOwn(t.inputs,n)||Object.hasOwn(e.inputs,n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function mS(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let o=e[r];o.hostVars=t+=o.hostVars,o.hostAttrs=$r$1(o.hostAttrs,n=$r$1(n,o.hostAttrs))}}function Pl(e){return e===Dn?{}:e===Ae$1?[]:e}function vS(e,t){let n=e.viewQuery;n?e.viewQuery=(r,o)=>{t(r,o),n(r,o)}:e.viewQuery=t}function yS(e,t){let n=e.contentQueries;n?e.contentQueries=(r,o,i)=>{t(r,o,i),n(r,o,i)}:e.contentQueries=t}function DS(e,t){let n=e.hostBindings;n?e.hostBindings=(r,o)=>{t(r,o),n(r,o)}:e.hostBindings=t}function ES(e,t,n,r,o,i,s,a){if(n.firstCreatePass){e.mergedAttrs=$r$1(e.mergedAttrs,e.attrs);let l=e.tView=Bd(2,e,o,i,s,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),l.queries=n.queries.embeddedTView(e))}a&&(e.flags|=a),Fr$1(e,!1);let c=wS(n,t,e,r);Js()&&jd(n,t,c,e),zr$1(c,t);let u=Jm(c,t,c,e);t[r+re]=u,Hd(t,u),Kb(u,e,t)}function ti(e,t,n,r,o,i,s,a,c,u,l){let d=n+re,f;if(t.firstCreatePass){if(f=ui(t,d,4,s||null,a||null),u!=null){let h=Nt$1(t.consts,u);f.localNames=[];for(let g=0;g<h.length;g+=2)f.localNames.push(h[g],-1)}}else f=t.data[d];return ES(f,e,t,n,r,o,i,c),u!=null&&$d(e,f,l),f}var wS=IS;function IS(e,t,n,r){return ea$1(!0),t[K].createComment(``)}var $a$1=(()=>{class e{log(n){console.log(n)}warn(n){console.warn(n)}static ɵfac=function(r){return new(r||e)};static ɵprov=b({token:e,factory:e.ɵfac,providedIn:`platform`})}return e})();var za$1=new D(``);var Xr$1=new D(``);var ef=new D(`USE_PENDING_TASKS`,{providedIn:`root`,factory:()=>typeof Zone>`u`});var di=(()=>{class e{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;pendingTasksInternal=p(lt$1);_usePendingTasks=p(ef);constructor(n,r,o){this._ngZone=n,this.registry=r,Xu()&&(this._destroyRef=p(xe,{optional:!0})??void 0),tf||(Cv(o),o.addToWindow(r)),this._watchAngularEvents(),n.run(()=>{this._taskTrackingZone=typeof Zone>`u`?null:Zone.current.get(`TaskTrackingZone`)})}_watchAngularEvents(){let n=this._ngZone.onUnstable.subscribe({next:()=>
4{this._isZoneStable=!1}}),r,o;this._ngZone.runOutsideAngular(()=>{this._usePendingTasks&&(r=this.pendingTasksInternal.hasPendingTasksObservable.subscribe(()=>{this.isStable()&&this._ngZone.runOutsideAngular(()=>{this._runCallbacksIfReady()})})),o=this._ngZone.onStable.subscribe({next:()=>{z$1.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})}),this._destroyRef?.onDestroy(()=>{n.unsubscribe(),r?.unsubscribe(),o.unsubscribe()})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks&&(!this._usePendingTasks||!this.pendingTasksInternal.hasPendingTasks)}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let n=this._callbacks.pop();clearTimeout(n.timeoutId),n.doneCb()}});else{let n=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>r.updateCb&&r.updateCb(n)?(clearTimeout(r.timeoutId),!1):!0)}}getPendingTasks(){return this._taskTrackingZone?this._taskTrackingZone.macroTasks.map(n=>({source:n.source,creationLocation:n.creationLocation,data:n.data})):[]}addCallback(n,r,o){let i=-1;r&&r>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==i),n()},r)),this._callbacks.push({doneCb:n,timeoutId:i,updateCb:o})}whenStable(n,r,o){if(o&&!this._taskTrackingZone)throw new Error(`Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?`);this.addCallback(n,r,o),this._runCallbacksIfReady()}registerApplication(n){this.registry.registerApplication(n,this)}unregisterApplication(n){this.registry.unregisterApplication(n)}findProviders(n,r,o){return[]}static ɵfac=function(r){return new(r||e)(E(z$1),E(fi),E(Xr$1))};static ɵprov=b({token:e,factory:e.ɵfac})}return e})();var fi=(()=>{class e{_applications=new Map;registerApplication(n,r){this._applications.set(n,r)}unregisterApplication(n){this._applications.delete(n)}unregisterAllApplications(){this._applications.clear()}getTestability(n){return this._applications.get(n)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(n,r=!0){return tf?.findTestabilityInTree(this,n,r)??null}static ɵfac=function(r){return new(r||e)};static ɵprov=b({token:e,factory:e.ɵfac,providedIn:`platform`})}return e})();function Cv(e){tf=e}var tf;var hi=new D(``);function bv(){iu(()=>{throw new v(600,``)})}var CS=10;var kt$1=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=p($e);afterRenderManager=p(Pd);zonelessEnabled=p(Ur$1);
4rootEffectScheduler=p(Rl);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new te$1;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=p(lt$1);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(q(n=>!n))}constructor(){p(Ot$1,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:o=>{o&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=p(ee);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){return this.bootstrapImpl(n,r)}bootstrapImpl(n,r,o=je$1.NULL){return this._injector.get(z$1).run(()=>{if($(L.BootstrapComponentStart),!this._injector.get(Jd).done)throw new v(405,``);let a=yn$1(n),c=this._injector.get(ar$1),u=new Wr$1(a,c);this.componentTypes.push(n);let{hostElement:l,directives:d,bindings:f}=bS(r),h=l||u.selector,g=u.create(o,[],h,c.injector,d,f),y=g.location.nativeElement,S=g.injector.get(za$1,null);return S?.registerApplication(y),g.onDestroy(()=>{this.detachView(g.hostView),Yo(this.components,g),S?.unregisterApplication(y)}),this._loadComponent(g),$(L.BootstrapComponentEnd,g),g})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){$(L.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(Pa$1.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw $(L.ChangeDetectionEnd),new v(101,!1);let n=I(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,I(n),this.afterTick.next(),$(L.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(sr$1,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<CS;){$(L.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{$(L.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let n=!1;if(this.dirtyFlags&7){let r=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:o}of this.allViews){if(!r&&!Bo$1(o))continue;Ym(o,r&&!this.zonelessEnabled?0:1),n=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}n||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>Bo$1(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;Yo(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView);try{this.tick()}catch(o){this.internalErrorHandler(o)}this.components.push(n),this._injector.get(hi,[]).forEach(o=>o(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>Yo(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new v(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function bS(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Yo(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function Ga$1(e,t,n,r){let o=M();if(et$1(o,Cn$1(),t)){ge();WC(Ho$1(),o,e,t,n,r)}return Ga$1}var dd=class{destroy(t){}updateValue(t,n){}swap(t,n){let r=Math.min(t,n),o=Math.max(t,n),i=this.detach(o);if(o-r>1){let s=this.detach(r);this.attach(r,i),this.attach(o,s)}else this.attach(r,i)}move(t,n){this.attach(n,this.detach(t))}};function Ll(e,t,n,r,o){return e===n&&Object.is(t,r)?1:Object.is(o(e,t),o(n,r))?-1:0}function SS(e,t,n,r){let o,i,s=0,a=e.length-1;if(Array.isArray(t)){I(r);let u=t.length-1;for(I(null);s<=a&&s<=u;){let l=e.at(s),d=t[s],f=Ll(s,l,s,d,n);if(f!==0){f<0&&e.updateValue(s,d),s++;continue}let h=e.at(a),g=t[u],y=Ll(a,h,u,g,n);if(y!==0){y<0&&e.updateValue(a,g),a--,u--;continue}let S=n(s,l),T=n(a,h),N=n(s,d);if(Object.is(N,T)){let k=n(u,g);Object.is(k,S)?(e.swap(s,a),e.updateValue(a,g),u--,a--):e.move(a,s),e.updateValue(s,d),s++;continue}if(o??=new Ma$1,i??=_g(e,s,a,n),fd(e,o,s,N))e.updateValue(s,d),s++,a++;else if(i.has(N))o.set(S,e.detach(s)),a--;else{let k=e.create(s,t[s]);e.attach(s,k),s++,a++}}for(;s<=u;)Tg(e,o,n,s,t[s]),s++}else if(t!=null){I(r);let u=t[Symbol.iterator]();I(null);let l=u.next();for(;!l.done&&s<=a;){let d=e.at(s),f=l.value,h=Ll(s,d,s,f,n);if(h!==0)h<0&&e.updateValue(s,f),s++,l=u.next();
4else{o??=new Ma$1,i??=_g(e,s,a,n);let g=n(s,f);if(fd(e,o,s,g))e.updateValue(s,f),s++,a++,l=u.next();else if(!i.has(g))e.attach(s,e.create(s,f)),s++,a++,l=u.next();else{let y=n(s,d);o.set(y,e.detach(s)),a--}}}for(;!l.done;)Tg(e,o,n,e.length,l.value),l=u.next()}for(;s<=a;)e.destroy(e.detach(a--));o?.forEach(u=>{e.destroy(u)})}function fd(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Tg(e,t,n,r,o){if(fd(e,t,r,n(r,o)))e.updateValue(r,o);else{let i=e.create(r,o);e.attach(r,i)}}function _g(e,t,n,r){let o=new Set;for(let i=t;i<=n;i++)o.add(r(i,e.at(i)));return o}var Ma$1=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let n=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(n)?(this.kvMap.set(t,this._vMap.get(n)),this._vMap.delete(n)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,n){if(this.kvMap.has(t)){let r=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(r);)r=o.get(r);o.set(r,n)}else this.kvMap.set(t,n)}forEach(t){for(let[n,r]of this.kvMap)if(t(r,n),this._vMap!==void 0){let o=this._vMap;for(;o.has(r);)r=o.get(r),t(r,n)}}};function TS(e,t,n,r,o,i,s,a){pt$1(`NgControlFlow`);let c=M(),u=ge();return ti(c,u,e,t,n,r,o,Nt$1(u.consts,i),256,s,a),nf}function nf(e,t,n,r,o,i,s,a){pt$1(`NgControlFlow`);let c=M(),u=ge();return ti(c,u,e,t,n,r,o,Nt$1(u.consts,i),512,s,a),nf}function _S(e,t){pt$1(`NgControlFlow`);let n=M(),r=Cn$1(),o=n[r]!==oe$1?n[r]:-1,i=o!==-1?Na$1(n,re+o):void 0,s=0;if(et$1(n,r,e)){let a=I(null);try{if(i!==void 0&&tv(i,s),e!==-1){let c=re+e,u=Na$1(n,c),l=md(n[w],c),d=rv(u,l,n);ci(u,ai(n,l,t,{dehydratedView:d}),s,Gr$1(l,d))}}finally{I(a)}}else if(i!==void 0){let a=ev(i,s);a!==void 0&&(a[se$1]=t)}}var hd=class{lContainer;$implicit;$index;constructor(t,n,r){this.lContainer=t,this.$implicit=n,this.$index=r}get $count(){return this.lContainer.length-ne$1}};function MS(e,t){return t}var pd=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,n,r){this.hasEmptyBlock=t,this.trackByFn=n,this.liveCollection=r}};function NS(e,t,n,r,o,i,s,a,c,u,l,d,f){pt$1(`NgControlFlow`);let h=M(),g=ge(),y=c!==void 0,S=M(),N=new pd(y,a?s.bind(S[Oe][se$1]):s);S[re+e]=N,ti(h,g,e+1,t,n,r,o,Nt$1(g.consts,i),256),y&&ti(h,g,e+2,c,u,l,d,Nt$1(g.consts,f),512)}var gd=class extends dd{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,n,r){super(),this.lContainer=t,this.hostLView=n,this.templateTNode=r}get length(){return this.lContainer.length-ne$1}at(t){return this.getLView(t)[se$1].$implicit}attach(t,n){let r=n[Jn];this.needsIndexUpdate||=t!==this.length,ci(this.lContainer,n,t,Gr$1(this.templateTNode,r)),AS(this.lContainer,t)}detach(t){return this.needsIndexUpdate||=t!==this.length-1,xS(this.lContainer,t),OS(this.lContainer,t)}create(t,n){let r=wa$1(this.lContainer,this.templateTNode.tView.ssrId);return ai(this.hostLView,this.templateTNode,new hd(this.lContainer,n,t),{dehydratedView:r})}destroy(t){ja$1(t[w],t)}updateValue(t,n){this.getLView(t)[se$1].$implicit=n}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[se$1].$index=t}getLView(t){return kS(this.lContainer,t)}};function RS(e){let t=I(null),n=Ue$2();try{let r=M(),o=r[w],i=r[n],s=n+1,a=Na$1(r,s);if(i.liveCollection===void 0)i.liveCollection=new gd(a,r,md(o,s));else i.liveCollection.reset();let c=i.liveCollection;if(SS(c,e,i.trackByFn,t),c.updateIndexes(),i.hasEmptyBlock){let u=Cn$1(),l=c.length===0;if(et$1(r,u,l)){let d=n+2,f=Na$1(r,d);if(l){let h=md(o,d),g=rv(f,h,r);ci(f,ai(r,h,void 0,{dehydratedView:g}),0,Gr$1(h,g))}else o.firstUpdatePass&&vb(f),tv(f,0)}}}finally{I(t)}}function Na$1(e,t){return e[t]}function AS(e,t){if(e.length<=ne$1)return;let r=e[ne$1+t],o=r?r[Mt$1]:void 0;if(r&&o&&o.detachedLeaveAnimationFns&&o.detachedLeaveAnimationFns.length>0){let i=r[St];gC(i,o),Tn$1.delete(r[_t$1]),o.detachedLeaveAnimationFns=void 0}}function xS(e,t){if(e.length<=ne$1)return;let r=e[ne$1+t],o=r?r[Mt$1]:void 0;o&&o.leave&&o.leave.size>0&&(o.detachedLeaveAnimationFns=[])}function OS(e,t){return Xo(e,t)}function kS(e,t){return ev(e,t)}function md(e,t){return Gs(e,t)}function Sv(e,t,n){let r=M();if(et$1(r,Cn$1(),t)){ge();VC(Ho$1(),r,e,t,r[K],n)}return Sv}function vd(e,t,n,r,o){zd(t,e,n,o?`class`:`style`,r)}function Ra(e,t,n,r){let o=M(),i=o[w],s=e+re,a=i.firstCreatePass?fv(s,o,2,t,qC,Op(),n,r):i.data[s];if(Kt(a)){let c=o[ut$1].tracingService;if(c&&c.componentCreate){let u=i.data[a.directiveStart+a.componentOff
4set];return c.componentCreate(sv(u),()=>(Mg(e,t,o,a,r),Ra))}}return Mg(e,t,o,a,r),Ra}function Mg(e,t,n,r,o){if(Hm(r,n,e,t,_v),$s(r)){let i=n[w];Bm(i,n,r),lm(i,r,n)}o!=null&&$d(n,r)}function rf(){let e=ge(),n=$m(Se());return e.firstCreatePass&&hv(e,n),fl(n)&&hl(),ll(),n.classesWithoutHost!=null&&Kw(n)&&vd(e,n,M(),n.classesWithoutHost,!0),n.stylesWithoutHost!=null&&Xw(n)&&vd(e,n,M(),n.stylesWithoutHost,!1),rf}function qa$1(e,t,n,r){return Ra(e,t,n,r),rf(),qa$1}function of(e,t,n,r){let o=M(),i=o[w],s=e+re,a=i.firstCreatePass?Pb(s,i,2,t,n,r):i.data[s];return Hm(a,o,e,t,_v),r!=null&&$d(o,a),of}function sf(){return fl($m(Se()))&&hl(),ll(),sf}function Tv(e,t,n,r){return of(e,t,n,r),sf(),Tv}var _v=(e,t,n,r,o)=>(ea$1(!0),ym(t[K],r,bl()));function PS(){return M()}function Mv(e,t,n){let r=M();if(et$1(r,Cn$1(),t)){ge();Vm(Ho$1(),r,e,t,r[K],n)}return Mv}var qo$1=void 0;function LS(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var FS=[`en`,[[`a`,`p`],[`AM`,`PM`]],[[`AM`,`PM`]],[[`S`,`M`,`T`,`W`,`T`,`F`,`S`],[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`]],qo$1,[[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],qo$1,[[`B`,`A`],[`BC`,`AD`],[`Before Christ`,`Anno Domini`]],0,[6,0],[`M/d/yy`,`MMM d, y`,`MMMM d, y`,`EEEE, MMMM d, y`],[`h:mmâ¯a`,`h:mm:ssâ¯a`,`h:mm:ssâ¯a z`,`h:mm:ssâ¯a zzzz`],[`{1}, {0}`,qo$1,qo$1,qo$1],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`Ã`,`â°`,`â`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,LS];var Fl=Object.create(null);function Ge$2(e){let t=jS(e),n=Ng(t);if(n)return n;let r=t.split(`-`)[0];if(n=Ng(r),n)return n;if(r===`en`)return FS;throw new v(701,!1)}function Ng(e){if(!(e in Fl)){let t=pe.ng&&pe.ng.common&&pe.ng.common.locales&&pe.ng.common.locales[e];return t!==void 0&&(Fl[e]=t),t}return Fl[e]}var le$1={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function jS(e){return e.toLowerCase().replace(/_/g,`-`)}var pi=`en-US`;function Nv(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function Wa$1(e,t,n){let r=M(),o=ge(),i=Se();return BS(o,r,r[K],i,e,t,n),Wa$1}function Rv(e,t,n){let r=M(),o=ge(),i=Se();return(i.type&3||n)&&uv(i,o,r,n,r[K],e,t,ha$1(i,r,t)),Rv}function BS(e,t,n,r,o,i,s){let a=!0,c=null;if((r.type&3||s)&&(c??=ha$1(r,t,i),uv(r,e,t,s,n,o,i,c)&&(a=!1)),a){let u=r.outputs?.[o],l=r.hostDirectiveOutputs?.[o];if(l&&l.length)for(let d=0;d<l.length;d+=2){let f=l[d],h=l[d+1];c??=ha$1(r,t,i),Dg(r,t,f,h,o,c)}if(u&&u.length)for(let d of u)c??=ha$1(r,t,i),Dg(r,t,d,o,o,c)}}function VS(e=1){return Gp(e)}function HS(e,t){let n=null,r=nC(e);for(let o=0;o<t.length;o++){let i=t[o];if(i===`*`){n=o;continue}if(r===null?Tm(e,i,!0):iC(r,i))return o}return n}function $S(e){let t=M()[Oe][we];if(!t.projection){let r=t.projection=yp(e?e.length:1,null),o=r.slice(),i=t.child;for(;i!==null;){if(i.type!==128){let s=e?HS(i,e):0;s!==null&&(o[s]?o[s].projectionNext=i:r[s]=i,o[s]=i)}i=i.next}}}function zS(e,t=0,n,r,o,i){let s=M(),a=ge(),c=r?e+1:null;c!==null&&ti(s,a,c,r,o,i,null,n);let u=ui(a,re+e,16,null,n||null);u.projection===null&&(u.projection=t),ml();let d=!s[Jn]||dl();s[Oe][we].projection[u.projection]===null&&c!==null?GS(s,a,c):d&&!Oa$1(u)&&RC(a,s,u)}function GS(e,t,n){let r=re+n,o=t.data[r],i=e[r],s=wa$1(i,o.tView.ssrId);ci(i,ai(e,o,void 0,{dehydratedView:s}),0,Gr$1(o,s))}function Za$1(e,t,n,r){return iS(e,t,n,r),Za$1}function Av(e,t,n){return oS(e,t,n),Av}function af(e){let t=M(),n=ge(),r=wl();Qs(r+1);let o=Zd(n,r);if(e.dirty&&Tp(t)===((o.metadata.flags&2)===2)){if(o.matches===null)e.reset([]);else{let i=cS(t,r);e.reset(i,fI),e.notifyOnChanges()}return!0}return!1}function cf(){return rS(M(),wl())}function qS(e){return ol(Fp(),re+e)}function ca$1(e,t){return e<<17|t<<2}function cr$1(e){return e>>17&32767}function WS(e){return(e&2)==2}function ZS(e,t){return e&131071|t<<17}function yd(e){return e|2}function Zr$1(e){return(e&131068)>>2}function jl(e,t){return e&-131069|t<<2}function YS(e){return(e&1)===1}function Dd(e){return e|1}function QS(e,t,n,r,o,i){let s=i?t.classBindings:t.styleBindings,a=cr$1(s),c=Zr$1(s);e[r]=n;let u=!1,l;if(Array.isArray(n)){let d=n;
vendor: 5,227 bytes, line 4
4l=d[1],(l===null||Ar$1(d,l)>0)&&(u=!0)}else l=n;if(o)if(c!==0){let f=cr$1(e[a+1]);e[r+1]=ca$1(f,a),f!==0&&(e[f+1]=jl(e[f+1],r)),e[a+1]=ZS(e[a+1],r)}else e[r+1]=ca$1(a,0),a!==0&&(e[a+1]=jl(e[a+1],r)),a=r;else e[r+1]=ca$1(c,0),a===0?a=r:e[c+1]=jl(e[c+1],r),c=r;u&&(e[r+1]=yd(e[r+1])),Rg(e,l,r,!0),Rg(e,l,r,!1),KS(t,l,e,r,i),s=ca$1(a,c),i?t.classBindings=s:t.styleBindings=s}function KS(e,t,n,r,o){let i=o?e.residualClasses:e.residualStyles;i!=null&&typeof t==`string`&&Ar$1(i,t)>=0&&(n[r+1]=Dd(n[r+1]))}function Rg(e,t,n,r){let o=e[n+1],i=t===null,s=r?cr$1(o):Zr$1(o),a=!1;for(;s!==0&&(a===!1||i);){let c=e[s],u=e[s+1];XS(c,t)&&(a=!0,e[s+1]=r?Dd(u):yd(u)),s=r?cr$1(u):Zr$1(u)}a&&(e[n+1]=r?yd(o):Dd(o))}function XS(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?Ar$1(e,t)>=0:!1}var ft$1={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function JS(e){return e.substring(ft$1.key,ft$1.keyEnd)}function eT(e){return tT(e),xv(e,Ov(e,0,ft$1.textEnd))}function xv(e,t){let n=ft$1.textEnd;return n===t?-1:(t=ft$1.keyEnd=nT(e,ft$1.key=t,n),Ov(e,t,n))}function tT(e){ft$1.key=0,ft$1.keyEnd=0,ft$1.value=0,ft$1.valueEnd=0,ft$1.textEnd=e.length}function Ov(e,t,n){for(;t<n&&e.charCodeAt(t)<=32;)t++;return t}function nT(e,t,n){for(;t<n&&e.charCodeAt(t)>32;)t++;return t}function kv(e,t){return iT(e,t,null,!0),kv}function rT(e){sT(fT,oT,e,!0)}function oT(e,t){for(let n=eT(t);n>=0;n=xv(t,n))Bs(e,JS(t),!0)}function iT(e,t,n,r){let o=M(),i=ge(),s=jr$1(2);if(i.firstUpdatePass&&Lv(i,e,s,r),t!==oe$1&&et$1(o,s,t)){let a=i.data[Ue$2()];Fv(i,a,o,o[K],e,o[s+1]=pT(t,n),r,s)}}function sT(e,t,n,r){let o=ge(),i=jr$1(2);o.firstUpdatePass&&Lv(o,null,i,r);let s=M();if(n!==oe$1&&et$1(s,i,n)){let a=o.data[Ue$2()];if(jv(a,r)&&!Pv(o,i)){let c=r?a.classesWithoutHost:a.stylesWithoutHost;c!==null&&(n=ks(c,n||``)),vd(o,a,s,n,r)}else hT(o,a,s,s[K],s[i+1],s[i+1]=dT(e,t,n),r,i)}}function Pv(e,t){return t>=e.expandoStartIndex}function Lv(e,t,n,r){let o=e.data;if(o[n+1]===null){let i=o[Ue$2()],s=Pv(e,n);jv(i,r)&&t===null&&!s&&(t=!1),t=aT(o,i,t,r),QS(o,i,t,n,s,r)}}function aT(e,t,n,r){let o=Vp(e),i=r?t.residualClasses:t.residualStyles;if(o===null)(r?t.classBindings:t.styleBindings)===0&&(n=Ul(null,e,t,n,r),n=ni(n,t.attrs,r),i=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==o)if(n=Ul(o,e,t,n,r),i===null){let c=cT(e,t,r);c!==void 0&&Array.isArray(c)&&(c=Ul(null,e,t,c[1],r),c=ni(c,t.attrs,r),uT(e,t,r,c))}else i=lT(e,t,r)}return i!==void 0&&(r?t.residualClasses=i:t.residualStyles=i),n}function cT(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Zr$1(r)!==0)return e[cr$1(r)]}function uT(e,t,n,r){let o=n?t.classBindings:t.styleBindings;e[cr$1(o)]=r}function lT(e,t,n){let r,o=t.directiveEnd;for(let i=1+t.directiveStylingLast;i<o;i++){let s=e[i].hostAttrs;r=ni(r,s,n)}return ni(r,t.attrs,n)}function Ul(e,t,n,r,o){let i=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(i=t[a],r=ni(r,i.hostAttrs,o),i!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function ni(e,t,n){let r=n?1:2,o=-1;if(t!==null)for(let i=0;i<t.length;i++){let s=t[i];typeof s==`number`?o=s:o===r&&(Array.isArray(e)||(e=e===void 0?[]:[``,e]),Bs(e,s,n?!0:t[++i]))}return e===void 0?null:e}function dT(e,t,n){if(n==null||n===``)return Ae$1;let r=[],o=ze$2(n);if(Array.isArray(o))for(let i=0;i<o.length;i++)e(r,o[i],!0);else if(o instanceof Set)for(let i of o)e(r,i,!0);else if(typeof o==`object`)for(let i in o)Object.hasOwn(o,i)&&e(r,i,o[i]);else typeof o==`string`&&t(r,o);return r}function fT(e,t,n){let r=String(t);r!==``&&!r.includes(` `)&&Bs(e,r,n)}function hT(e,t,n,r,o,i,s,a){o===oe$1&&(o=Ae$1);let c=0,u=0,l=0<o.length?o[0]:null,d=0<i.length?i[0]:null;for(;l!==null||d!==null;){let f=c<o.length?o[c+1]:void 0,h=u<i.length?i[u+1]:void 0,g=null,y;l===d?(c+=2,u+=2,f!==h&&(g=d,y=h)):d===null||l!==null&&l<d?(c+=2,g=l):(u+=2,g=d,y=h),g!==null&&Fv(e,t,n,r,g,y,s,a),l=c<o.length?o[c]:null,d=u<i.length?i[u]:null}}function Fv(e,t,n,r,o,i,s,a){if(!(t.type&3))return;let c=e.data,u=c[a+1];if(!Aa$1(YS(u)?Ag(c,t,n,o,Zr$1(u),s):void 0)){Aa$1(i)||WS(u)&&(i=Ag(c,null,n,o,a,s));xC(r,s,rl(Ue$2(),n),o,i)}}function Ag(e,t,n,r,o,i){let s=t===null,a;for(;o>0;){let c=e[o],u=Array.isArray(c),l=u?c[1]:c,d=l===null,f=n[o+1];f===oe$1&&(f=d?Ae$1:void 0);let h=d?Vs(f,r):l===r?f:void 0;if(u&&!Aa$1(h)&&(h=Vs(c,r)),Aa$1(h)&&(a=h,s))return a;let g=e[o+1];o=s?cr$1(g):Zr$1(g)}if(t!==null){let c=i?t.residualClasses:t.residualStyles;c!=null&&(a=Vs(c,r))}return a}function Aa$1(e){return e!==void 0}function pT(e,t){return e==null||e===``||(typeof t==`string`?e=ze$2(e)+t:typeof e==`object`&&(e=Ao$1(ze$2(e)))),e}function jv(e,t){return(e.flags&(t?8:16))!==0}function gT(e,t=``){let n=M(),r=ge(),o=e+re,i=r.firstCreatePass?ui(r,o,1,t,null):r.data[o],s=mT(r,n,i,t);n[o]=s,Js()&&jd(r,n,s,i),Fr$1(i,!1)}var mT=(e,t,n,r)=>(ea$1(!0),BI(t[K],r));function vT(e,t){let n=!1,r=Vo();for(let i=1;i<t.length;i+=2)n=et$1(e,r++,t[i])||n;if(El(r),!n)return oe$1;let o=t[0];for(let i=1;i<t.length;i+=2)o+=ve$1(t[i])+(i+1!==t.length?t[i+1]:``);return o}function yT(e,t,n,r=``){return et$1(e,Cn$1(),n)?t+ve$1(n)+r:oe$1}function Uv(e,t,n,r,o,i=``){let a=Jo$1(e,Vo(),n,o);return jr$1(2),a?t+ve$1(n)+r+ve$1(o)+i:oe$1}
4function DT(e,t,n,r,o,i,s,a,c,u=``){let d=cv(e,Vo(),n,o,s,c);return jr$1(4),d?t+ve$1(n)+r+ve$1(o)+i+ve$1(s)+a+ve$1(c)+u:oe$1}function ET(e,t,n,r,o,i,s,a,c,u,l,d,f,h=``){let g=Vo(),y=cv(e,g,n,o,s,c);return y=Jo$1(e,g+4,l,f)||y,jr$1(6),y?t+ve$1(n)+r+ve$1(o)+i+ve$1(s)+a+ve$1(c)+u+ve$1(l)+d+ve$1(f)+h:oe$1}function Bv(e){return uf(``,e),Bv}function uf(e,t,n){let r=M(),o=yT(r,e,t,n);return o!==oe$1&&gi(r,Ue$2(),o),uf}function Vv(e,t,n,r,o){let i=M(),s=Uv(i,e,t,n,r,o);return s!==oe$1&&gi(i,Ue$2(),s),Vv}function Hv(e,t,n,r,o,i,s,a,c){let u=M(),l=DT(u,e,t,n,r,o,i,s,a,c);return l!==oe$1&&gi(u,Ue$2(),l),Hv}function $v(e,t,n,r,o,i,s,a,c,u,l,d,f){let h=M(),g=ET(h,e,t,n,r,o,i,s,a,c,u,l,d,f);return g!==oe$1&&gi(h,Ue$2(),g),$v}function zv(e){let t=M(),n=vT(t,e);return n!==oe$1&&gi(t,Ue$2(),n),zv}function gi(e,t,n){let r=rl(t,e);VI(e[K],r,n)}function wT(e){return et$1(M(),Cn$1(),e)?ve$1(e):oe$1}function IT(e,t,n,r,o=``){return Uv(M(),e,t,n,r,o)}function CT(e,t){let n=Dl()+e,r=M();return r[n]===oe$1?av(r,n,t()):Ib(r,n)}function bT(e,t){let n=e[t];return n===oe$1?void 0:n}function ST(e,t,n,r,o,i,s){let a=t+n;return Jo$1(e,a,o,i)?av(e,a+2,s?r.call(s,o,i):r(o,i)):bT(e,a+2)}function TT(e,t){let n=ge(),r,o=e+re;n.firstCreatePass?(r=_T(t,n.pipeRegistry),n.data[o]=r,r.onDestroy&&(n.destroyHooks??=[]).push(o,r.onDestroy)):r=n.data[o];let i=r.factory||(r.factory=vn$1(r.type,!0)),a=Re(Ce);try{let c=va$1(!1),u=i();return va$1(c),il(n,M(),o,u),u}finally{Re(a)}}function _T(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function MT(e,t,n,r){let o=e+re,i=M(),s=ol(i,o);return NT(i,o)?ST(i,Dl(),t,s.transform,n,r,s):s.transform(n,r)}function NT(e,t){return e[w].data[t].pure}var Gv=(()=>{class e{applicationErrorHandler=p($e);appRef=p(kt$1);taskService=p(lt$1);ngZone=p(z$1);zonelessEnabled=p(Ur$1);tracing=p(Ot$1,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ie;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(No$1):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(p(oa$1,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let n=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(n);return}this.switchToMicrotaskScheduler(),this.taskService.remove(n)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let n=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})})}notify(n){if(!this.zonelessEnabled&&n===5)return;switch(n){case 0:case 2:this.appRef.dirtyFlags|=2;break;case 3:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 6:this.appRef.dirtyFlags|=2;break;case 12:this.appRef.dirtyFlags|=16;break;case 13:this.appRef.dirtyFlags|=2;break;case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?Qp:_l;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(No$1+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){this.applicationErrorHandler(r)}finally{this.taskService.remove(n),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function qv(){return[{provide:Zt$1,useExisting:Gv},{provide:z$1,useClass:Ro$1},{provide:Ur$1,useValue:!0}]}var lf=(()=>{class e{compileModuleSync(n){return new _a$1(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function RT(){return typeof $localize<`u`&&$localize.locale||pi}var mi=new D(``,{factory:()=>p(mi,{optional:!0,skipSelf:!0})||RT()});function vi$1(e,t){return Xi$1(e,t?.equal)}function W(e){return Ah(e)}
4(class e extends Error{_brand;constructor(t){super(t)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var AT=e=>e;function df(e,t){if(typeof e==`function`)return Zv(cu(e,AT,t?.equal),t?.debugName,t?.set);else return Zv(cu(e.source,e.computation,e.equal),e.debugName,e.set)}function Zv(e,t,n){let r=e[ye$1],o=e;if(n!==void 0){let i=s=>uu(r,s);o.set=s=>n(s,i),o.update=s=>n(s(W(e)),i)}else o.set=i=>uu(r,i),o.update=i=>Rh(r,i);return o.asReadonly=ta$1.bind(e),o}function Jv(e,t){let n=Object.create(Pg);n.value=e,n.transformFn=t?.transform;function r(){if(Bn(n),n.value===wd)throw new v(-950,null);return n.value}return r[ye$1]=n,r}var Qa$1=class{attributeName;constructor(t){this.attributeName=t}__NG_ELEMENT_ID__=()=>oi(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}};function hf(e){return BT(e)?e.default:e}function BT(e){return e&&typeof e==`object`&&`default`in e}function Qv(e,t){return Jv(e,t)}function VT(e){return Jv(wd,e)}var Ka$1=(Qv.required=VT,Qv);var ey=(()=>{class e{constructor(n){}static ɵfac=function(r){return new(r||e)(E(kt$1))};static ɵmod=nn$1({type:e});static ɵinj=bt({})}return e})();var Jr$1=(()=>{class e{static __NG_ELEMENT_ID__=$T}return e})();function $T(e){return zT(Se(),M(),(e&16)===16)}function zT(e,t,n){if(Kt(e)&&!n){let r=Je(e.index,t);return new _n$1(r,r)}else if(e.type&175){let r=t[Oe];return new _n$1(r,t)}return null}var GT=(()=>{class e{zone=p(z$1);changeDetectionScheduler=p(Zt$1);applicationRef=p(kt$1);applicationErrorHandler=p($e);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{try{this.applicationRef.dirtyFlags|=1,this.applicationRef._tick()}catch(n){this.applicationErrorHandler(n)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var qT=new D(``,{factory:()=>!1});function WT({ngZoneFactory:e,scheduleInRootZone:t}){return e??=()=>new z$1(j(m({},ty()),{scheduleInRootZone:t})),[{provide:Ur$1,useValue:!1},{provide:z$1,useFactory:e},{provide:En$1,multi:!0,useFactory:()=>{let n=p(GT,{optional:!0});return()=>n.initialize()}},{provide:En$1,multi:!0,useFactory:()=>{let n=p(ZT);return()=>{n.initialize()}}},{provide:oa$1,useValue:t??Tl}]}function dH(e){let t=e?.scheduleInRootZone,n=WT({ngZoneFactory:()=>{let r=ty(e);return r.scheduleInRootZone=t,r.shouldCoalesceEventChangeDetection&&pt$1(`NgZone_CoalesceEvent`),new z$1(r)},scheduleInRootZone:t});return Yt([{provide:qT,useValue:!0},n])}function ty(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var ZT=(()=>{class e{subscription=new ie;initialized=!1;zone=p(z$1);pendingTasks=p(lt$1);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{z$1.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{z$1.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var ff=new D(``);var YT=new D(``);function yi(e){return!e.moduleRef}function QT(e){let t=yi(e)?e.r3Injector:e.moduleRef.injector,n=t.get(z$1);return n.run(()=>{yi(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get($e),o;if(n.runOutsideAngular(()=>{o=n.onError.subscribe({next:r})}),yi(e)){let i=()=>t.destroy(),s=e.platformInjector.get(ff);s.add(i),t.onDestroy(()=>{o.unsubscribe(),s.delete(i)})}else{let i=()=>e.moduleRef.destroy(),s=e.platformInjector.get(ff);s.add(i),e.moduleRef.onDestroy(()=>{Yo(e.allPlatformModules,e.moduleRef),o.unsubscribe(),s.delete(i)})}return XT(r,n,()=>{let i=t.get(lt$1),s=i.add(),a=t.get(Jd);
4return a.runInitializers(),a.donePromise.then(()=>{if(Nv(t.get(mi,pi)||pi),!t.get(YT,!0))return yi(e)?t.get(kt$1):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(yi(e)){let l=t.get(kt$1);return e.rootComponent!==void 0&&l.bootstrap(e.rootComponent),l}else return KT?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>{i.remove(s)})})})}var KT;function XT(e,t,n){try{let r=n();return Qr$1(r)?r.catch(o=>{throw t.runOutsideAngular(()=>e(o)),o}):r}catch(r){throw t.runOutsideAngular(()=>e(r)),r}}var Ya$1=null;function JT(e=[],t){return je$1.create({name:t,providers:[{provide:Fo$1,useValue:`platform`},{provide:ff,useValue:new Set([()=>Ya$1=null])},...e]})}function e_(e=[]){if(Ya$1)return Ya$1;let t=JT(e);return Ya$1=t,bv(),t_(t),t}function t_(e){let t=e.get(na$1,null);ue$1(e,()=>{t?.forEach(n=>n())})}function ny(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:o}=e;$(L.BootstrapApplicationStart);try{let i=o?.injector??e_(r);return QT({r3Injector:new ei({providers:[qv(),Xp,...n||[]],parent:i,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:i,rootComponent:t})}catch(i){return Promise.reject(i)}finally{$(L.BootstrapApplicationEnd)}}function Di$1(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}function pf(e){let t=yn$1(e);if(!t)return null;let n=new Wr$1(t);return{get selector(){return n.selector},get type(){return n.componentType},get inputs(){return n.inputs},get outputs(){return n.outputs},get ngContentSelectors(){return n.ngContentSelectors},get isStandalone(){return t.standalone},get isSignal(){return t.signals}}}var ry=null;function gt(){return ry}function gf(e){ry??=e}var Ei=class{};var rn$1=(()=>{class e{historyGo(n){throw new Error(``)}static ɵfac=function(r){return new(r||e)};static ɵprov=b({token:e,factory:()=>p(oy),providedIn:`platform`})}return e})();var mf=new D(``);var oy=(()=>{class e extends rn$1{_location;_history;_doc=p(Z);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return gt().getBaseHref(this._doc)}onPopState(n){let r=gt().getGlobalEventTarget(this._doc,`window`);return r.addEventListener(`popstate`,n,!1),()=>r.removeEventListener(`popstate`,n)}onHashChange(n){let r=gt().getGlobalEventTarget(this._doc,`window`);return r.addEventListener(`hashchange`,n,!1),()=>r.removeEventListener(`hashchange`,n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,o){this._history.pushState(n,r,o)}replaceState(n,r,o){this._history.replaceState(n,r,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static ɵfac=function(r){return new(r||e)};static ɵprov=b({token:e,factory:()=>new e,providedIn:`platform`})}return e})();function Xa$1(e,t){return e?t?e.endsWith(`/`)?t.startsWith(`/`)?e+t.slice(1):e+t:t.startsWith(`/`)?e+t:`${e}/${t}`:e:t}function iy(e){let t=e.search(/#|\?|$/);return e[t-1]===`/`?e.slice(0,t-1)+e.slice(t):e}function mt$1(e){return e&&e[0]!==`?`?`?${e}`:e}var vt=(()=>{class e{historyGo(n){throw new Error(``)}static ɵfac=function(r){return new(r||e)};static ɵprov=b({token:e,factory:()=>p(ec),providedIn:`root`})}return e})();var Ja$1=new D(``);var ec=(()=>{class e extends vt{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??p(Z).location?.origin??``}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return Xa$1(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+mt$1(this._platformLocation.search),o=this._platformLocation.hash;return o&&n?`${r}${o}`:r}pushState(n,r,o,i){let s=this.prepareExternalUrl(o+mt$1(i));this._platformLocation.pushState(n,r,s)}replaceState(n,r,o,i){let s=this.prepareExternalUrl(o+mt$1(i));this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static ɵfac=function(r){return new(r||e)(E(rn$1),E(Ja$1,8))};static ɵprov=b({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var Nn$1=(()=>
4{class e{_subject=new te$1;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=o_(iy(sy(r))),this._locationStrategy.onPopState(o=>{let i={url:this.path(!0),pop:!0,state:o.state,type:o.type};o.hasUAVisualTransition&&(i.hasUAVisualTransition=!0),this._subject.next(i)})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=``){return this.path()==this.normalize(n+mt$1(r))}normalize(n){return e.stripTrailingSlash(r_(this._basePath,sy(n)))}prepareExternalUrl(n){return n&&n[0]!==`/`&&(n=`/`+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r=``,o=null){this._locationStrategy.pushState(o,``,n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+mt$1(r)),o)}replaceState(n,r=``,o=null){this._locationStrategy.replaceState(o,``,n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+mt$1(r)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n=``,r){this._urlChangeListeners.forEach(o=>o(n,r))}subscribe(n,r,o){return this._subject.subscribe({next:n,error:r??void 0,complete:o??void 0})}static normalizeQueryParams=mt$1;static joinWithSlash=Xa$1;static stripTrailingSlash=iy;static ɵfac=function(r){return new(r||e)(E(vt))};static ɵprov=b({token:e,factory:()=>n_(),providedIn:`root`})}return e})();function n_(){return new Nn$1(E(vt))}function r_(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===``||[`/`,`;`,`?`,`#`].includes(n[0])?n:t}function sy(e){return e.replace(/\/index\.html$/,``)}function o_(e){if(new RegExp(`^(https?:)?//`).test(e)){let[,n]=e.split(/\/\/[^\/]+/);return n}return e}var Ef=(()=>{class e extends vt{_platformLocation;_baseHref=``;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,r!=null&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){let r=this._platformLocation.hash??`#`;return r.length>0?r.substring(1):r}prepareExternalUrl(n){let r=Xa$1(this._baseHref,n);return r.length>0?`#`+r:r}pushState(n,r,o,i){let s=this.prepareExternalUrl(o+mt$1(i))||this._platformLocation.pathname;this._platformLocation.pushState(n,r,s)}replaceState(n,r,o,i){let s=this.prepareExternalUrl(o+mt$1(i))||this._platformLocation.pathname;this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static ɵfac=function(r){return new(r||e)(E(rn$1),E(Ja$1,8))};static ɵprov=b({token:e,factory:e.ɵfac})}return e})();var Te=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(Te||{});var G=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(G||{});var Be$1=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(Be$1||{});var sn$1={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function cy(e){return Ge$2(e)[le$1.LocaleId]}function uy(e,t,n){let r=Ge$2(e);return tt$2(tt$2([r[le$1.DayPeriodsFormat],r[le$1.DayPeriodsStandalone]],t),n)}
vendor: 6,280 bytes, line 4
4function ly(e,t,n){let r=Ge$2(e);return tt$2(tt$2([r[le$1.DaysFormat],r[le$1.DaysStandalone]],t),n)}function dy(e,t,n){let r=Ge$2(e);return tt$2(tt$2([r[le$1.MonthsFormat],r[le$1.MonthsStandalone]],t),n)}function fy(e,t){let r=Ge$2(e)[le$1.Eras];return tt$2(r,t)}function wi$1(e,t){return tt$2(Ge$2(e)[le$1.DateFormat],t)}function Ii$1(e,t){return tt$2(Ge$2(e)[le$1.TimeFormat],t)}function Ci$1(e,t){let r=Ge$2(e)[le$1.DateTimeFormat];return tt$2(r,t)}function bi(e,t){let n=Ge$2(e),r=n[le$1.NumberSymbols][t];if(typeof r>`u`){if(t===sn$1.CurrencyDecimal)return n[le$1.NumberSymbols][sn$1.Decimal];if(t===sn$1.CurrencyGroup)return n[le$1.NumberSymbols][sn$1.Group]}return r}function hy(e){if(!e[le$1.ExtraData])throw new v(2303,!1)}function py(e){let t=Ge$2(e);return hy(t),(t[le$1.ExtraData][2]||[]).map(r=>typeof r==`string`?vf(r):[vf(r[0]),vf(r[1])])}function gy(e,t,n){let r=Ge$2(e);hy(r);return tt$2(tt$2([r[le$1.ExtraData][0],r[le$1.ExtraData][1]],t)||[],n)||[]}function tt$2(e,t){for(let n=t;n>-1;n--)if(typeof e[n]<`u`)return e[n];throw new v(2304,!1)}function vf(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var i_=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;var tc=Object.create(null);var s_=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?: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}|c{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 a_=256;function my(e,t,n,r){let o=v_(e);c_(t),t=on$1(n,t)||t;let s=[],a;for(;t;)if(a=s_.exec(t),a){s=s.concat(a.slice(1));let l=s.pop();if(!l)break;t=l}else{s.push(t);break}let c=o.getTimezoneOffset();r&&(c=yy(r,c),o=m_(o,r));let u=``;return s.forEach(l=>{let d=p_(l);u+=d?d(o,n,c):l===`''`?`'`:l.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),u}function c_(e){if(e.length>a_)throw new v(2300,!1)}function sc(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function on$1(e,t){let n=cy(e);if(tc[n]??=Object.create(null),tc[n][t])return tc[n][t];let r=``;switch(t){case`shortDate`:r=wi$1(e,Be$1.Short);break;case`mediumDate`:r=wi$1(e,Be$1.Medium);break;case`longDate`:r=wi$1(e,Be$1.Long);break;case`fullDate`:r=wi$1(e,Be$1.Full);break;case`shortTime`:r=Ii$1(e,Be$1.Short);break;case`mediumTime`:r=Ii$1(e,Be$1.Medium);break;case`longTime`:r=Ii$1(e,Be$1.Long);break;case`fullTime`:r=Ii$1(e,Be$1.Full);break;case`short`:let o=on$1(e,`shortTime`),i=on$1(e,`shortDate`);r=nc(Ci$1(e,Be$1.Short),[o,i]);break;case`medium`:let s=on$1(e,`mediumTime`),a=on$1(e,`mediumDate`);r=nc(Ci$1(e,Be$1.Medium),[s,a]);break;case`long`:let c=on$1(e,`longTime`),u=on$1(e,`longDate`);r=nc(Ci$1(e,Be$1.Long),[c,u]);break;case`full`:let l=on$1(e,`fullTime`),d=on$1(e,`fullDate`);r=nc(Ci$1(e,Be$1.Full),[l,d]);break}return r&&(tc[n][t]=r),r}function nc(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(n,r){return Object.hasOwn(t,r)?t[r]:n})),e}function yt(e,t,n=`-`,r,o){let i=``;(e<0||o&&e<=0)&&(o?e=-e+1:(e=-e,i=n));let s=String(e);for(;s.length<t;)s=`0`+s;return r&&(s=s.slice(s.length-t)),i+s}function u_(e,t){return yt(e,3).substring(0,t)}function de(e,t,n=0,r=!1,o=!1){return function(i,s){let a=l_(e,i);if((n>0||a>-n)&&(a+=n),e===3)a===0&&n===-12&&(a=12);else if(e===6)return u_(a,t);let c=bi(s,sn$1.MinusSign);return yt(a,t,c,r,o)}}function l_(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new v(2301,!1)}}function Y(e,t,n=Te.Format,r=!1){return function(o,i){return d_(o,i,e,t,n,r)}}function d_(e,t,n,r,o,i){switch(n){case 2:return dy(t,o,r)[e.getMonth()];case 1:return ly(t,o,r)[e.getDay()];case 0:let s=e.getHours(),a=e.getMinutes();if(i){let u=py(t),l=gy(t,o,r),d=u.findIndex(f=>{if(Array.isArray(f)){let[h,g]=f,y=s>=h.hours&&a>=h.minutes,S=s<g.hours||s===g.hours&&a<g.minutes;if(h.hours<g.hours){if(y&&S)return!0}else if(y||S)return!0}else if(f.hours===s&&f.minutes===a)return!0;return!1});if(d!==-1)return l[d]}return uy(t,o,r)[s<12?0:1];case 3:return fy(t,r)[e.getFullYear()<=0?0:1];default:throw new v(2302,!1)}}function rc(e){return function(t,n,r){let o=-1*r,i=bi(n,sn$1.MinusSign),s=o>0?Math.floor(o/60):Math.ceil(o/60);switch(e){case 0:return(o>=0?`+`:``)+yt(s,2,i)+yt(Math.abs(o%60),2,i);case 1:return`GMT`+(o>=0?`+`:``)+yt(s,1,i);case 2:return`GMT`+(o>=0?`+`:``)+yt(s,2,i)+`:`+yt(Math.abs(o%60),2,i);case 3:return r===0?`Z`:(o>=0?`+`:``)+yt(s,2,i)+`:`+yt(Math.abs(o%60),2,i);default:throw new v(2310,!1)}}}var f_=0;var ic=4;function h_(e){let t=sc(e,f_,1).getDay();return sc(e,0,1+(t<=ic?ic:ic+7)-t)}function vy(e){let t=e.getDay(),n=t===0?-3:ic-t;return sc(e.getFullYear(),e.getMonth(),e.getDate()+n)}function yf(e,t=!1){return function(n,r){let o;if(t){let i=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,s=n.getDate();o=1+Math.floor((s+i)/7)}else{let i=vy(n),s=h_(i.getFullYear()),a=i.getTime()-s.getTime();o=1+Math.round(a/6048e5)}return yt(o,e,bi(r,sn$1.MinusSign))}}function oc(e,t=!1){return function(n,r){return yt(vy(n).getFullYear(),e,bi(r,sn$1.MinusSign),t)}}var Df=Object.create(null);function p_(e){if(Df[e])return Df[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Y(3,G.Abbreviated);break;case`GGGG`:t=Y(3,G.Wide);break;case`GGGGG`:t=Y(3,G.Narrow);break;case`y`:t=de(0,1,0,!1,!0);break;case`yy`:t=de(0,2,0,!0,!0);break;case`yyy`:t=de(0,3,0,!1,!0);break;case`yyyy`:t=de(0,4,0,!1,!0);break;case`Y`:t=oc(1);break;case`YY`:t=oc(2,!0);break;case`YYY`:t=oc(3);break;case`YYYY`:t=oc(4);break;case`M`:case`L`:t=de(1,1,1);break;case`MM`:case`LL`:t=de(1,2,1);break;case`MMM`:t=Y(2,G.Abbreviated);break;case`MMMM`:t=Y(2,G.Wide);break;case`MMMMM`:t=Y(2,G.Narrow);break;case`LLL`:t=Y(2,G.Abbreviated,Te.Standalone);break;case`LLLL`:t=Y(2,G.Wide,Te.Standalone);break;case`LLLLL`:t=Y(2,G.Narrow,Te.Standalone);break;case`w`:t=yf(1);break;case`ww`:t=yf(2);break;case`W`:t=yf(1,!0);break;case`d`:t=de(2,1);break;case`dd`:t=de(2,2);break;case`c`:case`cc`:t=de(7,1);break;case`ccc`:t=Y(1,G.Abbreviated,Te.Standalone);break;case`cccc`:t=Y(1,G.Wide,Te.Standalone);break;case`ccccc`:t=Y(1,G.Narrow,Te.Standalone);break;case`cccccc`:t=Y(1,G.Short,Te.Standalone);break;
4case`E`:case`EE`:case`EEE`:t=Y(1,G.Abbreviated);break;case`EEEE`:t=Y(1,G.Wide);break;case`EEEEE`:t=Y(1,G.Narrow);break;case`EEEEEE`:t=Y(1,G.Short);break;case`a`:case`aa`:case`aaa`:t=Y(0,G.Abbreviated);break;case`aaaa`:t=Y(0,G.Wide);break;case`aaaaa`:t=Y(0,G.Narrow);break;case`b`:case`bb`:case`bbb`:t=Y(0,G.Abbreviated,Te.Standalone,!0);break;case`bbbb`:t=Y(0,G.Wide,Te.Standalone,!0);break;case`bbbbb`:t=Y(0,G.Narrow,Te.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Y(0,G.Abbreviated,Te.Format,!0);break;case`BBBB`:t=Y(0,G.Wide,Te.Format,!0);break;case`BBBBB`:t=Y(0,G.Narrow,Te.Format,!0);break;case`h`:t=de(3,1,-12);break;case`hh`:t=de(3,2,-12);break;case`H`:t=de(3,1);break;case`HH`:t=de(3,2);break;case`m`:t=de(4,1);break;case`mm`:t=de(4,2);break;case`s`:t=de(5,1);break;case`ss`:t=de(5,2);break;case`S`:t=de(6,1);break;case`SS`:t=de(6,2);break;case`SSS`:t=de(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=rc(0);break;case`ZZZZZ`:t=rc(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=rc(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=rc(2);break;default:return null}return Df[e]=t,t}function yy(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function g_(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function m_(e,t,n){let o=e.getTimezoneOffset();return g_(e,-1*(yy(t,o)-o))}function v_(e){if(ay(e))return e;if(typeof e==`number`&&!isNaN(e))return new Date(e);if(typeof e==`string`){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[o,i=1,s=1]=e.split(`-`).map(a=>+a);return sc(o,i-1,s)}let n=parseFloat(e);if(!isNaN(e-n))return new Date(n);let r;if(r=e.match(i_))return y_(r)}let t=new Date(e);if(!ay(t))throw new v(2311,!1);return t}function y_(e){let t=new Date(0),n=0,r=0,o=e[8]?t.setUTCFullYear:t.setFullYear,i=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),o.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let s=Number(e[4]||0)-n,a=Number(e[5]||0)-r,c=Number(e[6]||0),u=Math.floor(parseFloat(`0.`+(e[7]||0))*1e3);return i.call(t,s,a,c,u),t}function ay(e){return e instanceof Date&&!isNaN(e.valueOf())}function D_(e,t){return new v(2100,!1)}var E_=`mediumDate`;var Dy=new D(``);var Ey=new D(``);var w_=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(n,r,o){this.locale=n,this.defaultTimezone=r,this.defaultOptions=o}transform(n,r,o,i){if(n==null||n===``||n!==n)return null;try{let s=r??this.defaultOptions?.dateFormat??E_,a=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return my(n,s,i||this.locale,a)}catch(s){throw D_(e,s.message)}}static ɵfac=function(r){return new(r||e)(Ce(mi,16),Ce(Dy,24),Ce(Ey,24))};static ɵpipe=Kd({name:`date`,type:e,pure:!0})}return e})();var wf=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵmod=nn$1({type:e});static ɵinj=bt({})}return e})();function Si(e,t){t=encodeURIComponent(t);for(let n of e.split(`;`)){let r=n.indexOf(`=`),[o,i]=r==-1?[n,``]:[n.slice(0,r),n.slice(r+1)];if(o.trim()!==t)continue;let s=i;try{s=decodeURIComponent(i)}catch(a){}return s.length>1&&s[0]===`"`&&s[s.length-1]===`"`&&(s=s.slice(1,-1)),s}return null}var I_=(()=>{class e{build(){return new XMLHttpRequest}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var If=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=b({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=E(I_),o},providedIn:`root`})}return e})();var wy=`browser`;var bf=(()=>{class e{static ɵprov=b({token:e,providedIn:`root`,factory:()=>new Cf(p(Z),window)})}return e})();var Cf=class{document;window;offset=()=>[0,0];constructor(t,n){this.document=t,this.window=n}setOffset(t){Array.isArray(t)?this.offset=()=>t:this.offset=t}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(t,n){this.window.scrollTo(j(m({},n),{left:t[0],top:t[1]}))}scrollToAnchor(t,n){let r=b_(this.document,t);r&&(this.scrollToElement(r,n),r.focus({preventScroll:!0}))}setHistoryScrollRestoration(t){try{this.window.history.scrollRestoration=t}catch(n){console.warn(at$2(2400,!1))}}scrollToElement(t,n){let r=t.getBoundingClientRect(),o=r.left+this.window.pageXOffset,i=r.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(j(m({},n),{left:o-s[0],top:i-s[1]}))}};function b_(e,t){let n=e.getElementById(t)||e.getElementsByName(t)[0];if(n)return n;if(typeof e.createTreeWalker==`function`&&e.body&&typeof e.body.attachShadow==`function`){let r=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT),o=r.currentNode;for(;o;){let i=o.shadowRoot;if(i){let s=i.getElementById(t)||i.querySelector(`[name="${CSS.escape(t)}"]`);if(s)return s}o=r.nextNode()}}return null}var jt$1=class e{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t==`string`?this.lazyInit=()=>{this.headers=new Map,t.split(` 5`).forEach(n=>{let r=n.indexOf(`:`);
vendor: 4,547 bytes, line 5
5if(r>0){let o=n.slice(0,r),i=n.slice(r+1).trim();this.addHeaderEntry(o,i)}})}:typeof Headers<`u`&&t instanceof Headers?(this.headers=new Map,t.forEach((n,r)=>{this.addHeaderEntry(r,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([n,r])=>{this.setHeaderEntries(n,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let n=this.headers.get(t.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,n){return this.clone({name:t,value:n,op:`a`})}set(t,n){return this.clone({name:t,value:n,op:`s`})}delete(t,n){return this.clone({name:t,value:n,op:`d`})}maybeSetNormalizedName(t,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,t)}init(){this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init();for(let[n,r]of t.headers.entries())this.headers.set(n,r),this.normalizedNames.set(n,t.normalizedNames.get(n))}clone(t){let n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}applyUpdate(t){let n=t.name.toLowerCase();switch(t.op){case`a`:case`s`:let r=t.value;if(typeof r==`string`&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,n);let o=t.op===`a`?(this.headers.get(n)||[]).slice():[];o.push(...r),this.headers.set(n,o);break;case`d`:let i=t.value;if(i===void 0)this.headers.delete(n),this.normalizedNames.delete(n);else{let s=Array.isArray(i)?i:[i],a=this.headers.get(n);if(!a)return;a=a.filter(c=>s.indexOf(c)===-1),a.length===0?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,a)}break}}addHeaderEntry(t,n){let r=t.toLowerCase();this.maybeSetNormalizedName(t,r),this.headers.has(r)?this.headers.get(r).push(n):this.headers.set(r,[n])}setHeaderEntries(t,n){let r=(Array.isArray(n)?n:[n]).map(i=>i.toString()),o=t.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}};var cc=class{map=new Map;set(t,n){return this.map.set(t,n),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};var uc=class{encodeKey(t){return Iy(t)}encodeValue(t){return Iy(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function T_(e,t){let n=new Map;return e.length>0&&e.replace(/^\?/,``).split(`&`).forEach(o=>{let i=o.indexOf(`=`),[s,a]=i==-1?[t.decodeKey(o),``]:[t.decodeKey(o.slice(0,i)),t.decodeValue(o.slice(i+1))],c=n.get(s)||[];c.push(a),n.set(s,c)}),n}var __=/%(\d[a-f0-9])/gi;var M_={40:`@`,"3A":`:`,24:`$`,"2C":`,`,"3B":`;`,"3D":`=`,"3F":`?`,"2F":`/`};function Iy(e){return encodeURIComponent(e).replace(__,(t,n)=>M_[n]??t)}function ac(e){return`${e}`}var an$1=class e{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new uc,t.fromString){if(t.fromObject)throw new v(2805,!1);this.map=T_(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(n=>{let r=t.fromObject[n],o=Array.isArray(r)?r.map(ac):[ac(r)];this.map.set(n,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let n=this.map.get(t);return n?n[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,n){return this.clone({param:t,value:n,op:`a`})}appendAll(t){let n=[];return Object.keys(t).forEach(r=>{let o=t[r];Array.isArray(o)?o.forEach(i=>{n.push({param:r,value:i,op:`a`})}):n.push({param:r,value:o,op:`a`})}),this.clone(n)}set(t,n){return this.clone({param:t,value:n,op:`s`})}delete(t,n){return this.clone({param:t,value:n,op:`d`})}toString(){return this.init(),this.keys().map(t=>{let n=this.encoder.encodeKey(t);return this.map.get(t).map(r=>n+`=`+this.encoder.encodeValue(r)).join(`&`)}).filter(t=>t!==``).join(`&`)}clone(t){let n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(t),n}init(){if(this.map===null&&(this.map=new Map),this.cloneFrom!==null){this.cloneFrom.init();for(let[t,n]of this.cloneFrom.map.entries())this.map.set(t,n);
5this.updates.forEach(t=>{switch(t.op){case`a`:case`s`:let n=t.op===`a`?(this.map.get(t.param)||[]).slice():[];n.push(ac(t.value)),this.map.set(t.param,n);break;case`d`:if(t.value!==void 0){let r=(this.map.get(t.param)||[]).slice(),o=r.indexOf(ac(t.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null}}};function N_(e){switch(e){case`DELETE`:case`GET`:case`HEAD`:case`OPTIONS`:case`JSONP`:return!1;default:return!0}}function Cy(e){return typeof ArrayBuffer<`u`&&e instanceof ArrayBuffer}function by(e){return typeof Blob<`u`&&e instanceof Blob}function Sy(e){return typeof FormData<`u`&&e instanceof FormData}function R_(e){return typeof URLSearchParams<`u`&&e instanceof URLSearchParams}var Ti$1=`Content-Type`;var lc=`Accept`;var Ny=`text/plain`;var Ry=`application/json`;var Ay=`${Ry}, ${Ny}, */*`;var eo$1=class e{url;body=null;headers;context;reportProgress=!1;reportUploadProgress=!1;reportDownloadProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType=`json`;method;params;urlWithParams;transferCache;timeout;constructor(t,n,r,o){this.url=n,this.method=t.toUpperCase();let i;if(N_(this.method)||o?(this.body=r!==void 0?r:null,i=o):i=r,i){if(this.reportProgress=!!i.reportProgress,this.reportUploadProgress=!!i.reportUploadProgress,this.reportDownloadProgress=!!i.reportDownloadProgress,this.withCredentials=!!i.withCredentials,this.keepalive=!!i.keepalive,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params),i.priority&&(this.priority=i.priority),i.cache&&(this.cache=i.cache),i.credentials&&(this.credentials=i.credentials),typeof i.timeout==`number`){if(i.timeout<1||!Number.isInteger(i.timeout))throw new v(2822,``);this.timeout=i.timeout}i.mode&&(this.mode=i.mode),i.redirect&&(this.redirect=i.redirect),i.integrity&&(this.integrity=i.integrity),i.referrer!==void 0&&(this.referrer=i.referrer),i.referrerPolicy&&(this.referrerPolicy=i.referrerPolicy),this.transferCache=i.transferCache}if(this.headers??=new jt$1,this.context??=new cc,!this.params)this.params=new an$1,this.urlWithParams=n;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=n;else{let a=n,c=``,u=n.indexOf(`#`);u!==-1&&(c=n.substring(u),a=n.substring(0,u));let l=a.indexOf(`?`),d=l===-1?`?`:l<a.length-1?`&`:``;this.urlWithParams=a+d+s+c}}}serializeBody(){return this.body===null?null:typeof this.body==`string`||Cy(this.body)||by(this.body)||Sy(this.body)||R_(this.body)?this.body:this.body instanceof an$1?this.body.toString():typeof this.body==`object`||typeof this.body==`boolean`||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Sy(this.body)?null:by(this.body)?this.body.type||null:Cy(this.body)?null:typeof this.body==`string`?Ny:this.body instanceof an$1?`application/x-www-form-urlencoded;charset=UTF-8`:typeof this.body==`object`||typeof this.body==`number`||typeof this.body==`boolean`?Ry:null}clone(t={}){let n=t.method||this.method,r=t.url||this.url,o=t.responseType||this.responseType,i=t.keepalive??this.keepalive,s=t.priority||this.priority,a=t.cache||this.cache,c=t.mode||this.mode,u=t.redirect||this.redirect,l=t.credentials||this.credentials,d=t.referrer??this.referrer,f=t.integrity||this.integrity,h=t.referrerPolicy||this.referrerPolicy,g=t.transferCache??this.transferCache,y=t.timeout??this.timeout,S=t.body!==void 0?t.body:this.body,T=t.withCredentials??this.withCredentials,N=t.reportProgress??this.reportProgress,k=t.reportUploadProgress??this.reportUploadProgress,Pe=t.reportDownloadProgress??this.reportDownloadProgress,rt=t.headers||this.headers,ce=t.params||this.params,Vt=t.context??this.context;return t.setHeaders!==void 0&&(rt=Object.keys(t.setHeaders).reduce((dn,wt)=>dn.set(wt,t.setHeaders[wt]),rt)),t.setParams&&(ce=Object.keys(t.setParams).reduce((dn,wt)=>dn.set(wt,t.setParams[wt]),ce)),new e(n,r,S,{params:ce,headers:rt,context:Vt,reportProgress:N,reportUploadProgress:k,reportDownloadProgress:Pe,responseType:o,withCredentials:T,transferCache:g,keepalive:i,cache:a,priority:s,timeout:y,mode:c,redirect:u,credentials:l,referrer:d,integrity:f,referrerPolicy:h})}};
5var Ft$1=(function(e){return e[e.Sent=0]=`Sent`,e[e.UploadProgress=1]=`UploadProgress`,e[e.ResponseHeader=2]=`ResponseHeader`,e[e.DownloadProgress=3]=`DownloadProgress`,e[e.Response=4]=`Response`,e[e.User=5]=`User`,e})(Ft$1||{});var to$1=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(t,n=200,r=`OK`){this.headers=t.headers||new jt$1,this.status=t.status!==void 0?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.redirected=t.redirected,this.responseType=t.responseType,this.ok=this.status>=200&&this.status<300}};var _i$1=class e extends to$1{constructor(t={}){super(t)}type=Ft$1.ResponseHeader;clone(t={}){return new e({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}};var no$1=class e extends to$1{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=Ft$1.Response;clone(t={}){return new e({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0,redirected:t.redirected??this.redirected,responseType:t.responseType??this.responseType})}};var Lt$1=class extends to$1{name=`HttpErrorResponse`;message;error;ok=!1;constructor(t){super(t,0,`Unknown Error`),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||`(unknown url)`}`:this.message=`Http failure response for ${t.url||`(unknown url)`}: ${t.status} ${t.statusText}`,this.error=t.error||null}};var xy=200;var A_=204;var x_=/^\)\]\}',?\n/;var Oy=new D(``,{factory:()=>null});var dc=(()=>{class e{fetchImpl=p(Tf,{optional:!0})?.fetch??((...n)=>globalThis.fetch(...n));ngZone=p(z$1);destroyRef=p(xe);maxResponseSize=p(Oy);handle(n){return new A$1(r=>{let o=new AbortController,i=!1,s={next:c=>{c.type===Ft$1.Response&&(i=!0),r.next(c)},error:c=>{i=!0,r.error(c)},complete:()=>{i=!0,r.complete()}};this.doRequest(n,o.signal,s).then(_f,c=>s.error(new Lt$1({error:c})));let a;return n.timeout&&(a=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException(`signal timed out`,`TimeoutError`))},n.timeout))),()=>{a!==void 0&&clearTimeout(a),!i&&!o.signal.aborted&&o.abort()}})}
5doRequest(n,r,o){return V(this,null,function*(){let i=this.createRequestInit(n),s;try{let S=this.ngZone.runOutsideAngular(()=>this.fetchImpl(n.urlWithParams,m({signal:r},i)));O_(S),o.next({type:Ft$1.Sent}),s=yield S}catch(S){o.error(new Lt$1({error:S,status:S.status??0,statusText:S.statusText,url:n.urlWithParams,headers:S.headers}));return}let a=new jt$1(s.headers),c=s.statusText,u=s.url||n.urlWithParams,l=s.status,d=null,f=n.reportProgress||n.reportDownloadProgress;if(f&&o.next(new _i$1({headers:a,status:l,statusText:c,url:u})),s.body){let S=s.headers.get(Ti$1)??``,T=s.headers.get(`content-length`),N=T!==null?Number(T):NaN;this.maxResponseSize!==null&&Number.isFinite(N)&&N>this.maxResponseSize&&(yield s.body.cancel(),Ty(this.maxResponseSize));let k=[],Pe=s.body.getReader(),rt=0,ce,Vt,dn=typeof Zone<`u`&&Zone.current,wt=!1;if(yield this.ngZone.runOutsideAngular(()=>V(this,null,function*(){for(;;){if(this.destroyRef.destroyed){yield Pe.cancel(),wt=!0;break}let{done:Xc,value:Jc}=yield Pe.read();if(Xc)break;if(k.push(Jc),rt+=Jc.length,this.maxResponseSize!==null&&rt>this.maxResponseSize&&(yield Pe.cancel(),Ty(this.maxResponseSize)),f){Vt=n.responseType===`text`?(Vt??``)+(ce??=_y(S)).decode(Jc,{stream:!0}):void 0;let Dh=()=>o.next({type:Ft$1.DownloadProgress,total:Number.isFinite(N)?N:void 0,loaded:rt,partialText:Vt});dn?dn.run(Dh):Dh()}}})),wt){o.complete();return}let oE=this.concatChunks(k,rt);try{d=this.parseBody(n,oE,S,l)}catch(Xc){o.error(new Lt$1({error:Xc,headers:new jt$1(s.headers),status:s.status,statusText:s.statusText,url:s.url||n.urlWithParams}));return}}l===0&&(l=d?xy:0);let h=l>=200&&l<300,g=s.redirected,y=s.type;h?(o.next(new no$1({body:d,headers:a,status:l,statusText:c,url:u,redirected:g,responseType:y})),o.complete()):o.error(new Lt$1({error:d,headers:a,status:l,statusText:c,url:u,redirected:g,responseType:y}))})}parseBody(n,r,o,i){switch(n.responseType){case`json`:let s=new TextDecoder().decode(r).replace(x_,``);if(s===``)return null;try{return JSON.parse(s)}catch(a){if(i<200||i>=300)return s;throw a}case`text`:return _y(o).decode(r);case`blob`:return new Blob([r],{type:o});case`arraybuffer`:return r.buffer}}createRequestInit(n){if(n.reportUploadProgress)throw new v(2824,!1);let r={},o;if(o=n.credentials,n.withCredentials&&(o=`include`),n.headers.forEach((i,s)=>r[i]=s.join(`,`)),n.headers.has(lc)||(r[lc]=Ay),!n.headers.has(Ti$1)){let i=n.detectContentTypeHeader();i!==null&&(r[Ti$1]=i)}return{body:n.serializeBody(),method:n.method,headers:r,credentials:o,keepalive:n.keepalive,cache:n.cache,priority:n.priority,mode:n.mode,redirect:n.redirect,referrer:n.referrer,integrity:n.integrity,referrerPolicy:n.referrerPolicy}}concatChunks(n,r){let o=new Uint8Array(r),i=0;for(let s of n)o.set(s,i),i+=s.length;return o}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var Tf=class{};function _f(){}function O_(e){e.then(_f,_f)}function Ty(e){throw new v(-2825,!1)}var k_=/charset=\s*["']?([^;"'\s]+)["']?/i;function _y(e){let t=e.match(k_);if(t!==null)try{return new TextDecoder(t[1])}catch(n){}return new TextDecoder}var P_=new D(``,{factory:()=>!0});var L_=`XSRF-TOKEN`;var F_=new D(``,{factory:()=>L_});var j_=`X-XSRF-TOKEN`;var U_=new D(``,{factory:()=>j_});var B_=(()=>{class e{cookieName=p(F_);doc=p(Z);lastCookieString=``;lastToken=null;parseCount=0;getToken(){let n=this.doc.cookie||``;return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=Si(n,this.cookieName),this.lastCookieString=n),this.lastToken}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var ky=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=b({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=E(B_),o},providedIn:`root`})}return e})();function Py(e,t){if(!p(P_)||e.method===`GET`||e.method===`HEAD`)return t(e);try{let o=p(rn$1).href,{origin:i}=new URL(o),{origin:s}=new URL(e.url,i);if(i!==s)return t(e)}catch(o){return t(e)}let n=p(ky).getToken(),r=p(U_);return n!=null&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,n)})),t(e)}function Ly(e,t){return t(e)}function V_(e,t){return(n,r)=>t.intercept(n,{handle:o=>e(o,r)})}function H_(e,t,n){return(r,o)=>ue$1(n,()=>t(r,i=>e(i,o)))}var Fy=new D(``);var Nf=new D(``,{factory:()=>[Py]});var jy=new D(``);var Rf=new D(``,{factory:()=>!0});function $_(){let e=null;return(t,n)=>{e===null&&(e=(p(Fy,{optional:!0})??[]).reduceRight(V_,Ly));let r=p(Br$1);if(p(Rf)){let i=r.add();return e(t,n).pipe(Mr$1(i))}else return e(t,n)}}var hc=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=b({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=E(dc),o},providedIn:`root`})}return e})();var fc=(()=>{class e{backend;injector;chain=null;pendingTasks=p(Br$1);contributeToStability=p(Rf);constructor(n,r){this.backend=n,this.injector=r}handle(n){if(this.chain===null){let o=this.injector.get(pc,null,{skipSelf:!0}),i=o!==null&&this.backend===o,s=this.injector.get(jy,[],i?{self:!0}:void 0),a=Array.from(new Set([...this.injector.get(Nf),...s]));this.chain=a.reduceRight((c,u)=>H_(c,u,this.injector),Ly)}let r=this.chain;if(this.contributeToStability){let o=this.pendingTasks.add();return W(()=>r(n,i=>
5this.backend.handle(i))).pipe(Mr$1(o))}else return W(()=>r(n,o=>this.backend.handle(o)))}static ɵfac=function(r){return new(r||e)(E(hc),E(ee))};static ɵprov=b({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var pc=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=b({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=E(fc),o},providedIn:`root`})}return e})();function Sf(e,t){return m({body:t},e)}var Uy=(()=>{class e{handler;constructor(n){this.handler=n}request(n,r,o={}){let i;if(n instanceof eo$1)i=n;else{let c;o.headers instanceof jt$1?c=o.headers:c=new jt$1(o.headers);let u;o.params&&(o.params instanceof an$1?u=o.params:u=new an$1({fromObject:o.params})),i=new eo$1(n,r,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:u,reportProgress:o.reportProgress,reportUploadProgress:o.reportUploadProgress,reportDownloadProgress:o.reportDownloadProgress,responseType:o.responseType||`json`,withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,referrerPolicy:o.referrerPolicy,integrity:o.integrity,timeout:o.timeout})}let s=_(i).pipe(gn$1(c=>this.handler.handle(c)));if(n instanceof eo$1||o.observe===`events`)return s;let a=s.pipe(Ve$1(c=>c instanceof no$1));switch(o.observe||`body`){case`body`:switch(i.responseType){case`arraybuffer`:return a.pipe(q(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new v(2806,!1);return c.body}));case`blob`:return a.pipe(q(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new v(2807,!1);return c.body}));case`text`:return a.pipe(q(c=>{if(c.body!==null&&typeof c.body!=`string`)throw new v(2808,!1);return c.body}));default:return a.pipe(q(c=>c.body))}case`response`:return a;default:throw new v(2809,!1)}}delete(n,r={}){return this.request(`DELETE`,n,r)}get(n,r={}){return this.request(`GET`,n,r)}head(n,r={}){return this.request(`HEAD`,n,r)}jsonp(n,r){return this.request(`JSONP`,n,{params:new an$1().append(r,`JSONP_CALLBACK`),observe:`body`,responseType:`json`})}options(n,r={}){return this.request(`OPTIONS`,n,r)}patch(n,r,o={}){return this.request(`PATCH`,n,Sf(o,r))}post(n,r,o={}){return this.request(`POST`,n,Sf(o,r))}put(n,r,o={}){return this.request(`PUT`,n,Sf(o,r))}static ɵfac=function(r){return new(r||e)(E(pc))};static ɵprov=b({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var z_=/^\)\]\}',?\n/;var Mf=(()=>{class e{xhrFactory;tracingService=p(Ot$1,{optional:!0});constructor(n){this.xhrFactory=n}maybePropagateTrace(n){return this.tracingService?.propagate?this.tracingService.propagate(n):n}handle(n){if(n.method===`JSONP`)throw new v(-2800,!1);let r=this.xhrFactory;return _(null).pipe(Ne$1(()=>new A$1(i=>{let s=r.build();if(s.open(n.method,n.urlWithParams),n.withCredentials&&(s.withCredentials=!0),n.headers.forEach((N,k)=>s.setRequestHeader(N,k.join(`,`))),n.headers.has(lc)||s.setRequestHeader(lc,Ay),!n.headers.has(Ti$1)){let N=n.detectContentTypeHeader();N!==null&&s.setRequestHeader(Ti$1,N)}if(n.timeout&&(s.timeout=n.timeout),n.responseType){let N=n.responseType.toLowerCase();s.responseType=N!==`json`?N:`text`}let a=n.serializeBody(),c=null,u=()=>{if(c!==null)return c;let N=s.statusText||`OK`,k=new jt$1(s.getAllResponseHeaders()),Pe=s.responseURL||n.url;return c=new _i$1({headers:k,status:s.status,statusText:N,url:Pe}),c},l=this.maybePropagateTrace(()=>{let{headers:N,status:k,statusText:Pe,url:rt}=u(),ce=null;k!==A_&&(ce=typeof s.response>`u`?s.responseText:s.response),k===0&&(k=ce?xy:0);let Vt=k>=200&&k<300;if(n.responseType===`json`&&typeof ce==`string`){let dn=ce;ce=ce.replace(z_,``);try{ce=ce!==``?JSON.parse(ce):null}catch(wt){ce=dn,Vt&&(Vt=!1,ce={error:wt,text:ce})}}Vt?(i.next(new no$1({body:ce,headers:N,status:k,statusText:Pe,url:rt||void 0})),i.complete()):i.error(new Lt$1({error:ce,headers:N,status:k,statusText:Pe,url:rt||void 0}))}),d=this.maybePropagateTrace(N=>{let{url:k}=u(),Pe=new Lt$1({error:N,status:s.status||0,statusText:s.statusText||`Unknown Error`,url:k||void 0});i.error(Pe)}),f=d;n.timeout&&(f=this.maybePropagateTrace(N=>{let{url:k}=u(),Pe=new Lt$1({error:new DOMException(`Request timed out`,`TimeoutError`),status:s.status||0,statusText:s.statusText||`Request timeout`,url:k||void 0});i.error(Pe)}));let h=!1,g=this.maybePropagateTrace(N=>{h||(i.next(u()),h=!0);let k={type:Ft$1.DownloadProgress,loaded:N.loaded};N.lengthComputable&&(k.total=N.total),n.responseType===`text`&&s.responseText&&(k.partialText=s.responseText),i.next(k)}),y=this.maybePropagateTrace(N=>{let k={type:Ft$1.UploadProgress,loaded:N.loaded};N.lengthComputable&&(k.total=N.total),i.next(k)});s.addEventListener(`load`,l),s.addEventListener(`error`,d),s.addEventListener(`timeout`,f),s.addEventListener(`abort`,d);let S=n.reportProgress||n.reportUploadProgress,T=n.reportProgress||n.reportDownloadProgress;return T&&s.addEventListener(`progress`,g),S&&a!==null&&s.upload&&s.upload.addEventListener(`progress`,y),s.send(a),i.next({type:Ft$1.Sent}),()=>{s.removeEventListener(`error`,d),s.removeEventListener(`abort`,d),s.removeEventListener(`load`,l),s.removeEventListener(`timeout`,f),T&&s.removeEventListener(`progress`,g),S&&a!==null&&s.upload&&s.upload.removeEventListener(`progress`,y),s.readyState!==s.DONE&&s.abort()}})))}static ɵfac=function(r){return new(r||e)(E(If))};static ɵprov=b({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var gc=(function(e){return e[e.Interceptors=0]=`Interceptors`,e[e.LegacyInterceptors=1]=`LegacyInterceptors`,e[e.CustomXsrfConfiguration=2]=`CustomXsrfConfiguration`,e[e.NoXsrfProtection=3]=`NoXsrfProtection`,e[e.JsonpSupport=4]=`JsonpSupport`,e[e.RequestsMadeViaParent=5]=`RequestsMadeViaParent`,e[e.Fetch=6]=`Fetch`,e[e.Xhr=7]=`Xhr`,e})(gc||{});function By(e,t){return{ɵkind:e,ɵproviders:t}}function G_(...e){let t=[Uy,dc,fc,{provide:pc,useExisting:fc},{provide:hc,useFactory:()=>p(dc)},{provide:Nf,useValue:Py,multi:!0}];for(let n of e)t.push(...n.ɵproviders);return Yt(t)}var My=new D(``);function q_(){return By(gc.LegacyInterceptors,[{provide:My,useFactory:$_},{provide:Nf,useExisting:My,multi:!0}])}function W_(){return By(gc.Xhr,[Mf,{provide:hc,useExisting:Mf}])}var Mi$1=class{_doc;constructor(t){this._doc=t}manager};var mc=(()=>{class e extends Mi$1{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o,i){return n.addEventListener(r,o,i),()=>this.removeEventListener(n,r,o,i)}removeEventListener(n,r,o,i){return n.removeEventListener(r,o,i)}static ɵfac=function(r){return new(r||e)(E(Z))};static ɵprov=b({token:e,factory:e.ɵfac})}return e})();var Dc=new D(``);var kf=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;
5constructor(n,r){this._zone=r,n.forEach(s=>{s.manager=this});let o=n.filter(s=>!(s instanceof mc));this._plugins=o.slice().reverse();let i=n.find(s=>s instanceof mc);i&&this._plugins.push(i)}addEventListener(n,r,o,i){return this._findPluginFor(r).addEventListener(n,r,o,i)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new v(-5101,!1);return this._eventNameToPlugin.set(n,r),r}static ɵfac=function(r){return new(r||e)(E(Dc),E(z$1))};static ɵprov=b({token:e,factory:e.ɵfac})}return e})();var Af=`ng-app-id`;function Vy(e){for(let t of e)t.remove()}function Hy(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Z_(e,t,n,r){let o=e.head?.querySelectorAll(`style[${Af}="${t}"],link[${Af}="${t}"]`);if(!o||o.length===0)return!1;for(let i of o)i.removeAttribute(Af),i instanceof HTMLLinkElement?r.set(i.href.slice(i.href.lastIndexOf(`/`)+1),{usage:0,elements:[i]}):i.textContent&&n.set(i.textContent,{usage:0,elements:[i]});return!0}function Of(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var Pf=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(n,r,o,i={}){this.doc=n,this.appId=r,this.nonce=o,Z_(n,r,this.inline,this.external)&&this.hosts.add(n.head)}addStyles(n,r){for(let o of n)this.addUsage(o,this.inline,Hy);r?.forEach(o=>this.addUsage(o,this.external,Of))}removeStyles(n,r){for(let o of n)this.removeUsage(o,this.inline);r?.forEach(o=>this.removeUsage(o,this.external))}addUsage(n,r,o){let i=r.get(n);i?i.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,o(n,this.doc)))})}removeUsage(n,r){let o=r.get(n);o&&(o.usage--,o.usage<=0&&(Vy(o.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])Vy(n);this.hosts.clear()}addHost(n){if(!this.hosts.has(n)){this.hosts.add(n);for(let[r,{elements:o}]of this.inline)o.push(this.addElement(n,Hy(r,this.doc)));for(let[r,{elements:o}]of this.external)o.push(this.addElement(n,Of(r,this.doc)))}}removeHost(n){this.hosts.delete(n);for(let r of[...this.inline.values(),...this.external.values()]){let o=[];for(let i of r.elements)i.parentNode===n?i.remove():o.push(i);r.elements=o}}addElement(n,r){return this.nonce&&r.setAttribute(`nonce`,this.nonce),n.appendChild(r)}static ɵfac=function(r){return new(r||e)(E(Z),E($o),E(Go$1,8),E(zo$1))};static ɵprov=b({token:e,factory:e.ɵfac})}return e})();var xf={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/`,math:`http://www.w3.org/1998/Math/MathML`};var Lf=/%COMP%/g;var zy=`%COMP%`;var Y_=`_nghost-${zy}`;var Q_=`_ngcontent-${zy}`;var K_=!0;var X_=new D(``,{factory:()=>K_});var J_=new D(``);function eM(e){return Q_.replace(Lf,e)}function tM(e){return Y_.replace(Lf,e)}function Gy(e,t){return t.map(n=>n.replace(Lf,e))}var Ff=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(n,r,o,i,s,a,c=null,u=null,l=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=i,this.doc=s,this.ngZone=a,this.nonce=c,this.tracingService=u,this.cssVarNamespace=l??``,this.defaultRenderer=new Ni$1(n,s,a,this.tracingService,this.cssVarNamespace)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;let o=this.getOrCreateRenderer(n,r);return o instanceof yc?o.applyToHost(n):o instanceof Ri$1&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,i=o.get(r.id);if(!i){let s=this.doc,a=this.ngZone,c=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,d=this.tracingService;switch(r.encapsulation){case ht$1.Emulated:i=new yc(c,u,r,this.appId,l,s,a,d,this.cssVarNamespace);break;case ht$1.ShadowDom:return new vc(c,n,r,s,a,this.nonce,d,this.cssVarNamespace,u);case ht$1.ExperimentalIsolatedShadowDom:return new vc(c,n,r,s,a,this.nonce,d,this.cssVarNamespace);default:i=new Ri$1(c,u,r,l,s,a,d,this.cssVarNamespace);break}o.set(r.id,i)}return i}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static ɵfac=function(r){return new(r||e)(E(kf),E(lr$1),E($o),E(X_),E(Z),E(z$1),E(Go$1
5),E(Ot$1,8),E(J_,8))};static ɵprov=b({token:e,factory:e.ɵfac})}return e})();var Ni$1=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,n,r,o,i=``){this.eventManager=t,this.doc=n,this.ngZone=r,this.tracingService=o,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(t,n){return n?this.doc.createElementNS(xf[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){($y(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){if(t){let o=$y(t)?t.content:t;if(r!=null&&r.parentNode!==o)throw new v(-5106,!1);o.insertBefore(n,r)}}removeChild(t,n){n.remove()}selectRootElement(t,n){let r=typeof t==`string`?this.doc.querySelector(t):t;if(!r)throw new v(-5104,!1);return n||(r.textContent=``),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,o){if(o){n=o+`:`+n;let i=xf[o];i?t.setAttributeNS(i,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let o=xf[r];o?t.removeAttributeNS(o,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,o){let i=n.startsWith(`--`);i&&(n=n.replace(`%NS%`,this.cssVarNamespace)),i||o&(At$1.DashCase|At$1.Important)?t.style.setProperty(n,r,o&At$1.Important?`important`:``):t.style[n]=r}removeStyle(t,n,r){let o=n.startsWith(`--`);o&&(n=n.replace(`%NS%`,this.cssVarNamespace)),o||r&At$1.DashCase?t.style.removeProperty(n):t.style[n]=``}setProperty(t,n,r){t!=null&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r,o){if(typeof t==`string`&&(t=gt().getGlobalEventTarget(this.doc,t),!t))throw new v(-5102,!1);let i=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(t,n,i)),this.eventManager.addEventListener(t,n,i,o)}decoratePreventDefault(t){return n=>{if(n===`__ngUnwrap__`)return t;t(n)===!1&&n.preventDefault()}}};function $y(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var vc=class extends Ni$1{hostEl;sharedStylesHost;shadowRoot;constructor(t,n,r,o,i,s,a,c,u){super(t,o,i,a,c),this.hostEl=n,this.sharedStylesHost=u,this.shadowRoot=n.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=r.styles;l=Gy(r.id,l).map(f=>f.replace(/%NS%/g,c));for(let f of l){let h=document.createElement(`style`);s&&h.setAttribute(`nonce`,s),h.textContent=f,this.shadowRoot.appendChild(h)}let d=r.getExternalStyles?.();if(d)for(let f of d){let h=Of(f,o);s&&h.setAttribute(`nonce`,s),this.shadowRoot.appendChild(h)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(null,n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}};var Ri$1=class extends Ni$1{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,n,r,o,i,s,a,c,u){super(t,i,s,a,c),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=o;let l=r.styles,d=u?Gy(u,l):l;this.styles=d.map(f=>f.replace(/%NS%/g,c)),this.styleUrls=r.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Tn$1.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}};var yc=class extends Ri$1{contentAttr;hostAttr;constructor(t,n,r,o,i,s,a,c,u){let l=o+`-`+r.id;super(t,n,r,i,s,a,c,u,l),this.contentAttr=eM(l),this.hostAttr=tM(l)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,``)}createElement(t,n){let r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,``),r}};var Ec=class e extends Ei{supportsDOMEvents=!0;static makeCurrent(){gf(new e)}onAndCancel(t,n,r,o){return t.addEventListener(n,r,o),()=>{t.removeEventListener(n,r,o)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument(`fakeTitle`)}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n===`window`?window:n===`document`?t:n===`body`?t.body:null}getBaseHref(t){let n=nM();return n==null?null:rM(n)}resetBaseElement(){Ai$1=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Si(document.cookie,t)}};var Ai$1=null;function nM(){return Ai$1=Ai$1||document.head.querySelector(`base`),Ai$1?Ai$1.getAttribute(`href`):null}function rM(e){return new URL(e,document.baseURI).pathname}var wc=class{addToWindow(t){pe.getAngularTestability=(r,o=!0)=>{let i=t.findTestabilityInTree(r,o);if(i==null)throw new v(5103,!1);return i},pe.getAllAngularTestabilities=()=>t.getAllTestabilities(),pe.getAllAngularRootElements=()=>t.getAllRootElements();let n=r=>{let o=pe.getAllAngularTestabilities(),i=o.length,s=function(){i--,i==0&&r()};o.forEach(a=>{a.whenStable(s)})};pe.frameworkStabilizers||(pe.frameworkStabilizers=[]),pe.frameworkStabilizers.push(n)}findTestabilityInTree(t,n,r){if(n==null)return null;return t.getTestability(n)??(r?gt().isShadowRoot(n)?this.findTestabilityInTree(t,n.host,!0):this.findTestabilityInTree(t,n.parentElement,!0):null)}};var qy=[`alt`,`control`,`meta`,`shift`];var oM={"\b":`Backspace`," ":`Tab`,"�":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`};var iM={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};var Wy=(()=>{class e extends Mi$1{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o,i){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>gt().onAndCancel(n,s.domEventName,a,i))}static parseEventName(n){let r=n.toLowerCase().split(`.`),o=r.shift();if(r.length===0||!(o===`keydown`||o===`keyup`))return null;let i=e._normalizeKey(r.pop()),s=``,a=r.indexOf(`code`);if(a>
5-1&&(r.splice(a,1),s=`code.`),qy.forEach(u=>{let l=r.indexOf(u);l>-1&&(r.splice(l,1),s+=u+`.`)}),s+=i,r.length!=0||i.length===0)return null;let c={};return c.domEventName=o,c.fullKey=s,c}static matchEventFullKeyCode(n,r){let o=oM[n.key]||n.key,i=``;return r.indexOf(`code.`)>-1&&(o=n.code,i=`code.`),o==null||!o?!1:(o=o.toLowerCase(),o===` `?o=`space`:o===`.`&&(o=`dot`),qy.forEach(s=>{if(s!==o){let a=iM[s];a(n)&&(i+=s+`.`)}}),i+=o,i===r)}static eventCallback(n,r,o){return i=>{e.matchEventFullKeyCode(i,n)&&o.runGuarded(()=>r(i))}}static _normalizeKey(n){return n===`esc`?`escape`:n}static ɵfac=function(r){return new(r||e)(E(Z))};static ɵprov=b({token:e,factory:e.ɵfac})}return e})();function sM(e,t,n){return V(this,null,function*(){return ny(m({rootComponent:e},aM(t,n)))})}function aM(e,t){return{platformRef:t?.platformRef,appProviders:[...Zy,...e?.providers??[]],platformProviders:dM}}function cM(){Ec.makeCurrent()}function uM(){return new st$1}function lM(){return bd(document),document}var dM=[{provide:zo$1,useValue:wy},{provide:na$1,useValue:cM,multi:!0},{provide:Z,useFactory:lM}];var fM=[{provide:Xr$1,useClass:wc},{provide:za$1,useClass:di,deps:[z$1,fi,Xr$1]},{provide:di,useClass:di,deps:[z$1,fi,Xr$1]}];var Zy=[{provide:Fo$1,useValue:`root`},{provide:st$1,useFactory:uM},{provide:Dc,useClass:mc,multi:!0},{provide:Dc,useClass:Wy,multi:!0},Ff,{provide:lr$1,useClass:Pf},{provide:Pf,useExisting:lr$1},kf,{provide:sr$1,useExisting:Ff},[]];var hM=(()=>{class e{constructor(){}static ɵfac=function(r){return new(r||e)};static ɵmod=nn$1({type:e});static ɵinj=bt({providers:[...Zy,...fM],imports:[wf,ey]})}return e})();var s8=(()=>{class e{_doc=p(Z);_dom=gt();_cachedHead;addTag(n,r=!1){return n?this._getOrCreateElement(n,r):null}addTags(n,r=!1){return n.filter(o=>!!o).map(o=>this._getOrCreateElement(o,r))}getTag(n){if(!n)return null;let r=this._doc.querySelector(Yy(n));return Jy(r)?r:null}getTags(n){if(!n)return[];let r=this._doc.querySelectorAll(Yy(n));return r?Array.from(r).filter(o=>Jy(o)):[]}updateTag(n,r){Ky(n),r??=Xy(n);let o=this.getTag(r);return o?(Qy(n,o),o):this._getOrCreateElement(n,!0)}removeTag(n){this.removeTagElement(this.getTag(n))}removeTagElement(n){n&&this._dom.remove(n)}_getOrCreateElement(n,r=!1){if(Ky(n),!r){let s=Xy(n),a=this.getTags(s).filter(c=>gM(n,c))[0];if(a!==void 0)return a}let o=this._dom.createElement(`meta`);return Qy(n,o),this._doc.getElementsByTagName(`head`)[0].appendChild(o),o}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function Yy(e){return`meta[${e}]`}function Qy(e,t){Object.keys(e).forEach(n=>t.setAttribute(jf(n),e[n]))}function Ky(e){for(let t of Object.keys(e))if(jf(t).toLowerCase().startsWith(`on`))throw new v(5203,!1)}function Xy(e){let t=e.name?`name`:`property`;return`${t}=${pM(String(e[t]))}`}function pM(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function gM(e,t){return Object.keys(e).every(n=>t.getAttribute(jf(n))===e[n])}function jf(e){return Object.hasOwn(eD,e)?eD[e]:e}function Jy(e){return e?.nodeName.toLowerCase()===`meta`}var eD={httpEquiv:`http-equiv`};var tD=(()=>{class e{_doc;constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||``}static ɵfac=function(r){return new(r||e)(E(Z))};static ɵprov=b({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var mM=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=b({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=E(vM),o},providedIn:`root`})}return e})();var vM=(()=>{class e extends mM{_doc=p(Z);sanitize(n,r){if(r==null)return null;switch(n){case J.NONE:return r;case J.HTML:return en$2(r,`HTML`)?ze$2(r):Ad(this._doc,String(r)).toString();case J.STYLE:return en$2(r,`Style`)?ze$2(r):r;case J.SCRIPT:if(en$2(r,`Script`))return ze$2(r);throw new v(5200,!1);case J.URL:return en$2(r,`URL`)?ze$2(r):ii(String(r));case J.RESOURCE_URL:if(en$2(r,`ResourceURL`))return ze$2(r);throw new v(-5201,!1);default:throw new v(5202,!1)}}bypassSecurityTrustHtml(n){return Td(n)}bypassSecurityTrustStyle(n){return _d(n)}bypassSecurityTrustScript(n){return Md(n)}bypassSecurityTrustUrl(n){return Nd(n)}bypassSecurityTrustResourceUrl(n){return Rd(n)}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var x=`primary`;var $i$1=Symbol(`RouteTitle`);var $f=class{params;constructor(t){this.params=t||{}}has(t){return Object.hasOwn(this.params,t)}get(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n[0]:n}return null}getAll(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}};function pr$1(e){return new $f(e)}function Uf(e,t,n){for(let r=0;r<e.length;r++){let o=e[r],i=t[r];
5if(o[0]===`:`)n[o.substring(1)]=i;else if(o!==i.path)return!1}return!0}function cD(e,t,n){let r=n.path.split(`/`),o=r.indexOf(`**`);if(o===-1){if(r.length>e.length||n.pathMatch===`full`&&(t.hasChildren()||r.length<e.length))return null;let c={},u=e.slice(0,r.length);return Uf(r,u,c)?{consumed:u,posParams:c}:null}if(o!==r.lastIndexOf(`**`))return null;let i=r.slice(0,o),s=r.slice(o+1);if(i.length+s.length>e.length||n.pathMatch===`full`&&t.hasChildren()&&n.path!==`**`)return null;let a={};return!Uf(i,e.slice(0,i.length),a)||!Uf(s,e.slice(e.length-s.length),a)?null:{consumed:e,posParams:a}}function _c(e){return new Promise((t,n)=>{e.pipe(Gt$1()).subscribe({next:r=>t(r),error:r=>n(r)})})}function DM(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!Ut$1(e[n],t[n]))return!1;return!0}function Ut$1(e,t){let n=e?zf(e):void 0,r=t?zf(t):void 0;if(!n||!r||n.length!=r.length)return!1;let o;for(let i=0;i<n.length;i++)if(o=n[i],!uD(e[o],t[o]))return!1;return!0}function zf(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e)]}function uD(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;let n=[...e].sort(),r=[...t].sort();return n.every((o,i)=>r[i]===o)}else return e===t}function EM(e){return e.length>0?e[e.length-1]:null}function mr$1(e){return Cs(e)?e:Qr$1(e)?X(Promise.resolve(e)):_(e)}function lD(e){return Cs(e)?_c(e):Promise.resolve(e)}var wM={exact:fD,subset:hD};var dD={exact:IM,subset:CM,ignored:()=>!0};var ih={paths:`exact`,fragment:`ignored`,matrixParams:`ignored`,queryParams:`exact`};var ao={paths:`subset`,fragment:`ignored`,matrixParams:`ignored`,queryParams:`subset`};function sh(e,t,n){let r=e instanceof ke?e:t.parseUrl(e);return vi$1(()=>Gf(t.lastSuccessfulNavigation()?.finalUrl??new ke,r,m(m({},ao),n)))}function Gf(e,t,n){return wM[n.paths](e.root,t.root,n.matrixParams)&&dD[n.queryParams](e.queryParams,t.queryParams)&&!(n.fragment===`exact`&&e.fragment!==t.fragment)}function IM(e,t){return Ut$1(e,t)}function fD(e,t,n){if(!hr$1(e.segments,t.segments)||!bc(e.segments,t.segments,n)||e.numberOfChildren!==t.numberOfChildren)return!1;for(let r in t.children)if(!e.children[r]||!fD(e.children[r],t.children[r],n))return!1;return!0}function CM(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>uD(e[n],t[n]))}function hD(e,t,n){return pD(e,t,t.segments,n)}function pD(e,t,n,r){if(e.segments.length>n.length){let o=e.segments.slice(0,n.length);return!(!hr$1(o,n)||t.hasChildren()||!bc(o,n,r))}else if(e.segments.length===n.length){if(!hr$1(e.segments,n)||!bc(e.segments,n,r))return!1;for(let o in t.children)if(!e.children[o]||!hD(e.children[o],t.children[o],r))return!1;return!0}else{let o=n.slice(0,e.segments.length),i=n.slice(e.segments.length);return!hr$1(e.segments,o)||!bc(e.segments,o,r)||!e.children[x]?!1:pD(e.children[x],t,i,r)}}function bc(e,t,n){return t.every((r,o)=>dD[n](e[o].parameters,r.parameters))}var ke=class{root;queryParams;fragment;_queryParamMap;constructor(t=new B([],{}),n={},r=null){this.root=t,this.queryParams=n,this.fragment=r}get queryParamMap(){return this._queryParamMap??=pr$1(this.queryParams),this._queryParamMap}toString(){return TM.serialize(this)}};var B=class{segments;children;parent=null;constructor(t,n){this.segments=t,this.children=n,Object.values(n).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Sc(this)}};var Rn=class{path;parameters;_parameterMap;constructor(t,n){this.path=t,this.parameters=n}get parameterMap(){return this._parameterMap??=pr$1(this.parameters),this._parameterMap}toString(){return mD(this)}};function bM(e,t){return hr$1(e,t)&&e.every((n,r)=>Ut$1(n.parameters,t[r].parameters))}function hr$1(e,t){return e.length!==t.length?!1:e.every((n,r)=>n.path===t[r].path)}function SM(e,t){let n=[];return Object.entries(e.children).forEach(([r,o])=>{r===x&&(n=n.concat(t(o,r)))}),Object.entries(e.children).forEach(([r,o])=>{r!==x&&(n=n.concat(t(o,r)))}),n}var kn$1=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:()=>new un$1})}return e})();var un$1=class{parse(t){let n=new Wf(t);return new ke(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(t){return`${`/${xi(t.root,!0)}`}${NM(t.queryParams)}${typeof t.fragment==`string`?`#${_M(t.fragment)}`:``}`}};var TM=new un$1;function Sc(e){return e.segments.map(t=>mD(t)).join(`/`)}function xi(e,t){if(!e.hasChildren())return Sc(e);if(t){let n=e.children[x]?xi(e.children[x],!1):``,r=[];
5return Object.entries(e.children).forEach(([o,i])=>{o!==x&&r.push(`${o}:${xi(i,!1)}`)}),r.length>0?`${n}(${r.join(`//`)})`:n}else{let n=SM(e,(r,o)=>o===x?[xi(e.children[x],!1)]:[`${o}:${xi(r,!1)}`]);return Object.keys(e.children).length===1&&e.children[x]!=null?`${Sc(e)}/${n[0]}`:`${Sc(e)}/(${n.join(`//`)})`}}function gD(e){return encodeURIComponent(e).replace(/%40/g,`@`).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`)}function Ic(e){return gD(e).replace(/%3B/gi,`;`)}function _M(e){return encodeURI(e)}function qf(e){return gD(e).replace(/\(/g,`%28`).replace(/\)/g,`%29`).replace(/%26/gi,`&`)}function Tc(e){return decodeURIComponent(e)}function nD(e){return Tc(e.replace(/\+/g,`%20`))}function mD(e){return`${qf(e.path)}${MM(e.parameters)}`}function MM(e){return Object.entries(e).map(([t,n])=>`;${qf(t)}=${qf(n)}`).join(``)}function NM(e){let t=Object.entries(e).map(([n,r])=>Array.isArray(r)?r.map(o=>`${Ic(n)}=${Ic(o)}`).join(`&`):`${Ic(n)}=${Ic(r)}`).filter(n=>n);return t.length?`?${t.join(`&`)}`:``}var RM=/^[^\/()?;#]+/;function Bf(e){let t=e.match(RM);return t?t[0]:``}var AM=/^[^\/()?;=#]+/;function xM(e){let t=e.match(AM);return t?t[0]:``}var OM=/^[^=?&#]+/;function kM(e){let t=e.match(OM);return t?t[0]:``}var PM=/^[^&#]+/;function LM(e){let t=e.match(PM);return t?t[0]:``}var Wf=class{url;remaining;constructor(t){this.url=t,this.remaining=t}parseRootSegment(){for(;this.consumeOptional(`/`););return this.remaining===``||this.peekStartsWith(`?`)||this.peekStartsWith(`#`)?new B([],{}):new B([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional(`?`))do this.parseQueryParam(t);while(this.consumeOptional(`&`));return t}parseFragment(){return this.consumeOptional(`#`)?decodeURIComponent(this.remaining):null}parseChildren(t=0){if(t>50)throw new v(4010,!1);if(this.remaining===``)return{};this.consumeOptional(`/`);let n=[];for(this.peekStartsWith(`(`)||n.push(this.parseSegment());this.peekStartsWith(`/`)&&!this.peekStartsWith(`//`)&&!this.peekStartsWith(`/(`);)this.capture(`/`),n.push(this.parseSegment());let r={};this.peekStartsWith(`/(`)&&(this.capture(`/`),r=this.parseParens(!0,t));let o={};return this.peekStartsWith(`(`)&&(o=this.parseParens(!1,t)),(n.length>0||Object.keys(r).length>0)&&(o[x]=new B(n,r)),o}parseSegment(){let t=Bf(this.remaining);if(t===``&&this.peekStartsWith(`;`))throw new v(4009,!1);return this.capture(t),new Rn(Tc(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(`;`);)this.parseParam(t);return t}parseParam(t){let n=xM(this.remaining);if(!n)return;this.capture(n);let r=``;if(this.consumeOptional(`=`)){let o=Bf(this.remaining);o&&(r=o,this.capture(r))}t[Tc(n)]=Tc(r)}parseQueryParam(t){let n=kM(this.remaining);if(!n)return;this.capture(n);let r=``;if(this.consumeOptional(`=`)){let s=LM(this.remaining);s&&(r=s,this.capture(r))}let o=nD(n),i=nD(r);if(Object.hasOwn(t,o)){let s=t[o];Array.isArray(s)||(s=[s],t[o]=s),s.push(i)}else t[o]=i}parseParens(t,n){let r=Object.create(null);for(this.capture(`(`);!this.consumeOptional(`)`)&&this.remaining.length>0;){let o=Bf(this.remaining),i=this.remaining[o.length];if(i!==`/`&&i!==`)`&&i!==`;`)throw new v(4010,!1);let s;o.indexOf(`:`)>-1?(s=o.slice(0,o.indexOf(`:`)),this.capture(s),this.capture(`:`)):t&&(s=x);let a=this.parseChildren(n+1);r[s??x]=Object.keys(a).length===1&&a[x]?a[x]:new B([],a),this.consumeOptional(`//`)}return r}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new v(4011,!1)}};function vD(e){return e.segments.length>0?new B([],{[x]:e}):e}function yD(e){let t=Object.create(null);for(let[r,o]of Object.entries(e.children)){let i=yD(o);if(r===x&&i.segments.length===0&&i.hasChildren())for(let[s,a]of Object.entries(i.children))t[s]=a;else(i.segments.length>0||i.hasChildren())&&(t[r]=i)}return FM(new B(e.segments,t))}function FM(e){if(e.numberOfChildren===1&&e.children[x]){let t=e.children[x];return new B(e.segments.concat(t.segments),t.children)}return e}function An$1(e){return e instanceof ke}function DD(e,t,n=null,r=null,o=new un$1){return wD(ED(e),t,n,r,o)}function ED(e){let t;function n(i){let s={};for(let c of i.children){let u=n(c);s[c.outlet]=u}let a=new B(i.url,s);return i===e&&(t=a),a}let o=vD(n(e.root));return t??o}function wD(e,t,n,r,o){let i=e;for(;i.parent;)i=i.parent;if(t.length===0)return Vf(i,i,i,n,r,o);let s=jM(t);if(s.toRoot())return Vf(i,i,new B([],{}),n,r,o);let a=UM(s,i,e),c=a.processChildren?ki$1(a.segmentGroup,a.index,s.commands):CD(a.segmentGroup,a.index,s.commands);return Vf(i,a.segmentGroup,c,n,r,o)}function Mc(e){return typeof e==`object`&&e!=null&&!e.outlets&&!e.segmentPath}function Li$1(e){return typeof e==`object`&&e!=null&&e.outlets}function rD(e,t,n){e||=`ɵ`;let r=new ke;return r.queryParams={[e]:t},n.parse(n.serialize(r)).queryParams[e]}function Vf(e,t,n,r,o,i){let s={};for(let[u,l]of Object.entries(r??{}))s[u]=Array.isArray(l)?l.map(d=>rD(u,d,i)):rD(u,l,i);let a;e===t?a=n:a=ID(e,t,n);return new ke(vD(yD(a)),s,o)}
5function ID(e,t,n){let r=Object.create(null);return Object.entries(e.children).forEach(([o,i])=>{i===t?r[o]=n:r[o]=ID(i,t,n)}),new B(e.segments,r)}var Nc=class{isAbsolute;numberOfDoubleDots;commands;constructor(t,n,r){if(this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=r,t&&r.length>0&&Mc(r[0]))throw new v(4003,!1);let o=r.find(Li$1);if(o&&o!==EM(r))throw new v(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]==`/`}};function jM(e){if(typeof e[0]==`string`&&e.length===1&&e[0]===`/`)return new Nc(!0,0,e);let t=0,n=!1,r=e.reduce((o,i,s)=>{if(typeof i==`object`&&i!=null){if(i.outlets){let a={};return Object.entries(i.outlets).forEach(([c,u])=>{a[c]=typeof u==`string`?u.split(`/`):u}),[...o,{outlets:a}]}if(i.segmentPath)return[...o,i.segmentPath]}return typeof i!=`string`?[...o,i]:s===0?(i.split(`/`).forEach((a,c)=>{c==0&&a===`.`||(c==0&&a===``?n=!0:a===`..`?t++:a!=``&&o.push(a))}),o):[...o,i]},[]);return new Nc(n,t,r)}var oo$1=class{segmentGroup;processChildren;index;constructor(t,n,r){this.segmentGroup=t,this.processChildren=n,this.index=r}};function UM(e,t,n){if(e.isAbsolute)return new oo$1(t,!0,0);if(!n)return new oo$1(t,!1,NaN);if(n.parent===null)return new oo$1(n,!0,0);let r=Mc(e.commands[0])?0:1;return BM(n,n.segments.length-1+r,e.numberOfDoubleDots)}function BM(e,t,n){let r=e,o=t,i=n;for(;i>o;){if(i-=o,r=r.parent,!r)throw new v(4005,!1);o=r.segments.length}return new oo$1(r,!1,o-i)}function VM(e){return Li$1(e[0])?e[0].outlets:{[x]:e}}function CD(e,t,n){if(e??=new B([],{}),e.segments.length===0&&e.hasChildren())return ki$1(e,t,n);let r=HM(e,t,n),o=n.slice(r.commandIndex);if(r.match&&r.pathIndex<e.segments.length){let i=new B(e.segments.slice(0,r.pathIndex),{});return i.children[x]=new B(e.segments.slice(r.pathIndex),e.children),ki$1(i,0,o)}else return r.match&&o.length===0?new B(e.segments,{}):r.match&&!e.hasChildren()?Zf(e,t,n):r.match?ki$1(e,0,o):Zf(e,t,n)}function ki$1(e,t,n){if(n.length===0)return new B(e.segments,{});{let r=VM(n),o=Object.create(null);if(Object.keys(r).some(i=>i!==x)&&e.children[x]&&e.numberOfChildren===1&&e.children[x].segments.length===0){let i=ki$1(e.children[x],t,n);return new B(e.segments,i.children)}return Object.entries(r).forEach(([i,s])=>{typeof s==`string`&&(s=[s]),s!==null&&(o[i]=CD(e.children[i],t,s))}),Object.entries(e.children).forEach(([i,s])=>{r[i]===void 0&&(o[i]=s)}),new B(e.segments,o)}}function HM(e,t,n){let r=0,o=t,i={match:!1,pathIndex:0,commandIndex:0};for(;o<e.segments.length;){if(r>=n.length)return i;let s=e.segments[o],a=n[r];if(Li$1(a))break;let c=`${a}`,u=r<n.length-1?n[r+1]:null;if(o>0&&c===void 0)break;if(c&&u&&typeof u==`object`&&u.outlets===void 0){if(!iD(c,u,s))return i;r+=2}else{if(!iD(c,{},s))return i;r++}o++}return{match:!0,pathIndex:o,commandIndex:r}}function Zf(e,t,n){let r=e.segments.slice(0,t),o=0;for(;o<n.length;){let i=n[o];if(Li$1(i))return new B(r,$M(i.outlets));if(o===0&&Mc(n[0])){let c=e.segments[t];r.push(new Rn(c.path,oD(n[0]))),o++;continue}let s=Li$1(i)?i.outlets[x]:`${i}`,a=o<n.length-1?n[o+1]:null;s&&a&&Mc(a)?(r.push(new Rn(s,oD(a))),o+=2):(r.push(new Rn(s,{})),o++)}return new B(r,{})}function $M(e){let t={};return Object.entries(e).forEach(([n,r])=>{typeof r==`string`&&(r=[r]),r!==null&&(t[n]=Zf(new B([],{}),0,r))}),t}function oD(e){let t={};return Object.entries(e).forEach(([n,r])=>t[n]=`${r}`),t}function iD(e,t,n){return e==n.path&&Ut$1(t,n.parameters)}var io$1=`imperative`;var me=(function(e){return e[e.NavigationStart=0]=`NavigationStart`,e[e.NavigationEnd=1]=`NavigationEnd`,e[e.NavigationCancel=2]=`NavigationCancel`,e[e.NavigationError=3]=`NavigationError`,e[e.RoutesRecognized=4]=`RoutesRecognized`,e[e.ResolveStart=5]=`ResolveStart`,e[e.ResolveEnd=6]=`ResolveEnd`,e[e.GuardsCheckStart=7]=`GuardsCheckStart`,e[e.GuardsCheckEnd=8]=`GuardsCheckEnd`,e[e.RouteConfigLoadStart=9]=`RouteConfigLoadStart`,e[e.RouteConfigLoadEnd=10]=`RouteConfigLoadEnd`,e[e.ChildActivationStart=11]=`ChildActivationStart`,e[e.ChildActivationEnd=12]=`ChildActivationEnd`,e[e.ActivationStart=13]=`ActivationStart`,e[e.ActivationEnd=14]=`ActivationEnd`,e[e.Scroll=15]=`Scroll`,e[e.NavigationSkipped=16]=`NavigationSkipped`,e})(me||{});var We$2=class{id;url;constructor(t,n){this.id=t,this.url=n}};var xn$1=class extends We$2{type=me.NavigationStart;navigationTrigger;restoredState;constructor(t,n,r=`imperative`,o=null){super(t,n),this.navigationTrigger=r,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}};var Ze$1=class extends We$2{urlAfterRedirects;type=me.NavigationEnd;constructor(t,n,r){super(t,n),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}};var _e=(function(e){return e[e.Redirect=0]=`Redirect`,e[e.SupersededByNewNavigation=1]=`SupersededByNewNavigation`,e[e.NoDataFromRe
5solver=2]=`NoDataFromResolver`,e[e.GuardRejected=3]=`GuardRejected`,e[e.Aborted=4]=`Aborted`,e})(_e||{});var co$1=(function(e){return e[e.IgnoredSameUrlNavigation=0]=`IgnoredSameUrlNavigation`,e[e.IgnoredByUrlHandlingStrategy=1]=`IgnoredByUrlHandlingStrategy`,e})(co$1||{});var nt$2=class extends We$2{reason;code;type=me.NavigationCancel;constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function bD(e){return e instanceof nt$2&&(e.code===_e.Redirect||e.code===_e.SupersededByNewNavigation)}var Bt$1=class extends We$2{reason;code;type=me.NavigationSkipped;constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o}};var gr$1=class extends We$2{error;target;type=me.NavigationError;constructor(t,n,r,o){super(t,n),this.error=r,this.target=o}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}};var Fi$1=class extends We$2{urlAfterRedirects;state;type=me.RoutesRecognized;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var Rc=class extends We$2{urlAfterRedirects;state;type=me.GuardsCheckStart;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var Ac=class extends We$2{urlAfterRedirects;state;shouldActivate;type=me.GuardsCheckEnd;constructor(t,n,r,o,i){super(t,n),this.urlAfterRedirects=r,this.state=o,this.shouldActivate=i}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}};var xc=class extends We$2{urlAfterRedirects;state;type=me.ResolveStart;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var Oc=class extends We$2{urlAfterRedirects;state;type=me.ResolveEnd;constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}};var kc=class{route;type=me.RouteConfigLoadStart;constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}};var Pc=class{route;type=me.RouteConfigLoadEnd;constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}};var Lc=class{snapshot;type=me.ChildActivationStart;constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var Fc=class{snapshot;type=me.ChildActivationEnd;constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var jc=class{snapshot;type=me.ActivationStart;constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var Uc=class{snapshot;type=me.ActivationEnd;constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}};var uo$1=class{routerEvent;position;anchor;scrollBehavior;type=me.Scroll;constructor(t,n,r,o){this.routerEvent=t,this.position=n,this.anchor=r,this.scrollBehavior=o}toString(){let t=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${t}')`}};var lo$1=class{};var ji$1=class{};var fo$1=class{url;navigationBehaviorOptions;constructor(t,n){this.url=t,this.navigationBehaviorOptions=n}};function zM(e){return!(e instanceof lo$1)&&!(e instanceof fo$1)&&!(e instanceof ji$1)}var Bc=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(t){this.rootInjector=t,this.children=new On$1(this.rootInjector)}resetChildren(){this.children=new On$1(this.rootInjector)}};var On$1=(()=>{class e{rootInjector;contexts=new Map;constructor(n){this.rootInjector=n}onChildOutletCreated(n,r){let o=this.getOrCreateContext(n);o.outlet=r,this.contexts.set(n,o)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new Bc(this.rootInjector),this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}static ɵfac=function(r){return new(r||e)(E(ee))};static ɵprov=b({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var Vc=class{_root;constructor(t){this._root=t}get root(){return this._root.value}
5parent(t){let n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null}children(t){let n=Yf(t,this._root);return n?n.children.map(r=>r.value):[]}firstChild(t){let n=Yf(t,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(t){let n=Qf(t,this._root);return n.length<2?[]:n[n.length-2].children.map(o=>o.value).filter(o=>o!==t)}pathFromRoot(t){return Qf(t,this._root).map(n=>n.value)}};function Yf(e,t){if(e===t.value)return t;for(let n of t.children){let r=Yf(e,n);if(r)return r}return null}function Qf(e,t){if(e===t.value)return[t];for(let n of t.children){let r=Qf(e,n);if(r.length)return r.unshift(t),r}return[]}var qe$1=class{value;children;constructor(t,n){this.value=t,this.children=n}toString(){return`TreeNode(${this.value})`}};function ro$1(e){let t={};return e&&e.children.forEach(n=>t[n.value.outlet]=n),t}var Ui$1=class extends Vc{snapshot;constructor(t,n){super(t),this.snapshot=n,ch(this,t)}toString(){return this.snapshot.toString()}};function SD(e,t){let n=GM(e,t),r=new De([new Rn(``,{})]),o=new De({}),i=new De({}),c=new ln$1(r,o,new De({}),new De(``),i,x,e,n.root);return c.snapshot=n.root,new Ui$1(new qe$1(c,[]),n)}function GM(e,t){return new Bi$1(``,new qe$1(new ho$1([],{},{},``,{},x,e,null,{},t),[]))}var ln$1=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;resources;_localInjector;pending;paramsSignal;queryParamsSignal;paramMapSignal;queryParamMapSignal;fragmentSignal;dataSignal;constructor(t,n,r,o,i,s,a,c){this.urlSubject=t,this.paramsSubject=n,this.queryParamsSubject=r,this.fragmentSubject=o,this.dataSubject=i,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(q(u=>u[$i$1]))??_(void 0),this.url=t,this.params=n,this.queryParams=r,this.fragment=o,this.data=i}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(q(t=>pr$1(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(q(t=>pr$1(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}_setPending(t){this._futureSnapshot=t,this.pending?.set(!0)}};var qM=`always`;function ah(e,t,n){let r,{routeConfig:o}=e;return t!==null&&(n===`always`||o?.path===``||!t.component&&!t.routeConfig?.loadComponent)?r={params:m(m({},t.params),e.params),data:m(m({},t.data),e.data),resolve:m(m(m(m({},e.data),t.data),o?.data),e._resolvedData)}:r={params:m({},e.params),data:m({},e.data),resolve:m(m({},e.data),e._resolvedData??{})},o&&_D(o)&&(r.resolve[$i$1]=o.title),r}var ho$1=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;resources;get title(){return this.data?.[$i$1]}constructor(t,n,r,o,i,s,a,c,u,l){this.url=t,this.params=n,this.queryParams=r,this.fragment=o,this.data=i,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u,this._environmentInjector=l}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=pr$1(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=pr$1(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join(`/`)}', path:'${this.routeConfig?this.routeConfig.path:``}')`}};var Bi$1=class extends Vc{url;constructor(t,n){super(n),this.url=t,ch(this,n)}toString(){return TD(this._root)}};
5function ch(e,t){t.value._routerState=e,t.children.forEach(n=>ch(e,n))}function TD(e){let t=e.children.length>0?` { ${e.children.map(TD).join(`, `)} } `:``;return`${e.value}${t}`}function Hf(e){if(e.snapshot){let t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,Ut$1(t.queryParams,n.queryParams)||e.queryParamsSubject.next(n.queryParams),t.fragment!==n.fragment&&e.fragmentSubject.next(n.fragment),Ut$1(t.params,n.params)||e.paramsSubject.next(n.params),DM(t.url,n.url)||e.urlSubject.next(n.url),Ut$1(t.data,n.data)||e.dataSubject.next(n.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function Kf(e,t){let n=Ut$1(e.params,t.params)&&bM(e.url,t.url),r=!e.parent!=!t.parent;return n&&!r&&(!e.parent||Kf(e.parent,t.parent))}function _D(e){return typeof e.title==`string`||e.title===null}var MD=new D(``);var uh=(()=>{class e{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=x;activateEvents=new be;deactivateEvents=new be;attachEvents=new be;detachEvents=new be;routerOutletData=Ka$1();parentContexts=p(On$1);location=p(dr$1);changeDetector=p(Jr$1);inputBinder=p(zi$1,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:o}=n.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new v(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new v(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new v(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this,this.location.injector),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new v(4013,!1);this._activatedRoute=n;let o=this.location,s=n.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new Xf(n,a,o.injector,this.routerOutletData);this.activated=o.createComponent(s,{index:o.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this,this.location.injector),this.activateEvents.emit(this.activated.instance)}static ɵfac=function(r){return new(r||e)};static ɵdir=fr$1({type:e,selectors:[[`router-outlet`]],inputs:{name:`name`,routerOutletData:[1,`routerOutletData`]},outputs:{activateEvents:`activate`,deactivateEvents:`deactivate`,attachEvents:`attach`,detachEvents:`detach`},exportAs:[`outlet`],features:[ur$1]})}return e})();var Xf=class{route;childContexts;parent;outletData;constructor(t,n,r,o){this.route=t,this.childContexts=n,this.parent=r,this.outletData=o}get(t,n){return t===ln$1?this.route:t===On$1?this.childContexts:t===MD?this.outletData:this.parent.get(t,n)}};var zi$1=new D(``);var ND=(()=>{class e{options;feature;outletDataSubscriptions=new Map;outletSeenKeys=new Map;outletEffects=new Map;constructor(n,r=null){this.options=n,this.feature=r,this.options.queryParams??=!0}bindActivatedRouteToOutletComponent(n,r){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n,r)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n),this.outletSeenKeys.delete(n),this.outletEffects.get(n)?.forEach(r=>r.destroy()),this.outletEffects.delete(n)}subscribeToRouteData(n,r){let{activatedRoute:o}=n,i=[],s=[];if(this.feature?.createResourceOutletBindingEffects&&n.activatedComponentRef){let{handledKeys:c,createdEffects:u}=this.feature.createResourceOutletBindingEffects(n.activatedComponentRef,o,r);i.push(...u),s=c}i.length>0&&this.outletEffects.set(n,i);let a=Ts([this.options.queryParams?o.queryParams:_({}),o.params,o.data]).pipe(Ne$1(([c,u,l],d)=>(l=m(m(m(m({},c),u),l),o.resources||{}),d===0?_(l):Promise.resolve(l)))).subscribe(c=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==o||o.component===null){this.unsubscribeFromRouteData(n);return}let u=pf(o.component);if(!u){this.unsubscribeFromRouteData(n);return}let l=this.outletSeenKeys.get(n);l||(l=new Set,this.outletSeenKeys.set(n,l));for(let f of Object.keys(c))l.add(f);let d=this.options.unmatchedInputBehavior??`alwaysUndefined`;for(let{templateName:f}of u.inputs){if(s.includes(f))continue;let h=c[f];(h!==void 0||d===`alwaysUndefined`||l.has(f))&&n.activatedComponentRef.setInput(f,h)}});this.outletDataSubscriptions.set(n,a)}static ɵfac=function(r){li()};static ɵprov=b({token:e,factory:e.ɵfac})}return e})();var lh=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵcmp=Qd({type:e,selectors:[[`ng-component`]],exportAs:[`emptyRouterOutlet`],decls:1,vars:0,template:function(r,o){r&1&&qa$1(0,`router-outlet`)},dependencies:[uh],encapsulation:2,changeDetection:1})}return e})();function dh(e){let t=e.children&&e.children.map(dh),n=t?j(m({},e),{children:t}):m({},e);return!n.component&&!n.loadComponent&&(t||n.loadChildren)&&n.outlet&&n.outlet!==x&&(n.component=lh),n}function WM(e,t,n){let r=new Set;return{newlyCreatedRoutes:r,state:new Ui$1(Vi$1(e,t._root,n?n._root:void 0,r),t)}}function Vi$1(e,t,n,r){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){let o=n.value;o._setPending(t.value);return new qe$1(o,ZM(e,t,n,r))}else{if(e.shouldAttach(t.value)){let s=e.retrieve(t.value);if(s!==null){let a=s.route;return a.value._setPending(t.value),a.children=t.children.map(c=>Vi$1(e,c,void 0,r)),a}}let o=YM(t.value);o._setPending(t.value),r.add(o);return new qe$1(o,t.children.map(s=>Vi$1(e,s,void 0,r)))}}function ZM(e,t,n,r){return t.children.map(o=>{for(let i of n.children)if(e.shouldReuseRoute(o.value,i.value.snapshot))return Vi$1(e,o,i,r);return Vi$1(e,o,void 0,r)})}function YM(e){return new ln$1(new De(e.url),new De(e.params),new De(e.queryParams),new De(e.fragment),new De(e.data),e.outlet,e.component,e)}var po$1=class{redirectTo;navigationBehaviorOptions;constructor(t,n){this.redirectTo=t,this.navigationBehaviorOptions=n}};var RD=`ngNavigationCancelingError`;function Hc(e,t){let{redirectTo:n,navigationBehaviorOptions:r}=An$1(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,o=AD(!1,_e.Redirect);return o.url=n,o.navigationBehaviorOptions=r,o}function AD(e,t){let n=new Error(`NavigationCancelingError: ${e||``}`);return n[RD]=!0,n.cancellationCode=t,n}function QM(e){return xD(e)&&An$1(e.url)}function xD(e){return!!e&&e[RD]}var Jf=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(t,n,r,o,i){this.routeReuseStrategy=t,this.futureState=n,this.currState=r,this.forwardEvent=o,this.inputBindingEnabled=i}activate(t){let n=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,r,t),Hf(this.futureState.root),this.activateChildRoutes(n,r,t)}deactivateChildRoutes(t,n,r){let o=ro$1(n);
5t.children.forEach(i=>{let s=i.value.outlet;this.deactivateRoutes(i,o[s],r),delete o[s]}),Object.values(o).forEach(i=>{this.deactivateRouteAndItsChildren(i,r)})}deactivateRoutes(t,n,r){let o=t.value,i=n?n.value:null;if(o===i)if(o.component){let s=r.getContext(o.outlet);s&&this.deactivateChildRoutes(t,n,s.children)}else this.deactivateChildRoutes(t,n,r);else i&&this.deactivateRouteAndItsChildren(n,r)}deactivateRouteAndItsChildren(t,n){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,n):this.deactivateRouteAndOutlet(t,n)}detachAndStoreRouteSubtree(t,n){let r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,i=ro$1(t);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.contexts;r.resetChildren(),this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,n){let r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,i=ro$1(t);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null),t.value._localInjector?.destroy()}activateChildRoutes(t,n,r){let o=ro$1(n);t.children.forEach(i=>{this.activateRoutes(i,o[i.value.outlet],r),this.forwardEvent(new Uc(i.value.snapshot))}),t.children.length&&this.forwardEvent(new Fc(t.value.snapshot))}activateRoutes(t,n,r){let o=t.value,i=n?n.value:null;if(Hf(o),o===i)if(o.component){let s=r.getOrCreateContext(o.outlet);this.activateChildRoutes(t,n,s.children)}else this.activateChildRoutes(t,n,r);else if(o.component){let s=r.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let a=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Hf(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=o,s.outlet&&s.outlet.activateWith(o,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,r)}};var $c=class{path;route;constructor(t){this.path=t,this.route=this.path[this.path.length-1]}};var so$1=class{component;route;constructor(t,n){this.component=t,this.route=n}};function KM(e,t,n){let r=e._root;return Oi$1(r,t?t._root:null,n,[r.value])}function XM(e){let t=e.routeConfig?e.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:e,guards:t}}function mo(e,t){let n=Symbol(),r=t.get(e,n);return r===n?typeof e==`function`&&!Vu(e)?e:t.get(e):r}function Oi$1(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=ro$1(t);return e.children.forEach(s=>{JM(s,i[s.value.outlet],n,r.concat([s.value]),o),delete i[s.value.outlet]}),Object.entries(i).forEach(([s,a])=>Pi$1(a,n.getContext(s),n,o)),o}function JM(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=e.value,s=t?t.value:null,a=n?n.getContext(e.value.outlet):null;if(s&&i.routeConfig===s.routeConfig){let c=eN(s,i,i.routeConfig.runGuardsAndResolvers);c?o.canActivateChecks.push(new $c(r)):(i.data=s.data,i._resolvedData=s._resolvedData),i.component?Oi$1(e,t,a?a.children:null,r,o):Oi$1(e,t,n,r,o),c&&a&&a.outlet&&a.outlet.isActivated&&o.canDeactivateChecks.push(new so$1(a.outlet.component,s))}else s&&Pi$1(t,a,n,o),o.canActivateChecks.push(new $c(r)),i.component?Oi$1(e,null,a?a.children:null,r,o):Oi$1(e,null,n,r,o);return o}function eN(e,t,n){if(typeof n==`function`)return ue$1(t._environmentInjector,()=>n(e,t));switch(n){case`pathParamsChange`:return!hr$1(e.url,t.url);case`pathParamsOrQueryParamsChange`:return!hr$1(e.url,t.url)||!Ut$1(e.queryParams,t.queryParams);case`always`:return!0;case`paramsOrQueryParamsChange`:return!Kf(e,t)||!Ut$1(e.queryParams,t.queryParams);default:return!Kf(e,t)}}function Pi$1(e,t,n,r){let o=ro$1(e),i=e.value;Object.entries(o).forEach(([s,a])=>{i.component?t?Pi$1(a,t.children.getContext(s),t.children,r):Pi$1(a,null,null,r):Pi$1(a,n?n.getContext(s):null,n,r)}),i.component?t&&t.outlet&&t.outlet.isActivated?r.canDeactivateChecks.push(new so$1(t.outlet.component,i)):r.canDeactivateChecks.push(new so$1(null,i)):r.canDeactivateChecks.push(new so$1(null,i))}function Gi$1(e){return typeof e==`function`}function tN(e){return typeof e==`boolean`}function nN(e){return e&&Gi$1(e.canLoad)}function rN(e){return e&&Gi$1(e.canActivate)}function oN(e){return e&&Gi$1(e.canActivateChild)}function iN(e){return e&&Gi$1(e.canDeactivate)}function sN(e){return e&&Gi$1(e.canMatch)}function OD(e){return e instanceof $t$1||e?.name===`EmptyError`}var Cc=Symbol(`INITIAL_VALUE`);function go$1(){return Ne$1(e=>Ts(e.map(t=>t.pipe(zt$1(1),Cu(Cc)))).pipe(q(t=>{for(let n of t)if(n!==!0){if(n===Cc)return Cc;if(n===!1||aN(n))return n}return!0}),Ve$1(t=>t!==Cc),zt$1(1)))}function aN(e){return An$1(e)||e instanceof po$1}function kD(e){return e.aborted?_(void 0).pipe(zt$1(1)):new A$1(t=>{let n=()=>{t.next(),t.complete()};return e.addEventListener(`abort`,n),()=>e.removeEventListener(`abort`,n)})}function PD(e){return So$1(kD(e))}function cN(e){return fe$1(t=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:i}}=t;return i.length===0&&o.length===0?_(j(m({},t),{guardsResult:!0})):uN(i,n,r).pipe(fe$1(s=>s&&tN(s)?lN(n,o,e):_(s)),q(s=>j(m({},t),{guardsResult:s})))})}
5function uN(e,t,n){return X(e).pipe(fe$1(r=>gN(r.component,r.route,n,t)),Gt$1(r=>r!==!0,!0))}function lN(e,t,n){return X(t).pipe(gn$1(r=>_r$1(fN(r.route.parent,n),dN(r.route,n),pN(e,r.path),hN(e,r.route))),Gt$1(r=>r!==!0,!0))}function dN(e,t){return e!==null&&t&&t(new jc(e)),_(!0)}function fN(e,t){return e!==null&&t&&t(new Lc(e)),_(!0)}function hN(e,t){let n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||n.length===0)return _(!0);return _(n.map(o=>bo$1(()=>{let i=t._environmentInjector,s=mo(o,i);return mr$1(rN(s)?s.canActivate(t,e):ue$1(i,()=>s(t,e))).pipe(Gt$1())}))).pipe(go$1())}function pN(e,t){let n=t[t.length-1];return _(t.slice(0,t.length-1).reverse().map(i=>XM(i)).filter(i=>i!==null).map(i=>bo$1(()=>{return _(i.guards.map(a=>{let c=i.node._environmentInjector,u=mo(a,c);return mr$1(oN(u)?u.canActivateChild(n,e):ue$1(c,()=>u(n,e))).pipe(Gt$1())})).pipe(go$1())}))).pipe(go$1())}function gN(e,t,n,r){let o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||o.length===0)return _(!0);return _(o.map(s=>{let a=t._environmentInjector,c=mo(s,a);return mr$1(iN(c)?c.canDeactivate(e,t,n,r):ue$1(a,()=>c(e,t,n,r))).pipe(Gt$1())})).pipe(go$1())}function mN(e,t,n,r,o){let i=t.canLoad;if(i===void 0||i.length===0)return _(!0);return _(i.map(a=>{let c=mo(a,e),l=mr$1(nN(c)?c.canLoad(t,n):ue$1(e,()=>c(t,n)));return o?l.pipe(PD(o)):l})).pipe(go$1(),LD(r))}function LD(e){return is(Ye$1(t=>{if(typeof t!=`boolean`)throw Hc(e,t)}),q(t=>t===!0))}function vN(e,t,n,r,o,i){let s=t.canMatch;if(!s||s.length===0)return _(!0);return _(s.map(c=>{let u=mo(c,e);return mr$1(sN(u)?u.canMatch(t,n,o):ue$1(e,()=>u(t,n,o))).pipe(PD(i))})).pipe(go$1(),LD(r))}var cn$1=class e extends Error{segmentGroup;constructor(t){super(),this.segmentGroup=t||null,Object.setPrototypeOf(this,e.prototype)}};var Hi$1=class e extends Error{urlTree;constructor(t){super(),this.urlTree=t,Object.setPrototypeOf(this,e.prototype)}};function yN(e){throw new v(4e3,!1)}function DN(e){throw AD(!1,_e.GuardRejected)}var eh=class{urlSerializer;urlTree;constructor(t,n){this.urlSerializer=t,this.urlTree=n}lineralizeSegments(t,n){return V(this,null,function*(){let r=[],o=n.root;for(;;){if(r=r.concat(o.segments),o.numberOfChildren===0)return r;if(o.numberOfChildren>1||!o.children[x])throw yN(`${t.redirectTo}`);o=o.children[x]}})}applyRedirectCommands(t,n,r,o,i){return V(this,null,function*(){let s=yield EN(n,o,i);if(s instanceof ke)throw new Hi$1(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),t,r);if(s[0]===`/`)throw new Hi$1(a);return a})}applyRedirectCreateUrlTree(t,n,r,o){return new ke(this.createSegmentGroup(t,n.root,r,o),this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(t,n){let r={};return Object.entries(t).forEach(([o,i])=>{if(typeof i==`string`&&i[0]===`:`){let a=i.substring(1);r[o]=n[a]}else r[o]=i}),r}createSegmentGroup(t,n,r,o){let i=this.createSegments(t,n.segments,r,o),s=Object.create(null);return Object.entries(n.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(t,c,r,o)}),new B(i,s)}createSegments(t,n,r,o){return n.map(i=>i.path[0]===`:`?this.findPosParam(t,i,o):this.findOrReturn(i,r))}findPosParam(t,n,r){let o=r[n.path.substring(1)];if(!o)throw new v(4001,!1);return o}findOrReturn(t,n){let r=0;for(let o of n){if(o.path===t.path)return n.splice(r),o;r++}return t}};function EN(e,t,n){if(typeof e==`string`)return Promise.resolve(e);let r=e;return _c(mr$1(ue$1(n,()=>r(t))))}function wN(e,t){return e.providers&&!e._injector&&(e._injector=Kr$1(e.providers,t,`Route: ${e.path}`)),e._injector??t}function Dt$1(e){return e.outlet||x}function IN(e,t){let n=e.filter(r=>Dt$1(r)===t);return n.push(...e.filter(r=>Dt$1(r)!==t)),n}var th={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function FD(e){return{routeConfig:e.routeConfig,url:e.url,params:e.params,queryParams:e.queryParams,fragment:e.fragment,data:e.data,outlet:e.outlet,title:e.title,paramMap:e.paramMap,queryParamMap:e.queryParamMap}}function CN(e,t,n,r,o,i,s){let a=jD(e,t,n);if(!a.matched)return _(a);let c=FD(i(a));
5return r=wN(t,r),vN(r,t,n,o,c,s).pipe(q(u=>u===!0?a:m({},th)))}function jD(e,t,n){if(t.path===``)return t.pathMatch===`full`&&(e.hasChildren()||n.length>0)?m({},th):{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};let o=(t.matcher||cD)(n,e,t);if(!o)return m({},th);let i={};Object.entries(o.posParams??{}).forEach(([a,c])=>{i[a]=c.path});let s=o.consumed.length>0?m(m({},i),o.consumed[o.consumed.length-1].parameters):i;return{matched:!0,consumedSegments:o.consumed,remainingSegments:n.slice(o.consumed.length),parameters:s,positionalParamSegments:o.posParams??{}}}function sD(e,t,n,r,o){return n.length>0&&TN(e,n,r,o)?{segmentGroup:new B(t,SN(r,new B(n,e.children))),slicedSegments:[]}:n.length===0&&_N(e,n,r)?{segmentGroup:new B(e.segments,bN(e,n,r,e.children)),slicedSegments:n}:{segmentGroup:new B(e.segments,e.children),slicedSegments:n}}function bN(e,t,n,r){let o={};for(let i of n)if(Gc(e,t,i)&&!r[Dt$1(i)]){let s=new B([],{});o[Dt$1(i)]=s}return m(m({},r),o)}function SN(e,t){let n={};n[x]=t;for(let r of e)if(r.path===``&&Dt$1(r)!==x){let o=new B([],{});n[Dt$1(r)]=o}return n}function TN(e,t,n,r){return n.some(o=>!Gc(e,t,o)||!(Dt$1(o)!==x)?!1:!(r!==void 0&&Dt$1(o)===r))}function _N(e,t,n){return n.some(r=>Gc(e,t,r))}function Gc(e,t,n){return(e.hasChildren()||t.length>0)&&n.pathMatch===`full`?!1:n.path===``}function MN(e,t,n){return t.length===0&&!e.children[n]}var nh=class{};function NN(e,t,n,r,o,i,s,a){return V(this,null,function*(){return new rh(e,t,n,r,o,s,i,a).recognize()})}var RN=31;var rh=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(t,n,r,o,i,s,a,c){this.injector=t,this.configLoader=n,this.rootComponentType=r,this.config=o,this.urlTree=i,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.abortSignal=c,this.applyRedirects=new eh(this.urlSerializer,this.urlTree)}noMatchError(t){return new v(4002,`'${t.segmentGroup}'`)}recognize(){return V(this,null,function*(){let t=sD(this.urlTree.root,[],[],this.config).segmentGroup,{children:n,rootSnapshot:r}=yield this.match(t),i=new Bi$1(``,new qe$1(r,n)),s=DD(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,i.url=this.urlSerializer.serialize(s),{state:i,tree:s}})}match(t){return V(this,null,function*(){let n=new ho$1([],Object.freeze({}),Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),x,this.rootComponentType,null,{},this.injector);try{return{children:yield this.processSegmentGroup(this.injector,this.config,t,x,n),rootSnapshot:n}}catch(r){if(r instanceof Hi$1)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof cn$1?this.noMatchError(r):r}})}processSegmentGroup(t,n,r,o,i){return V(this,null,function*(){if(r.segments.length===0&&r.hasChildren())return this.processChildren(t,n,r,i);let s=yield this.processSegment(t,n,r,r.segments,o,!0,i);return s instanceof qe$1?[s]:[]})}processChildren(t,n,r,o){return V(this,null,function*(){let i=[];for(let c of Object.keys(r.children))c===`primary`?i.unshift(c):i.push(c);let s=[];for(let c of i){let u=r.children[c],l=IN(n,c),d=yield this.processSegmentGroup(t,l,u,c,o);s.push(...d)}let a=UD(s);return AN(a),a})}processSegment(t,n,r,o,i,s,a){return V(this,null,function*(){for(let c of n)try{return yield this.processSegmentAgainstRoute(c._injector??t,n,c,r,o,i,s,a)}catch(u){if(u instanceof cn$1||OD(u))continue;throw u}if(MN(r,o,i))return new nh;throw new cn$1(r)})}processSegmentAgainstRoute(t,n,r,o,i,s,a,c){return V(this,null,function*(){if(Dt$1(r)!==s&&(s===x||!Gc(o,i,r)))throw new cn$1(o);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(t,o,r,i,s,c);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(t,o,n,r,i,s,c);throw new cn$1(o)})}expandSegmentAgainstRouteUsingRedirect(t,n,r,o,i,s,a){return V(this,null,function*(){let{matched:c,parameters:u,consumedSegments:l,positionalParamSegments:d,remainingSegments:f}=jD(n,o,i);if(!c)throw new cn$1(n);typeof o.redirectTo==`string`&&o.redirectTo[0]===`/`&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>RN&&(this.allowRedirects=!1));let h=this.createSnapshot(t,o,i,u,a);
5if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let g=yield this.applyRedirects.applyRedirectCommands(l,o.redirectTo,d,FD(h),t),y=yield this.applyRedirects.lineralizeSegments(o,g);return this.processSegment(t,r,n,y.concat(f),s,!1,a)})}createSnapshot(t,n,r,o,i){let s=new ho$1(r,o,Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,ON(n),Dt$1(n),n.component??n._loadedComponent??null,n,kN(n),t),a=ah(s,i,this.paramsInheritanceStrategy);return s.params=Object.freeze(a.params),s.data=Object.freeze(a.data),s}matchSegmentAgainstRoute(t,n,r,o,i,s){return V(this,null,function*(){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=k=>this.createSnapshot(t,r,k.consumedSegments,k.parameters,s),c=yield _c(CN(n,r,o,t,this.urlSerializer,a,this.abortSignal));if(r.path===`**`&&(n.children={}),!c?.matched)throw new cn$1(n);t=r._injector??t;let{routes:u}=yield this.getChildConfig(t,r,o),l=r._loadedInjector??t,{parameters:d,consumedSegments:f,remainingSegments:h}=c,g=this.createSnapshot(t,r,f,d,s),{segmentGroup:y,slicedSegments:S}=sD(n,f,h,u,i);if(S.length===0&&y.hasChildren())return new qe$1(g,yield this.processChildren(l,u,y,g));if(u.length===0&&S.length===0)return new qe$1(g,[]);let T=Dt$1(r)===i,N=yield this.processSegment(l,u,y,S,T?x:i,!0,g);return new qe$1(g,N instanceof qe$1?[N]:[])})}getChildConfig(t,n,r){return V(this,null,function*(){if(n.children)return{routes:n.children,injector:t};if(n.loadChildren){if(n._loadedRoutes!==void 0){let i=n._loadedNgModuleFactory;return i&&!n._loadedInjector&&(n._loadedInjector=i.create(t).injector),{routes:n._loadedRoutes,injector:n._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(yield _c(mN(t,n,r,this.urlSerializer,this.abortSignal))){let i=yield this.configLoader.loadChildren(t,n);return n._loadedRoutes=i.routes,n._loadedInjector=i.injector,n._loadedNgModuleFactory=i.factory,i}throw DN(n)}return{routes:[],injector:t}})}};function AN(e){e.sort((t,n)=>t.value.outlet===x?-1:n.value.outlet===x?1:t.value.outlet.localeCompare(n.value.outlet))}function xN(e){let t=e.value.routeConfig;return t&&t.path===``}function UD(e){let t=[],n=new Set;for(let r of e){if(!xN(r)){t.push(r);continue}let o=t.find(i=>r.value.routeConfig===i.value.routeConfig);o!==void 0?(o.children.push(...r.children),n.add(o)):t.push(r)}for(let r of n){let o=UD(r.children);t.push(new qe$1(r.value,o))}return t.filter(r=>!n.has(r))}function ON(e){return e.data||{}}function kN(e){return e.resolve||{}}function PN(e,t,n,r,o,i,s){return fe$1(a=>V(null,null,function*(){let{state:c,tree:u}=yield NN(e,t,n,r,a.extractedUrl,o,i,s);return j(m({},a),{targetSnapshot:c,urlAfterRedirects:u})}))}function LN(e){return fe$1(t=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return _(t);let o=new Set(r.map(a=>a.route)),i=new Set;for(let a of o)if(!i.has(a))for(let c of BD(a))i.add(c);let s=0;return X(i).pipe(gn$1(a=>o.has(a)?FN(a,n,e):(a.data=ah(a,a.parent,e).resolve,_(void 0))),Ye$1(()=>s++),_s(1),fe$1(a=>s===i.size?_(t):Ee$1))})}function BD(e){return[e,...e.children.map(n=>BD(n)).flat()]}function FN(e,t,n){let r=e.routeConfig,o=e._resolve;return r?.title!==void 0&&!_D(r)&&(o[$i$1]=r.title),bo$1(()=>(e.data=ah(e,e.parent,n).resolve,jN(o,e,t).pipe(q(i=>(e._resolvedData=i,e.data=m(m({},e.data),i),null)))))}function jN(e,t,n){let r=zf(e);if(r.length===0)return _({});let o={};return X(r).pipe(fe$1(i=>UN(e[i],t,n).pipe(Gt$1(),Ye$1(s=>{if(s instanceof po$1)throw Hc(new un$1,s);o[i]=s}))),_s(1),q(()=>o),Wn(i=>OD(i)?Ee$1:Eu(i)))}function UN(e,t,n){let r=t._environmentInjector,o=mo(e,r);return mr$1(o.resolve?o.resolve(t,n):ue$1(r,()=>o(t,n)))}var fh=new D(``);function oh(e){return Ne$1(t=>{let n=e(t);return n?X(n).pipe(q(()=>t)):_(t)})}var hh=(()=>{class e{buildTitle(n){let r,o=n.root;for(;o!==void 0;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(i=>i.outlet===x);return r}getResolvedTitleForRoute(n){return n.data[$i$1]}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:()=>p(VD)})}return e})();var VD=(()=>{class e extends hh{title;constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}static ɵfac=function(r){return new(r||e)(E(tD))};static ɵprov=b({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var Pn$1=new D(``,{factory:()=>({})});var vo$1=new D(``);
5var qc=(()=>{class e{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=p(lf);loadComponent(n,r){return V(this,null,function*(){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let o=V(this,null,function*(){try{let s=yield $D(hf(yield lD(ue$1(n,()=>r.loadComponent()))));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s,s}finally{this.componentLoaders.delete(r)}});return this.componentLoaders.set(r,o),o})}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=V(this,null,function*(){try{let i=yield HD(r,this.compiler,n,this.onLoadEndListener);return r._loadedRoutes=i.routes,r._loadedInjector=i.injector,r._loadedNgModuleFactory=i.factory,i}finally{this.childrenLoaders.delete(r)}});return this.childrenLoaders.set(r,o),o}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function HD(e,t,n,r){return V(this,null,function*(){let i=yield $D(hf(yield lD(ue$1(n,()=>e.loadChildren())))),s;i instanceof Va$1||Array.isArray(i)?s=i:s=yield t.compileModuleAsync(i),r&&r(e);let a,c,l;return Array.isArray(s)?c=s:(a=s.create(n).injector,l=s,c=a.get(vo$1,[],{optional:!0,self:!0}).flat()),{routes:c.map(dh),injector:a,factory:l}})}function $D(e){return V(this,null,function*(){return e})}var Wc=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:()=>p(BN)})}return e})();var BN=(()=>{class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var ph=new D(``);var gh=new D(``);function zD(e,t,n,r){let o=e.get(gh),i=e.get(Z);if(r){o.skipNextTransition=!1;return}if(!i.startViewTransition||o.skipNextTransition)return o.skipNextTransition=!1,new Promise(l=>setTimeout(l));let s,a=new Promise(l=>{s=l}),c=i.startViewTransition(()=>(s(),VN(e)));c.updateCallbackDone.catch(l=>{}),c.ready.catch(l=>{}),c.finished.catch(l=>{});let{onViewTransitionCreated:u}=o;return u&&ue$1(e,()=>u({transition:c,from:t,to:n})),a}function VN(e){return new Promise(t=>{La$1({read:()=>setTimeout(t)},{injector:e})})}var HN=()=>{};var mh=new D(``);var Zc=(()=>{class e{currentNavigation=ae(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=ae(null);events=new te$1;transitionAbortWithErrorSubject=new te$1;configLoader=p(qc);environmentInjector=p(ee);destroyRef=p(xe);urlSerializer=p(kn$1);rootContexts=p(On$1);location=p(Nn$1);inputBindingEnabled=p(zi$1,{optional:!0})!==null;titleStrategy=p(hh);options=p(Pn$1,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||qM;urlHandlingStrategy=p(Wc);createViewTransition=p(ph,{optional:!0});navigationErrorHandler=p(mh,{optional:!0});routerResourcesFeature=p(fh,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>_(void 0);rootComponentType=null;destroyed=!1;constructor(){let n=o=>this.events.next(new kc(o)),r=o=>this.events.next(new Pc(o));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;W(()=>{this.transitions?.next(j(m({},n),{extractedUrl:this.urlHandlingStrategy.extract(n.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(n){return this.transitions=new De(null),this.transitions.pipe(Ve$1(r=>r!==null),Ne$1(r=>{let o=!0,i=!1,s=new AbortController,a=()=>!i&&this.currentTransition?.id===r.id;return _(r).pipe(Ne$1(c=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,``,_e.SupersededByNewNavigation),Ee$1;this.currentTransition=r;let u=this.lastSuccessfulNavigation();this.currentNavigation.set({id:c.id,initialUrl:c.rawUrl,extractedUrl:c.extractedUrl,targetBrowserUrl:typeof c.extras.browserUrl==`string`?this.urlSerializer.parse(c.extras.browserUrl):c.extras.browserUrl,trigger:c.source,extras:c.extras,previousNavigation:u?j(m({},u),{previousNavigation:null}):null,abort:()=>s.abort(),routesRecognizeHandler:c.routesRecognizeHandler,beforeActivateHandler:c.beforeActivateHandler});let l=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=c.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!l&&d!==`reload`)return this.events.next(new Bt$1(c.id,this.urlSerializer.serialize(c.rawUrl),``,co$1.IgnoredSameUrlNavigation)),c.resolve(!1),Ee$1;if(this.urlHandlingStrategy.shouldProcessUrl(c.rawUrl))return _(c).pipe(Ne$1(f=>(this.events.next(new xn$1(f.id,this.urlSerializer.serialize(f.extractedUrl),f.source,f.restoredState)),f.id!==this.navigationId?Ee$1:Promise.resolve(f))),PN(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy,s.signal),Ye$1(f=>{r.targetSnapshot=f.targetSnapshot,r.urlAfterRedirects=f.urlAfterRedirects,this.currentNavigation.update(h=>(h.finalUrl=f.urlAfterRedirects,h)),this.events.next(new ji$1)}),Ne$1(f=>X(r.routesRecognizeHandler.deferredHandle??_(void 0)).pipe(q(()=>f))),Ye$1(()=>{let f=new Fi$1(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(f)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(c.currentRawUrl)){let{id:f,extractedUrl:h,source:g,restoredState:y,extras:S}=c,T=new xn$1(f,this.urlSerializer.serialize(h),g,y);this.events.next(T);let N=SD(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=r=j(m({},c),{targetSnapshot:N,urlAfterRedirects:h,extras:j(m({},S),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(k=>(k.finalUrl=h,k)),_(r)}else return this.events.next(new Bt$1(c.id,this.urlSerializer.serialize(c.extractedUrl),``,co$1.IgnoredByUrlHandlingStrategy)),c.resolve(!1),Ee$1}),q(c=>{let u=new Rc(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);return this.events.next(u),this.currentTransition=r=j(m({},c),{guards:KM(c.targetSnapshot,c.currentSnapshot,this.rootContexts)}),r}),cN(c=>this.events.next(c)),Ne$1(c=>{if(r.guardsResult=c.guardsResult,c.guardsResult&&typeof c.guardsResult!=`boolean`)throw Hc(this.urlSerializer,c.guardsResult);let u=new Ac(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot,!!c.guardsResult);if(this.events.next(u),!a())return Ee$1;if(!c.guardsResult)return this.cancelNavigationTransition(c,``,_e.GuardRejected),Ee$1;if(c.guards.canActivateChecks.length===0)return _(c);let l=new xc(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);if(this.events.next(l),!a())return Ee$1;let d=!1;return _(c).pipe(LN(this.paramsInheritanceStrategy),Ye$1({next:()=>{d=!0;let f=new Oc(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(f)},complete:()=>
5{d||this.cancelNavigationTransition(c,``,_e.NoDataFromResolver)}}))}),oh(c=>{let u=d=>{let f=[];if(d.routeConfig?._loadedComponent)d.component=d.routeConfig?._loadedComponent;else if(d.routeConfig?.loadComponent){let h=d._environmentInjector;f.push(this.configLoader.loadComponent(h,d.routeConfig).then(g=>{d.component=g}))}for(let h of d.children)f.push(...u(h));return f},l=u(c.targetSnapshot.root);return l.length===0?_(c):X(Promise.all(l).then(()=>c))}),Ne$1(c=>{let{newlyCreatedRoutes:u,state:l}=WM(n.routeReuseStrategy,c.targetSnapshot,c.currentRouterState);return this.currentTransition=r=c=j(m({},c),{targetRouterState:l,newlyCreatedRoutes:u}),this.currentNavigation.update(d=>(d.targetRouterState=l,d)),_(c)}),this.routerResourcesFeature?.setupAndRunResources(s.signal)??(c=>c),oh(()=>this.afterPreactivation()),Ne$1(()=>{let{currentSnapshot:c,targetSnapshot:u}=r,l=this.createViewTransition?.(this.environmentInjector,c.root,u.root,r.hasUAVisualTransition);return l?X(l).pipe(q(()=>r)):_(r)}),zt$1(1),Ne$1(c=>{o=!1,this.events.next(new lo$1);let u=r.beforeActivateHandler.deferredHandle;return u?X(u.then(()=>c)):_(c)}),Ye$1(c=>{new Jf(n.routeReuseStrategy,r.targetRouterState,r.currentRouterState,u=>this.events.next(u),this.inputBindingEnabled).activate(this.rootContexts),c.newlyCreatedRoutes?.clear(),a()&&(GD(c.targetRouterState),i=!0,this.currentNavigation.update(u=>(u.abort=HN,u)),this.lastSuccessfulNavigation.set(W(this.currentNavigation)),this.events.next(new Ze$1(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects))),this.titleStrategy?.updateTitle(c.targetRouterState.snapshot),c.resolve(!0))}),So$1(kD(s.signal).pipe(Ve$1(()=>!i&&o),Ye$1(()=>{this.cancelNavigationTransition(r,s.signal.reason+``,_e.Aborted)}))),Ye$1({complete:()=>{i=!0}}),So$1(this.transitionAbortWithErrorSubject.pipe(Ye$1(c=>{throw c}))),Mr$1(()=>{s.abort(),i||this.cancelNavigationTransition(r,``,_e.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Wn(c=>{if(i=!0,aD(r),this.destroyed)return r.resolve(!1),Ee$1;if(xD(c))this.events.next(new nt$2(r.id,this.urlSerializer.serialize(r.extractedUrl),c.message,c.cancellationCode)),QM(c)?this.events.next(new fo$1(c.url,c.navigationBehaviorOptions)):r.resolve(!1);else{let u=new gr$1(r.id,this.urlSerializer.serialize(r.extractedUrl),c,r.targetSnapshot??void 0);try{let l=ue$1(this.environmentInjector,()=>this.navigationErrorHandler?.(u));if(l instanceof po$1){let{message:d,cancellationCode:f}=Hc(this.urlSerializer,l);this.events.next(new nt$2(r.id,this.urlSerializer.serialize(r.extractedUrl),d,f)),this.events.next(new fo$1(l.redirectTo,l.navigationBehaviorOptions))}else throw this.events.next(u),c}catch(l){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(l)}}return Ee$1}))}))}cancelNavigationTransition(n,r,o){aD(n);let i=new nt$2(n.id,this.urlSerializer.serialize(n.extractedUrl),r,o);this.events.next(i),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=W(this.currentNavigation),o=r?.targetBrowserUrl??r?.extractedUrl;return n.toString()!==o?.toString()&&!r?.extras.skipLocationChange}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function $N(e){return e!==io$1}function aD(e){for(let t of e.newlyCreatedRoutes??[])t._localInjector?.destroy(),t._localInjector=void 0;GD(e.targetRouterState)}function GD(e){if(!e)return;let t=n=>{n.value.pending?.set(!1),n.children.forEach(t)};t(e._root)}var qD=new D(``);var WD=(()=>{class e{static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:()=>p(zN)})}return e})();var zc=class{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig}shouldDestroyInjector(t){return!0}};var zN=(()=>{class e extends zc{static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var Yc=(()=>
5{class e{urlSerializer=p(kn$1);options=p(Pn$1,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||`replace`;location=p(Nn$1);urlHandlingStrategy=p(Wc);urlUpdateStrategy=this.options.urlUpdateStrategy||`deferred`;currentUrlTree=new ke;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:n,initialUrl:r,targetBrowserUrl:o}){let i=n!==void 0?this.urlHandlingStrategy.merge(n,r):r,s=o??i;return s instanceof ke?this.urlSerializer.serialize(s):s}routerUrlState(n){return n?.targetBrowserUrl===void 0||n?.finalUrl===void 0?{}:{ɵrouterUrl:this.urlSerializer.serialize(n.finalUrl)}}commitTransition({targetRouterState:n,finalUrl:r,initialUrl:o}){r&&n?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,o),this.routerState=n):this.rawUrlTree=o}routerState=SD(null,p(ee));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:()=>p(GN)})}return e})();var GN=(()=>{class e extends Yc{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!==`computed`?this.currentPageId:this.restoredState()?.ɵrouterPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{r.type===`popstate`&&setTimeout(()=>{n(r.url,r.state,`popstate`,{replaceUrl:!0},r.hasUAVisualTransition)})})}handleRouterEvent(n,r){n instanceof xn$1?this.updateStateMemento():n instanceof Bt$1?this.commitTransition(r):n instanceof Fi$1?this.urlUpdateStrategy===`eager`&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):n instanceof lo$1?(this.commitTransition(r),this.urlUpdateStrategy===`deferred`&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):n instanceof nt$2&&!bD(n)?this.restoreHistory(r):n instanceof gr$1?this.restoreHistory(r,!0):n instanceof Ze$1&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let{extras:o,id:i}=r,{replaceUrl:s,state:a}=o;if(this.location.isCurrentPathEqualTo(n)||s){let c=this.browserPageId,u=m(m({},a),this.generateNgRouterState(i,c,r));this.location.replaceState(n,``,u)}else{let c=m(m({},a),this.generateNgRouterState(i,this.browserPageId+1,r));this.location.go(n,``,c)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution===`computed`){let o=this.browserPageId,i=this.currentPageId-o;i!==0?this.location.historyGo(i):this.getCurrentUrlTree()===n.finalUrl&&i===0&&(this.resetInternalState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution===`replace`&&(r&&this.resetInternalState(n),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:n}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),``,this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r,o){return this.canceledNavigationResolution===`computed`?m({navigationId:n,ɵrouterPageId:r},this.routerUrlState(o)):m({navigationId:n},this.routerUrlState(o))}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function Qc(e,t){e.events.pipe(Ve$1(n=>n instanceof Ze$1||n instanceof nt$2||n instanceof gr$1||n instanceof Bt$1),q(n=>n instanceof Ze$1||n instanceof Bt$1?0:(n instanceof nt$2?n.code===_e.Redirect||n.code===_e.SupersededByNewNavigation:!1)?2:1),Ve$1(n=>n!==2),zt$1(1)).subscribe(()=>{t()})}var Et$1=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=p($a$1);stateManager=p(Yc);options=p(Pn$1,{optional:!0})||{};pendingTasks=p(lt$1);urlUpdateStrategy=this.options.urlUpdateStrategy||`deferred`;navigationTransitions=p(Zc);
5urlSerializer=p(kn$1);location=p(Nn$1);urlHandlingStrategy=p(Wc);injector=p(ee);_events=new te$1;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=p(WD);injectorCleanup=p(qD,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||`ignore`;config=p(vo$1,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!p(zi$1,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:n=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new ie;subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let o=this.navigationTransitions.currentTransition,i=W(this.navigationTransitions.currentNavigation);if(o!==null&&i!==null){if(this.stateManager.handleRouterEvent(r,i),r instanceof nt$2&&r.code!==_e.Redirect&&r.code!==_e.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof Ze$1)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(r instanceof fo$1){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),c=m({scroll:o.extras.scroll,browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy===`eager`||$N(o.source)},s);this.scheduleNavigation(a,io$1,null,c,o.hasUAVisualTransition,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}zM(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortWithErrorSubject.next(o)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),io$1,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r,o,i,s)=>{this.navigateToSyncWithBrowser(n,o,r,i,s)})}navigateToSyncWithBrowser(n,r,o,i,s){let a=o?.navigationId?o:null,c=o?.ɵrouterUrl??n;if(o?.ɵrouterUrl&&(i=j(m({},i),{browserUrl:n})),o){let l=m({},o);delete l.navigationId,delete l.ɵrouterPageId,delete l.ɵrouterUrl,Object.keys(l).length!==0&&(i.state=l)}let u=this.parseUrl(c);this.scheduleNavigation(u,r,a,i,s).catch(l=>{this.disposed||this.injector.get($e)(l)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return W(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(dh),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){let{relativeTo:o,queryParams:i,fragment:s,queryParamsHandling:a,preserveFragment:c}=r,u=c?this.currentUrlTree.fragment:s,l=null;switch(a??this.options.defaultQueryParamsHandling){case`merge`:l=m(m({},this.currentUrlTree.queryParams),i);break;case`preserve`:l=this.currentUrlTree.queryParams;break;default:l=i||null}l!==null&&(l=this.removeEmptyProps(l));let d;try{d=ED(o?o.snapshot:this.routerState.snapshot.root)}catch(f){(typeof n[0]!=`string`||n[0][0]!==`/`)&&(n=[]),d=this.currentUrlTree.root}return wD(d,n,l,u??null,this.urlSerializer)}navigateByUrl(n,r={skipLocationChange:!1}){let o=An$1(n)?n:this.parseUrl(n),i=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(i,io$1,null,r)}navigate(n,r={skipLocationChange:!1}){return qN(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch(r){return this.console.warn(at$2(4018,!1)),this.urlSerializer.parse(`/`)}}isActive(n,r){let o;if(r===!0?o=m({},ih):r===!1?o=m({},ao):o=m(m({},ao),r),An$1(n))return Gf(this.currentUrlTree,n,o);let i=this.parseUrl(n);return Gf(this.currentUrlTree,i,o)}removeEmptyProps(n){return Object.entries(n).reduce((r,[o,i])=>(i!=null&&(r[o]=i),r),{})}scheduleNavigation(n,r,o,i,s,a){if(this.disposed)return Promise.resolve(!1);let c,u,l;a?(c=a.resolve,u=a.reject,l=a.promise):l=new Promise((f,h)=>{c=f,u=h});let d=this.pendingTasks.add();return Qc(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:i,hasUAVisualTransition:s,resolve:c,reject:u,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}
5),l.catch(Promise.reject.bind(Promise))}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();function qN(e){for(let t=0;t<e.length;t++)if(e[t]==null)throw new v(4008,!1)}var WN=(()=>{class e{router=p(Et$1);stateManager=p(Yc);fragment=ae(``);queryParams=ae({});path=ae(``);serializer=p(kn$1);constructor(){this.updateState(),this.router.events?.subscribe(n=>{n instanceof Ze$1&&this.updateState()})}updateState(){let{fragment:n,root:r,queryParams:o}=this.stateManager.getCurrentUrlTree();this.fragment.set(n),this.queryParams.set(o),this.path.set(this.serializer.serialize(new ke(r)))}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var Kc=(()=>{class e{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=p(new Qa$1(`href`),{optional:!0});reactiveHref=df(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return W(this.reactiveHref)}set href(n){this.reactiveHref.set(n)}set target(n){this._target.set(n)}get target(){return W(this._target)}_target=ae(void 0);set queryParams(n){this._queryParams.set(n)}get queryParams(){return W(this._queryParams)}_queryParams=ae(void 0,{equal:()=>!1});set fragment(n){this._fragment.set(n)}get fragment(){return W(this._fragment)}_fragment=ae(void 0);set queryParamsHandling(n){this._queryParamsHandling.set(n)}get queryParamsHandling(){return W(this._queryParamsHandling)}_queryParamsHandling=ae(void 0);set state(n){this._state.set(n)}get state(){return W(this._state)}_state=ae(void 0,{equal:()=>!1});set info(n){this._info.set(n)}get info(){return W(this._info)}_info=ae(void 0,{equal:()=>!1});set relativeTo(n){this._relativeTo.set(n)}get relativeTo(){return W(this._relativeTo)}_relativeTo=ae(void 0);set preserveFragment(n){this._preserveFragment.set(n)}get preserveFragment(){return W(this._preserveFragment)}_preserveFragment=ae(!1);set skipLocationChange(n){this._skipLocationChange.set(n)}get skipLocationChange(){return W(this._skipLocationChange)}_skipLocationChange=ae(!1);set replaceUrl(n){this._replaceUrl.set(n)}get replaceUrl(){return W(this._replaceUrl)}_replaceUrl=ae(!1);browserUrl=Ka$1(void 0);isAnchorElement;onChanges=new te$1;applicationErrorHandler=p($e);options=p(Pn$1,{optional:!0});reactiveRouterState=p(WN);constructor(n,r,o,i,s,a){this.router=n,this.route=r,this.tabIndexAttribute=o,this.renderer=i,this.el=s,this.locationStrategy=a;let c=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c===`a`||c===`area`||!!(typeof customElements==`object`&&customElements.get(c)?.observedAttributes?.includes?.(`href`))}setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue(`tabindex`,n)}ngOnChanges(n){this.onChanges.next(this)}routerLinkInput=ae(null);set routerLink(n){n==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):(An$1(n)?this.routerLinkInput.set(n):this.routerLinkInput.set(Array.isArray(n)?n:[n]),this.setTabIndexIfNotOnNativeEl(`0`))}onClick(n,r,o,i,s){let a=this._urlTree();if(a===null||this.isAnchorElement&&(n!==0||r||o||i||s||typeof this.target==`string`&&this.target!=`_self`))return!0;let c=this.browserUrl(),u=m({skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info},c!==void 0&&{browserUrl:c});return this.router.navigateByUrl(a,u)?.catch(l=>{this.applicationErrorHandler(l)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(n,r){let o=this.renderer,i=this.el.nativeElement;r!==null?o.setAttribute(i,n,r):o.removeAttribute(i,n)}_urlTree=vi$1(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let n=o=>o===`preserve`||o===`merge`;(n(this._queryParamsHandling())||n(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let r=this.routerLinkInput();return r===null||!this.router.createUrlTree?null:An$1(r)?r:this.router.createUrlTree(r,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(n,r)=>this.computeHref(n)===this.computeHref(r)});get urlTree(){return W(this._urlTree)}computeHref(n){return n!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(n))??``:null}static ɵfac=function(r){return new(r||e)(Ce(Et$1),Ce(ln$1),oi(`tabindex`),Ce(Mn$1),Ce(xt),Ce(vt))};static ɵdir=fr$1({type:e,selectors:[[``,`routerLink`,``]],hostVars:2,hostBindings:function(r,o){r&1&&Wa$1(`click`,function(s){return o.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Ga$1(`href`,o.reactiveHref(),xd)(`target`,o._target())},inputs:{target:`target`,queryParams:`queryParams`,fragment:`fragment`,queryParamsHandling:`queryParamsHandling`,state:`state`,info:`info`,relativeTo:`relativeTo`,preserveFragment:[2,`preserveFragment`,`preserveFragment`,Di$1],skipLocationChange:[2,`skipLocationChange`,`skipLocationChange`,Di$1],replaceUrl:[2,`replaceUrl`,`replaceUrl`,Di$1],browserUrl:[1,`browserUrl`],routerLink:`routerLink`},features:[ur$1]})}return e})();var ZN=(()=>{class e{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new be;link=p(Kc,{optional:!0});constructor(n,r,o,i){this.router=n,this.element=r,this.renderer=o,this.cdr=i,this.routerEventsSubscription=n.events.subscribe(s=>{s instanceof Ze$1&&this.update()})}ngAfterContentInit(){_(this.links.changes,_(null)).pipe(pn$1()).subscribe(n=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let n=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=X(n).pipe(pn$1()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(n){if(n==null){this.classes=[];return}let r=Array.isArray(n)?n:n.split(` `);this.classes=r.filter(o=>!!o)}ngOnChanges(n){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||this.routerLinkActiveOptions===null&&!this._isActive||queueMicrotask(()=>{let n=this.hasActiveLinks();
5this.classes.forEach(r=>{n?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),n&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,`aria-current`,this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,`aria-current`),this._isActive!==n&&(this._isActive=n,this.cdr.markForCheck(),this.isActiveChange.emit(n))})}isLinkActive(n){let r=this.routerLinkActiveOptions;if(r===null)return()=>!1;let o;return r===void 0?o=m({},ao):YN(r)?o=r:r.exact??!1?o=m({},ih):o=m({},ao),i=>{let s=i.urlTree;return s?W(sh(s,n,o)):!1}}hasActiveLinks(){let n=this.isLinkActive(this.router);return this.link&&n(this.link)||this.links.some(n)}static ɵfac=function(r){return new(r||e)(Ce(Et$1),Ce(xt),Ce(Mn$1),Ce(Jr$1))};static ɵdir=fr$1({type:e,selectors:[[``,`routerLinkActive`,``]],contentQueries:function(r,o,i){if(r&1&&Za$1(i,Kc,5),r&2){let s;af(s=cf())&&(o.links=s)}},inputs:{routerLinkActiveOptions:`routerLinkActiveOptions`,ariaCurrentWhenActive:`ariaCurrentWhenActive`,routerLinkActive:`routerLinkActive`},outputs:{isActiveChange:`isActiveChange`},exportAs:[`routerLinkActive`],features:[ur$1]})}return e})();function YN(e){let t=e;return!!(t.paths||t.matrixParams||t.queryParams||t.fragment)}var qi$1=class{};var QN=(()=>{class e{preload(n,r){return r().pipe(Wn(()=>_(null)))}static ɵfac=function(r){return new(r||e)};static ɵprov=U({token:e,factory:e.ɵfac})}return e})();var ZD=(()=>{class e{router;injector;preloadingStrategy;loader;subscription;constructor(n,r,o,i){this.router=n,this.injector=r,this.preloadingStrategy=o,this.loader=i}setUpPreloading(){this.subscription=this.router.events.pipe(Ve$1(n=>n instanceof Ze$1),gn$1(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription?.unsubscribe()}processRoutes(n,r){let o=[];for(let i of r){i.providers&&!i._injector&&(i._injector=Kr$1(i.providers,n,``));let s=i._injector??n;i._loadedNgModuleFactory&&!i._loadedInjector&&(i._loadedInjector=i._loadedNgModuleFactory.create(s).injector);let a=i._loadedInjector??s;(i.loadChildren&&!i._loadedRoutes&&i.canLoad===void 0||i.loadComponent&&!i._loadedComponent)&&o.push(this.preloadConfig(s,i)),(i.children||i._loadedRoutes)&&o.push(this.processRoutes(a,i.children??i._loadedRoutes))}return X(o).pipe(pn$1())}preloadConfig(n,r){return this.preloadingStrategy.preload(r,()=>{if(n.destroyed)return _(null);let o;r.loadChildren&&r.canLoad===void 0?o=X(this.loader.loadChildren(n,r)):o=_(null);let i=o.pipe(fe$1(s=>s===null?_(void 0):(r._loadedRoutes=s.routes,r._loadedInjector=s.injector,r._loadedNgModuleFactory=s.factory,this.processRoutes(s.injector??n,s.routes))));if(r.loadComponent&&!r._loadedComponent)return X([i,this.loader.loadComponent(n,r)]).pipe(pn$1());else return i})}static ɵfac=function(r){return new(r||e)(E(Et$1),E(ee),E(qi$1),E(qc))};static ɵprov=b({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();var YD=new D(``);var KN=(()=>{class e{options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=io$1;restoredId=0;store={};isHydrating=p(Sd,{optional:!0})??!1;urlSerializer=p(kn$1);zone=p(z$1);viewportScroller=p(bf);transitions=p(Zc);constructor(n){this.options=n,this.options.scrollPositionRestoration||=`disabled`,this.options.anchorScrolling||=`disabled`,this.isHydrating&&p(kt$1).whenStable().then(()=>{this.isHydrating=!1})}init(){this.options.scrollPositionRestoration!==`disabled`&&this.viewportScroller.setHistoryScrollRestoration(`manual`),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof xn$1?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof Ze$1?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof Bt$1&&n.code===co$1.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{if(!(n instanceof uo$1)||n.scrollBehavior===`manual`)return;let r={behavior:`instant`};n.position?this.options.scrollPositionRestoration===`top`?this.viewportScroller.scrollToPosition([0,0],r):this.options.scrollPositionRestoration===`enabled`&&this.viewportScroller.scrollToPosition(n.position,r):n.anchor&&this.options.anchorScrolling===`enabled`?this.viewportScroller.scrollToAnchor(n.anchor):this.options.scrollPositionRestoration!==`disabled`&&this.viewportScroller.scrollToPosition([0,0])})}scheduleScrollEvent(n,r){if(this.isHydrating)return;let o=W(this.transitions.currentNavigation)?.extras.scroll;this.zone.runOutsideAngular(()=>V(this,null,function*(){yield new Promise(i=>{setTimeout(i),typeof requestAnimationFrame<`u`&&requestAnimationFrame(i)}),this.zone.run(()=>{this.transitions.events.next(new uo$1(n,this.lastSource===`popstate`?this.store[this.restoredId]:null,r,o))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static ɵfac=function(r){li()};static ɵprov=b({token:e,factory:e.ɵfac})}return e})();function XN(){return p(Et$1).routerState.root}function Wi$1(e,t){return{ɵkind:e,ɵproviders:t}}function JN(){let e=p(je$1);return t=>{let n=e.get(kt$1);if(t!==n.components[0])return;let r=e.get(Et$1),o=e.get(QD);e.get(yh)===1&&r.initialNavigation(),e.get(JD,null,{optional:!0})?.setUpPreloading(),e.get(YD,null,{optional:!0})?.init(),r.resetRootComponentType(n.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var QD=new D(``,{factory:()=>new te$1});var yh=new D(``,{factory:()=>1});function KD(){return Wi$1(2,[{provide:xa$1,useValue:!0},{provide:yh,useValue:0},Ha$1(()=>{let t=p(je$1);return t.get(mf,Promise.resolve()).then(()=>new Promise(r=>{let o=t.get(Et$1),i=t.get(QD);Qc(o,()=>{r(!0)}),t.get(Zc).afterPreactivation=()=>(r(!0),i.closed?_(void 0):i),o.initialNavigation()}))})])}function XD(){return Wi$1(3,[Ha$1(()=>{p(Et$1).setUpLocationChangeListener()}),{provide:yh,useValue:2}])}var JD=new D(``);function eE(e){return Wi$1(0,[{provide:JD,useExisting:ZD},{provide:qi$1,useExisting:e}])}function tE(e={}){return Wi$1(8,[{provide:zi$1,useFactory:()=>new ND(e,p(fh,{optional:!0}))}])}function nE(e){pt$1(`NgRouterViewTransitions`);return Wi$1(9,[{provide:ph,useValue:zD},{provide:gh,useValue:m({skipNextTransition:!!e?.skipInitialTransition},e)}])}var rE=[Nn$1,{provide:kn$1,useClass:un$1},Et$1,On$1,{provide:ln$1,useFactory:XN},qc];var eR=(()=>{class e{constructor(){}static forRoot(n,r){return{ngModule:e,providers:[rE,[],{provide:vo$1,multi:!0,useValue:n},[],r?.errorHandler?{provide:mh,useValue:r.errorHandler}:[],{provide:Pn$1,useValue:r||{}},r?.useHash?nR():rR(),tR(),r?.preloadingStrategy?eE(r.preloadingStrategy).ɵproviders:[],r?.initialNavigation?oR(r):[],r?.bindToComponentInputs?tE(typeof r.bindToComponentInputs==`object`?r.bindToComponentInputs:{}).ɵproviders:[],r?.enableViewTransitions?nE().ɵproviders:[],iR()]}}static forChild(n){return{ngModule:e,providers:[{provide:vo$1,multi:!0,useValue:n}]}}static ɵfac=function(r){return new(r||e)};static ɵmod=nn$1({type:e});static ɵinj=bt({})}return e})();function tR(){return{provide:YD,useFactory:()=>{let e=p(bf),t=p(Pn$1);return t.scrollOffset&&e.setOffset(t.scrollOffset),new KN(t)}}}function nR(){return{provide:vt,useClass:Ef}}function rR(){return{provide:vt,useClass:ec}}function oR(e){return[e.initialNavigation===`disabled`?XD().ɵproviders:[],e.initialNavigation===`enabledBlocking`?KD().ɵproviders:[]]}var vh=new D(``);function iR(){return[{provide:vh,useFactory:JN},{provide:hi,multi:!0,useExisting:vh}]}var l$1=(()=>
5{class i{static ɵfac=function(m){return new(m||i)};static ɵcmp=Qd({type:i,selectors:[[`app-banner-courses`]],decls:25,vars:0,consts:[[1,`banner`],[1,`fas`,`fa-check`],[`href`,`https://courses.nestjs.com`,`target`,`_blank`,`title`,`Courses | NestJS - A node.js framework built on top of TypeScript`,1,`btn-more`]],template:function(m,a){m&1&&(of(0,`div`,0)(1,`h2`),gT(2,`Learn the `),of(3,`span`),gT(4,`right`),sf(),gT(5,` way!`),sf(),of(6,`ul`)(7,`li`)(8,`span`),Tv(9,`i`,1),sf(),gT(10,` 80+ chapters `),sf(),of(11,`li`)(12,`span`),Tv(13,`i`,1),sf(),gT(14,` 5+ hours of videos `),sf(),of(15,`li`)(16,`span`),Tv(17,`i`,1),sf(),gT(18,` Official certificate `),sf(),of(19,`li`)(20,`span`),Tv(21,`i`,1),sf(),gT(22,` Deep-dive sessions `),sf()(),of(23,`a`,2),gT(24,`Explore official courses`),sf()())},styles:[`.banner[_ngcontent-%COMP%]{background-color:#111;background-image:url(/assets/banners/courses.jpg)}`]})}return i})();var l=(()=>{class m{static ɵfac=function(o){return new(o||m)};static ɵcmp=Qd({type:m,selectors:[[`app-banner-enterprise`]],decls:25,vars:0,consts:[[1,`banner`],[1,`fas`,`fa-check`],[`href`,`https://enterprise.nestjs.com`,`target`,`_blank`,`title`,`Enterprise | NestJS - A progressive Node.js framework`,1,`btn-more`]],template:function(o,a){o&1&&(of(0,`div`,0)(1,`h2`),gT(2,`Official `),of(3,`span`),gT(4,`enterprise`),sf(),gT(5,` support`),sf(),of(6,`ul`)(7,`li`)(8,`span`),Tv(9,`i`,1),sf(),gT(10,` Providing technical guidance `),sf(),of(11,`li`)(12,`span`),Tv(13,`i`,1),sf(),gT(14,` Performing in-depth code reviews `),sf(),of(15,`li`)(16,`span`),Tv(17,`i`,1),sf(),gT(18,` Mentoring team members `),sf(),of(19,`li`)(20,`span`),Tv(21,`i`,1),sf(),gT(22,` Advising best practices `),sf()(),of(23,`a`,2),gT(24,`Explore more`),sf()())},styles:[`.banner[_ngcontent-%COMP%]{background-color:#111;background-image:url(/assets/banners/enterprise.jpg)}.banner[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{max-width:820px}`]})}return m})();var s=(()=>{class i{static ɵfac=function(m){return new(m||i)};static ɵcmp=Qd({type:i,selectors:[[`app-banner-devtools`]],decls:24,vars:0,consts:[[1,`banner`],[1,`fas`,`fa-check`],[`href`,`https://devtools.nestjs.com`,`target`,`_blank`,`title`,`Devtools | NestJS - A node.js framework built on top of TypeScript`,1,`btn-more`]],template:function(m,r){m&1&&(of(0,`div`,0)(1,`h2`),gT(2,`Explore your graph with `),of(3,`span`),gT(4,`NestJS Devtools`),sf()(),of(5,`ul`)(6,`li`)(7,`span`),Tv(8,`i`,1),sf(),gT(9,` Graph visualizer `),sf(),of(10,`li`)(11,`span`),Tv(12,`i`,1),sf(),gT(13,` Routes navigator `),sf(),of(14,`li`)(15,`span`),Tv(16,`i`,1),sf(),gT(17,` Interactive playground `),sf(),of(18,`li`)(19,`span`),Tv(20,`i`,1),sf(),gT(21,` CI/CD integration `),sf()(),of(22,`a`,2),gT(23,`Sign up`),sf()())},styles:[`.banner[_ngcontent-%COMP%]{background-color:#111;background-image:url(/assets/banners/courses-graphql-sf.jpg)}`]})}return i})();var u=(()=>{class t{isJsActive=!1;static ɵfac=function(e){return new(e||t)};static ɵcmp=Qd({type:t,selectors:[[`app-tabs`]],decls:5,vars:4,consts:[[1,`tabs-wrapper`],[1,`tab`,3,`click`],[1,`tab`,`active`,3,`click`]],template:function(e,i){e&1&&(of(0,`div`,0)(1,`span`,1),Rv(`click`,function(){return i.isJsActive=!0}),gT(2,` JS `),sf(),of(3,`span`,2),Rv(`click`,function(){return i.isJsActive=!1}),gT(4,` TS `),sf()()),e&2&&(LC(),kv(`active`,i.isJsActive),LC(2),kv(`active`,!i.isJsActive))},styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
5left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.tabs-wrapper[_ngcontent-%COMP%]{position:absolute;right:0;top:0;bottom:0}.tab[_ngcontent-%COMP%]{color:#dfdfdf;cursor:pointer;margin:0;float:right;font-weight:600;height:100%;padding:12px 20px;box-sizing:border-box;-webkit-box-sizing:border-box}.tab[_ngcontent-%COMP%]:hover:not(.active){color:#efefef}.tab.active[_ngcontent-%COMP%]{display:none}`]})}return t})();var g=(()=>{class t{transform(n,e){return e?`${n}.js`:`${n}.ts`}static ɵfac=function(e){return new(e||t)};static ɵpipe=Kd({name:`extension`,type:t,pure:!0})}return t})();var le=sR((ut,Q)=>{var d=(function(a){var f=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,e=0,t={},n={manual:a.Prism&&a.Prism.manual,disableWorkerMessageHandler:a.Prism&&a.Prism.disableWorkerMessageHandler,util:{encode:function r(i){return i instanceof l?new l(i.type,r(i.content),i.alias):Array.isArray(i)?i.map(r):i.replace(/&/g,`&`).replace(/</g,`<`).replace(/\u00a0/g,` `)},type:function(r){return Object.prototype.toString.call(r).slice(8,-1)},objId:function(r){return r.__id||Object.defineProperty(r,"__id",{value:++e}),r.__id},clone:function r(i,o){o=o||{};var s,c;switch(n.util.type(i)){case`Object`:if(c=n.util.objId(i),o[c])return o[c];s={},o[c]=s;for(var p in i)i.hasOwnProperty(p)&&(s[p]=r(i[p],o));return s;case`Array`:return c=n.util.objId(i),o[c]?o[c]:(s=[],o[c]=s,i.forEach(function(h,g){s[g]=r(h,o)}),s);default:return i}},getLanguage:function(r){for(;r;){var i=f.exec(r.className);if(i)return i[1].toLowerCase();r=r.parentElement}return`none`},setLanguage:function(r,i){r.className=r.className.replace(RegExp(f,`gi`),``),r.classList.add(`language-`+i)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw new Error}catch(s){var r=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(s.stack)||[])[1];if(r){var i=document.getElementsByTagName(`script`);for(var o in i)if(i[o].src==r)return i[o]}return null}},isActive:function(r,i,o){for(var s=`no-`+i;r;){var c=r.classList;if(c.contains(i))return!0;if(c.contains(s))return!1;r=r.parentElement}return!!o}},languages:{plain:t,plaintext:t,text:t,txt:t,extend:function(r,i){var o=n.util.clone(n.languages[r]);for(var s in i)o[s]=i[s];return o},insertBefore:function(r,i,o,s){s=s||n.languages;var c=s[r],p={};for(var h in c)if(c.hasOwnProperty(h)){if(h==i)for(var g in o)o.hasOwnProperty(g)&&(p[g]=o[g]);o.hasOwnProperty(h)||(p[h]=c[h])}var S=s[r];return s[r]=p,n.languages.DFS(n.languages,function(E,R){R===S&&E!=r&&(this[E]=p)}),p},DFS:function r(i,o,s,c){c=c||{};var p=n.util.objId;for(var h in i)if(i.hasOwnProperty(h)){o.call(i,h,i[h],s||h);var g=i[h],S=n.util.type(g);S===`Object`&&!c[p(g)]?(c[p(g)]=!0,r(g,o,null,c)):S===`Array`&&!c[p(g)]&&(c[p(g)]=!0,r(g,o,h,c))}}},plugins:{},highlightAll:function(r,i){n.highlightAllUnder(document,r,i)},highlightAllUnder:function(r,i,o){var s={callback:o,container:r,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};n.hooks.run(`before-highlightall`,s),s.elements=Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)),n.hooks.run(`before-all-elements-highlight`,s);for(var c=0,p;p=s.elements[c++];)n.highlightElement(p,i===!0,s.callback)},highlightElement:function(r,i,o){var s=n.util.getLanguage(r),c=n.languages[s];n.util.setLanguage(r,s);var p=r.parentElement;p&&p.nodeName.toLowerCase()===`pre`&&n.util.setLanguage(p,s);var g={element:r,language:s,grammar:c,code:r.textContent};function S(R){g.highlightedCode=R,n.hooks.run(`before-insert`,g),g.element.innerHTML=g.highlightedCode,n.hooks.run(`after-highlight`,g),n.hooks.run(`complete`,g),o&&o.call(g.element)}if(n.hooks.run(`before-sanity-check`,g),p=g.element.parentElement,p&&p.nodeName.toLowerCase()===`pre`&&!p.hasAttribute(`tabindex`)&&p.setAttribute(`tabindex`,`0`),!g.code){n.hooks.run(`complete`,g),o&&o.call(g.element);return}
vendor: 4,655 bytes, line 5
5if(n.hooks.run(`before-highlight`,g),!g.grammar){S(n.util.encode(g.code));return}if(i&&a.Worker){var E=new Worker(n.filename);E.onmessage=function(R){S(R.data)},E.postMessage(JSON.stringify({language:g.language,code:g.code,immediateClose:!0}))}else S(n.highlight(g.code,g.grammar,g.language))},highlight:function(r,i,o){var s={code:r,grammar:i,language:o};if(n.hooks.run(`before-tokenize`,s),!s.grammar)throw new Error(`The language "`+s.language+`" has no grammar.`);return s.tokens=n.tokenize(s.code,s.grammar),n.hooks.run(`after-tokenize`,s),l.stringify(n.util.encode(s.tokens),s.language)},tokenize:function(r,i){var o=i.rest;if(o){for(var s in o)i[s]=o[s];delete i.rest}var c=new y;return I(c,c.head,r),m(r,c,i,c.head,0),T(c)},hooks:{all:{},add:function(r,i){var o=n.hooks.all;o[r]=o[r]||[],o[r].push(i)},run:function(r,i){var o=n.hooks.all[r];if(!(!o||!o.length))for(var s=0,c;c=o[s++];)c(i)}},Token:l};a.Prism=n;function l(r,i,o,s){this.type=r,this.content=i,this.alias=o,this.length=(s||``).length|0}l.stringify=function r(i,o){if(typeof i==`string`)return i;if(Array.isArray(i)){var s=``;return i.forEach(function(S){s+=r(S,o)}),s}var c={type:i.type,content:r(i.content,o),tag:`span`,classes:[`token`,i.type],attributes:{},language:o},p=i.alias;p&&(Array.isArray(p)?Array.prototype.push.apply(c.classes,p):c.classes.push(p)),n.hooks.run(`wrap`,c);var h=``;for(var g in c.attributes)h+=` `+g+`="`+(c.attributes[g]||``).replace(/"/g,`"`)+`"`;return`<`+c.tag+` class="`+c.classes.join(` `)+`"`+h+`>`+c.content+`</`+c.tag+`>`};function u(r,i,o,s){r.lastIndex=i;var c=r.exec(o);if(c&&s&&c[1]){var p=c[1].length;c.index+=p,c[0]=c[0].slice(p)}return c}function m(r,i,o,s,c,p){for(var h in o)if(!(!o.hasOwnProperty(h)||!o[h])){var g=o[h];g=Array.isArray(g)?g:[g];for(var S=0;S<g.length;++S){if(p&&p.cause==h+`,`+S)return;var E=g[S],R=E.inside,ue=!!E.lookbehind,de=!!E.greedy,Ve=E.alias;if(de&&!E.pattern.global){var Xe=E.pattern.toString().match(/[imsuy]*$/)[0];E.pattern=RegExp(E.pattern.source,Xe+`g`)}for(var pe=E.pattern||E,A=s.next,C=c;A!==i.tail&&!(p&&C>=p.reach);C+=A.value.length,A=A.next){var L=A.value;if(i.length>r.length)return;if(!(L instanceof l)){var j=1,x;if(de){if(x=u(pe,C,r,ue),!x||x.index>=r.length)break;var G=x.index,Ye=x.index+x[0].length,M=C;for(M+=A.value.length;G>=M;)A=A.next,M+=A.value.length;if(M-=A.value.length,C=M,A.value instanceof l)continue;for(var U=A;U!==i.tail&&(M<Ye||typeof U.value==`string`);U=U.next)j++,M+=U.value.length;j--,L=r.slice(C,M),x.index-=C}else if(x=u(pe,0,L,ue),!x)continue;var G=x.index,q=x[0],re=L.slice(0,G),ge=L.slice(G+q.length),ie=C+L.length;p&&ie>p.reach&&(p.reach=ie);var W=A.prev;re&&(W=I(i,W,re),C+=re.length),w(i,W,j);var Ke=new l(h,R?n.tokenize(q,R):q,Ve,q);if(A=I(i,W,Ke),ge&&I(i,A,ge),j>1){var ae={cause:h+`,`+S,reach:ie};m(r,i,o,A.prev,C,ae),p&&ae.reach>p.reach&&(p.reach=ae.reach)}}}}}}function y(){var r={value:null,prev:null,next:null},i={value:null,prev:r,next:null};r.next=i,this.head=r,this.tail=i,this.length=0}function I(r,i,o){var s=i.next,c={value:o,prev:i,next:s};return i.next=c,s.prev=c,r.length++,c}function w(r,i,o){for(var s=i.next,c=0;c<o&&s!==r.tail;c++)s=s.next;i.next=s,s.prev=i,r.length-=c}function T(r){for(var i=[],o=r.head.next;o!==r.tail;)i.push(o.value),o=o.next;return i}if(!a.document)return a.addEventListener&&(n.disableWorkerMessageHandler||a.addEventListener(`message`,function(r){var i=JSON.parse(r.data),o=i.language,s=i.code,c=i.immediateClose;a.postMessage(n.highlight(s,n.languages[o],o)),c&&a.close()},!1)),n;var b=n.util.currentScript();b&&(n.filename=b.src,b.hasAttribute(`data-manual`)&&(n.manual=!0));function v(){n.manual||n.highlightAll()}if(!n.manual){var _=document.readyState;_===`loading`||_===`interactive`&&b&&b.defer?document.addEventListener(`DOMContentLoaded`,v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return n})(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});typeof Q<`u`&&Q.exports&&(Q.exports=d);typeof global<`u`&&(global.Prism=d);d.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>
5\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]};d.languages.markup.tag.inside[`attr-value`].inside.entity=d.languages.markup.entity;d.languages.markup.doctype.inside[`internal-subset`].inside=d.languages.markup;d.hooks.add(`wrap`,function(a){a.type===`entity`&&(a.attributes.title=a.content.replace(/&/,`&`))});Object.defineProperty(d.languages.markup.tag,"addInlined",{value:function(f,e){var t={};t[`language-`+e]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:d.languages[e]},t.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:t}};n[`language-`+e]={pattern:/[\s\S]+/,inside:d.languages[e]};var l={};l[f]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return f}),`i`),lookbehind:!0,greedy:!0,inside:n},d.languages.insertBefore(`markup`,`cdata`,l)}});Object.defineProperty(d.languages.markup.tag,"addAttribute",{value:function(a,f){d.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(/(^|["'\s])/.source+`(?:`+a+`)`+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[f,`language-`+f],inside:d.languages[f]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}});d.languages.html=d.languages.markup;d.languages.mathml=d.languages.markup;d.languages.svg=d.languages.markup;d.languages.xml=d.languages.extend(`markup`,{});d.languages.ssml=d.languages.xml;d.languages.atom=d.languages.xml;d.languages.rss=d.languages.xml;(function(a){var f=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;a.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:`+/[^;{\s"']|\s+(?!\s)/.source+`|`+f.source+`)*?`+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+f.source+`|`+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+`)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+f.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+f.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:f,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},a.languages.css.atrule.inside.rest=a.languages.css;var e=a.languages.markup;e&&(e.tag.addInlined(`style`,`css`),e.tag.addAttribute(`style`,`css`))})(d);d.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};d.languages.javascript=d.languages.extend(`clike`,{"class-name":[d.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+`(?:`+(/NaN|Infinity/.source+`|`+/0[bB][01]+(?:_[01]+)*n?/.source+`|`+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+`|`+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+`|`+/\d+(?:_\d+)*n/.source+`|`+/(?:\d+(?:_\d+)*(?
5:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+`)`+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});d.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;d.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+`(?:`+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+`|`+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+`)`+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:d.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:d.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:d.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:d.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:d.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});d.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:d.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}});d.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}});d.languages.markup&&(d.languages.markup.tag.addInlined(`script`,`javascript`),d.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,`javascript`));d.languages.js=d.languages.javascript;(function(){if(typeof d>`u`||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var a=`Loadingâ¦`,f=function(b,v){return`â Error `+b+` while fetching file: `+v},e=`â Error: File does not exist or is empty`,t={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},n=`data-src-status`,l=`loading`,u=`loaded`,m=`failed`,y=`pre[data-src]:not([`+n+`="`+u+`"]):not([`+n+`="`+l+`"])`;function I(b,v,_){var r=new XMLHttpRequest;r.open(`GET`,b,!0),r.onreadystatechange=function(){r.readyState==4&&(r.status<400&&r.responseText?v(r.responseText):r.status>=400?_(f(r.status,r.statusText)):_(e))},r.send(null)}function w(b){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(b||``);if(v){var _=Number(v[1]),r=v[2],i=v[3];return r?i?[_,Number(i)]:[_,void 0]:[_,_]}}d.hooks.add(`before-highlightall`,function(b){b.selector+=`, `+y}),d.hooks.add(`before-sanity-check`,function(b){var v=b.element;if(v.matches(y)){b.code=``,v.setAttribute(n,l);var _=v.appendChild(document.createElement(`CODE`));_.textContent=a;var r=v.getAttribute(`data-src`),i=b.language;if(i===`none`){var o=(/\.(\w+)$/.exec(r)||[,`none`])[1];
5i=t[o]||o}d.util.setLanguage(_,i),d.util.setLanguage(v,i);var s=d.plugins.autoloader;s&&s.loadLanguages(i),I(r,function(c){v.setAttribute(n,u);var p=w(v.getAttribute(`data-range`));if(p){var h=c.split(/\r\n?|\n/g),g=p[0],S=p[1]==null?h.length:p[1];g<0&&(g+=h.length),g=Math.max(0,Math.min(g-1,h.length)),S<0&&(S+=h.length),S=Math.max(0,Math.min(S,h.length)),c=h.slice(g,S).join(` 6`),v.hasAttribute(`data-start`)||v.setAttribute(`data-start`,String(g+1))}_.textContent=c,d.highlightElement(_)},function(c){v.setAttribute(n,m),_.textContent=c})}}),d.plugins.fileHighlight={highlight:function(v){for(var _=(v||document).querySelectorAll(y),r=0,i;i=_[r++];)d.highlightElement(i)}};var T=!1;d.fileHighlight=function(){T||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),T=!0),d.plugins.fileHighlight.highlight.apply(this,arguments)}})()});var ze$1=aR(le());aR(le());(function(a){a.languages.typescript=a.languages.extend(`javascript`,{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),a.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete a.languages.typescript.parameter,delete a.languages.typescript[`literal-property`];var f=a.languages.extend(`typescript`,{});delete f[`class-name`],a.languages.typescript[`class-name`].inside=f,a.languages.insertBefore(`typescript`,`function`,{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:`operator`},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:f}}}}),a.languages.ts=a.languages.typescript})(Prism);Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:`string`,inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:`function`},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:`class-name`},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/};Prism.hooks.add(`after-tokenize`,function(f){if(f.language!==`graphql`)return;var e=f.tokens.filter(function(r){return typeof r!=`string`&&r.type!==`comment`&&r.type!==`scalar`}),t=0;function n(r){return e[t+r]}function l(r,i){i=i||0;for(var o=0;o<r.length;o++){var s=n(o+i);if(!s||s.type!==r[o])return!1}return!0}function u(r,i){for(var o=1,s=t;s<e.length;s++){var c=e[s],p=c.content;if(c.type===`punctuation`&&typeof p==`string`){if(r.test(p))o++;else if(i.test(p)&&(o--,o===0))return s}}return-1}function m(r,i){var o=r.alias;o?Array.isArray(o)||(r.alias=o=[o]):r.alias=o=[],o.push(i)}for(;t<e.length;){var y=e[t++];if(y.type===`keyword`&&y.content===`mutation`){var I=[];if(l([`definition-mutation`,`punctuation`])&&n(1).content===`(`){t+=2;var w=u(/^\($/,/^\)$/);if(w===-1)continue;for(;t<w;t++){var T=n(0);T.type===`variable`&&(m(T,`variable-input`),I.push(T.content))}t=w+1}if(l([`punctuation`,`property-query`])&&n(0).content===`{`&&(t++,m(n(0),`property-mutation`),I.length>0)){var b=u(/^\{$/,/^\}$/);if(b===-1)continue;for(var v=t;v<b;v++){var _=e[v];_.type===`variable`&&I.indexOf(_.content)>=0&&m(_,`variable-input`)}}}}});Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}};Prism.languages.webmanifest=Prism.languages.json;(function(a){var f=/[*&][^\s[\]{},]+/,e=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t=`(?:`+e.source+`(?:[ ]+`+f.source+`)?|`+f.source+`(?:[ ]+`+e.source+`)?)`,n=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function u(m,y){y=(y||``).replace(/m/g,``)+`m`;var I=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>
6)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return t}).replace(/<<value>>/g,function(){return m});return RegExp(I,y)}a.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return t})),lookbehind:!0,alias:`string`},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return t}).replace(/<<key>>/g,function(){return`(?:`+n+`|`+l+`)`})),lookbehind:!0,greedy:!0,alias:`atrule`},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:`important`},datetime:{pattern:u(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:`number`},boolean:{pattern:u(/false|true/.source,`i`),lookbehind:!0,alias:`important`},null:{pattern:u(/null|~/.source,`i`),lookbehind:!0,alias:`important`},string:{pattern:u(l),lookbehind:!0,greedy:!0},number:{pattern:u(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,`i`),lookbehind:!0},tag:e,important:f,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},a.languages.yml=a.languages.yaml})(Prism);(function(a){var f=`\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_
6CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b`,e={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:`punctuation`,inside:null},t={bash:e,environment:{pattern:RegExp(`\\$`+f),alias:`constant`},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp(`(\\{)`+f),lookbehind:!0,alias:`constant`}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};a.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:`important`},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:`function`},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:`function`}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:`variable`,lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp(`(^|[\\s;|&]|[<>]\\()`+f),lookbehind:!0,alias:`constant`}},alias:`variable`,lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:`variable`,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:e}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:t.entity}}],environment:{pattern:RegExp(`\\$?`+f),alias:`constant`},variable:t.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:`class-name`},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:`important`},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>
6&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:`important`}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},e.inside=a.languages.bash;for(var n=[`comment`,`function-name`,`for-or-select`,`assign-left`,`parameter`,`string`,`environment`,`function`,`keyword`,`builtin`,`boolean`,`file-descriptor`,`operator`,`punctuation`,`number`],l=t.variable[1].inside,u=0;u<n.length;u++)l[n[u]]=a.languages.bash[n[u]];a.languages.sh=a.languages.bash,a.languages.shell=a.languages.bash})(Prism);var ce=160;function et(a){if(a.length<=ce)return a;let f=``,e=a;for(;e;){let t=e.match(/^.*?[.!?](?=\s|$)/)?.[0]??e,n=f?`${f} ${t}`:t;if(n.length>ce)break;f=n,e=e.slice(t.length).trimStart()}return f||a.slice(0,ce-1).replace(/\s+\S*$/,``)+`â¦`}var Et=(()=>{class a{applicationRef;el;isHljsInitialized=!1;metaService=p(s8);constructor(e,t){this.applicationRef=e,this.el=t}get nativeElement(){return this.el.nativeElement}get isMarkupReady(){return this.isHljsInitialized}ngAfterViewInit(){this.updateDescription()}ngAfterViewChecked(){this.initHljs()}updateDescription(){let t=this.nativeElement.querySelector(`.content-inner > p`)?.textContent?.replace(/\s+/g,` `).trim();if(!t)return;let n=et(t);this.metaService.updateTag({name:`description`,content:n}),this.metaService.updateTag({property:`og:description`,content:n}),this.metaService.updateTag({name:`twitter:description`,content:n})}initHljs(){if(this.isHljsInitialized||!this.el)return;let e=this.el.nativeElement.querySelectorAll(`code`);[].forEach.call(e,t=>{t.className&&(ze$1.highlightElement(t),this.isHljsInitialized=!0)}),setTimeout(()=>this.applicationRef.tick(),1e3)}static ɵfac=function(t){return new(t||a)(Ce(kt$1),Ce(xt))};static ɵcmp=Qd({type:a,selectors:[[`app-base-page`]],decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:1})}return a})();var wt$1=(()=>{class a{elementRef;renderer;router;id;constructor(e,t,n){this.elementRef=e,this.renderer=t,this.router=n}ngAfterViewInit(){let e=this.id==null?this.getImplicitId():this.id;this.id??this.renderer.setProperty(this.elementRef.nativeElement,`id`,e);let t=this.renderer.createElement(`a`);this.renderer.setProperty(t,`href`,`${this.router.url.split(`#`)[0]}#${e}`);let n=this.renderer.createText(`#`);this.renderer.appendChild(t,n),this.renderer.appendChild(this.elementRef.nativeElement,t)}getImplicitId(){return this.elementRef.nativeElement.innerText.replace(/\s/g,`-`).toLocaleLowerCase()}static ɵfac=function(t){return new(t||a)(Ce(xt),Ce(Mn$1),Ce(Et$1))};static ɵdir=fr$1({type:a,selectors:[[``,`appAnchor`,``]],inputs:{id:`id`}})}return a})();var te;function tt$1(){if(te===void 0&&(te=null,typeof window<`u`)){let a=window;if(a.trustedTypes!==void 0)try{te=a.trustedTypes.createPolicy(`angular#components`,{createHTML:f=>f})}catch(f){console.error(f)}}return te}function z(a){return tt$1()?.createHTML(a)||a}function Ue$1(a){return Error(`Unable to find icon with the name "${a}"`)}function nt$1(){return Error(`Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.`)}function Be(a){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${a}".`)}function je(a){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${a}".`)}var k=class{url;svgText;options;svgElement=null;constructor(f,e,t){this.url=f,this.svgText=e,this.options=t}};var qe=(()=>{class a{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=[`material-icons`,`mat-ligature-font`];constructor(e,t,n,l){this._httpClient=e,this._sanitizer=t,this._errorHandler=l,this._document=n}addSvgIcon(e,t,n){return this.addSvgIconInNamespace(``,e,t,n)}addSvgIconLiteral(e,t,n){return this.addSvgIconLiteralInNamespace(``,e,t,n)}addSvgIconInNamespace(e,t,n,l){return this._addSvgIconConfig(e,t,new k(n,null,l))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,t,n,l){let u=this._sanitizer.sanitize(J.HTML,n);if(!u)throw je(n);let m=z(u);return this._addSvgIconConfig(e,t,new k(``,m,l))}addSvgIconSet(e,t){return this.addSvgIconSetInNamespace(``,e,t)}addSvgIconSetLiteral(e,t){return this.addSvgIconSetLiteralInNamespace(``,e,t)}addSvgIconSetInNamespace(e,t,n){return this._addSvgIconSetConfig(e,new k(t,null,n))}addSvgIconSetLiteralInNamespace(e,t,n){let l=this._sanitizer.sanitize(J.HTML,t);if(!l)throw je(t);let u=z(l);return this._addSvgIconSetConfig(e,new k(``,u,n))}
6registerFontClassAlias(e,t=e){return this._fontCssClassesByAlias.set(e,t),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let t=this._sanitizer.sanitize(J.RESOURCE_URL,e);if(!t)throw Be(e);let n=this._cachedIconsByUrl.get(t);return n?_(ne(n)):this._loadSvgIconFromConfig(new k(e,null)).pipe(Ye$1(l=>this._cachedIconsByUrl.set(t,l)),q(l=>ne(l)))}getNamedSvgIcon(e,t=``){let n=Ge$1(t,e),l=this._svgIconConfigs.get(n);if(l)return this._getSvgFromConfig(l);if(l=this._getIconConfigFromResolvers(t,e),l)return this._svgIconConfigs.set(n,l),this._getSvgFromConfig(l);let u=this._iconSetConfigs.get(t);return u?this._getSvgFromIconSetConfigs(e,u):Eu(Ue$1(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?_(ne(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(q(t=>ne(t)))}_getSvgFromIconSetConfigs(e,t){let n=this._extractIconWithNameFromAnySet(e,t);if(n)return _(n);return zE(t.filter(u=>!u.svgText).map(u=>this._loadSvgIconSetFromConfig(u).pipe(Wn(m=>{let I=`Loading icon set URL: ${this._sanitizer.sanitize(J.RESOURCE_URL,u.url)} failed: ${m.message}`;return this._errorHandler.handleError(new Error(I)),_(null)})))).pipe(q(()=>{let u=this._extractIconWithNameFromAnySet(e,t);if(!u)throw Ue$1(e);return u}))}_extractIconWithNameFromAnySet(e,t){for(let n=t.length-1;n>=0;n--){let l=t[n];if(l.svgText&&l.svgText.toString().indexOf(e)>-1){let u=this._svgElementFromConfig(l),m=this._extractSvgIconFromSet(u,e,l.options);if(m)return m}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(Ye$1(t=>e.svgText=t),q(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?_(null):this._fetchIcon(e).pipe(Ye$1(t=>e.svgText=t))}_extractSvgIconFromSet(e,t,n){let l=e.querySelector(`[id="${t}"]`);if(!l)return null;let u=l.cloneNode(!0);if(u.removeAttribute(`id`),u.nodeName.toLowerCase()===`svg`)return this._setSvgAttributes(u,n);if(u.nodeName.toLowerCase()===`symbol`)return this._setSvgAttributes(this._toSvgElement(u),n);let m=this._svgElementFromString(z(`<svg></svg>`));return m.appendChild(u),this._setSvgAttributes(m,n)}_svgElementFromString(e){let t=this._document.createElement(`DIV`);t.innerHTML=e;let n=t.querySelector(`svg`);if(!n)throw Error(`<svg> tag not found`);return n}_toSvgElement(e){let t=this._svgElementFromString(z(`<svg></svg>`)),n=e.attributes;for(let l=0;l<n.length;l++){let{name:u,value:m}=n[l];u!==`id`&&t.setAttribute(u,m)}for(let l=0;l<e.childNodes.length;l++)e.childNodes[l].nodeType===this._document.ELEMENT_NODE&&t.appendChild(e.childNodes[l].cloneNode(!0));return t}_setSvgAttributes(e,t){return e.setAttribute(`fit`,``),e.setAttribute(`height`,`100%`),e.setAttribute(`width`,`100%`),e.setAttribute(`preserveAspectRatio`,`xMidYMid meet`),e.setAttribute(`focu
6sable`,`false`),t&&t.viewBox&&e.setAttribute(`viewBox`,t.viewBox),e}_fetchIcon(e){let{url:t,options:n}=e,l=n?.withCredentials??!1;if(!this._httpClient)throw nt$1();if(t==null)throw Error(`Cannot fetch icon from URL "${t}".`);let u=this._sanitizer.sanitize(J.RESOURCE_URL,t);if(!u)throw Be(t);let m=this._inProgressUrlFetches.get(u);if(m)return m;let y=this._httpClient.get(u,{responseType:`text`,withCredentials:l}).pipe(q(I=>z(I)),Mr$1(()=>this._inProgressUrlFetches.delete(u)),ew());return this._inProgressUrlFetches.set(u,y),y}_addSvgIconConfig(e,t,n){return this._svgIconConfigs.set(Ge$1(e,t),n),this}_addSvgIconSetConfig(e,t){let n=this._iconSetConfigs.get(e);return n?n.push(t):this._iconSetConfigs.set(e,[t]),this}_svgElementFromConfig(e){if(!e.svgElement){let t=this._svgElementFromString(e.svgText);this._setSvgAttributes(t,e.options),e.svgElement=t}return e.svgElement}_getIconConfigFromResolvers(e,t){for(let n=0;n<this._resolvers.length;n++){let l=this._resolvers[n](t,e);if(l)return rt$1(l)?new k(l.url,null,l.options):new k(l,null)}}static ɵfac=function(t){return new(t||a)(E(Uy,8),E(mM),E(Z,8),E(st$1))};static ɵprov=b({token:a,factory:a.ɵfac,providedIn:`root`})}return a})();function ne(a){return a.cloneNode(!0)}function Ge$1(a,f){return a+`:`+f}function rt$1(a){return!!(a.url&&a.options)}var it$1=[`*`];var at$1=new D(`MAT_ICON_DEFAULT_OPTIONS`);var ot$1=new D(`mat-icon-location`,{providedIn:`root`,factory:()=>{let a=p(Z),f=a?a.location:null;return{getPathname:()=>f?f.pathname+f.search:``}}});var We$1=[`clip-path`,`color-profile`,`src`,`cursor`,`fill`,`filter`,`marker`,`marker-start`,`marker-mid`,`marker-end`,`mask`,`stroke`];var st=We$1.map(a=>`[${a}]`).join(`, `);var lt=/^url\(['"]?#(.*?)['"]?\)$/;var Ze=(()=>{class a{_elementRef=p(xt);_iconRegistry=p(qe);_location=p(ot$1);_errorHandler=p(st$1);_defaultColor;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(e){let t=this._cleanupFontValue(e);t!==this._fontSet&&(this._fontSet=t,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let t=this._cleanupFontValue(e);t!==this._fontIcon&&(this._fontIcon=t,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=ie.EMPTY;constructor(){let e=p(new Qa$1(`aria-hidden`),{optional:!0}),t=p(at$1,{optional:!0});t&&(t.color&&(this.color=this._defaultColor=t.color),t.fontSet&&(this.fontSet=t.fontSet)),e||this._elementRef.nativeElement.setAttribute(`aria-hidden`,`true`)}_splitIconName(e){if(!e)return[``,``];let t=e.split(`:`);switch(t.length){case 1:return[``,t[0]];case 2:return t;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let t=this._location.getPathname();this._previousPath=t,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(t),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,t=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();t--;){let n=e.childNodes[t];(n.nodeType!==1||n.nodeName.toLowerCase()===`svg`)&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,t=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>e.classList.remove(n)),t.forEach(n=>e.classList.add(n)),this._previousFontSetClass=t,this.fontIcon!==this._previousFontIconClass&&!t.includes(`mat-ligature-font`)&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e==`string`?e.trim().split(` `)[0]:e}_prependPathToReferences(e){let t=this._elementsWithExternalReferences;t&&t.forEach((n,l)=>
6{n.forEach(u=>{l.setAttribute(u.name,`url('${e}#${u.value}')`)})})}_cacheChildrenWithExternalReferences(e){let t=e.querySelectorAll(st),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let l=0;l<t.length;l++)We$1.forEach(u=>{let m=t[l],y=m.getAttribute(u),I=y?y.match(lt):null;if(I){let w=n.get(m);w||(w=[],n.set(m,w)),w.push({name:u,value:I[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[t,n]=this._splitIconName(e);t&&(this._svgNamespace=t),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,t).pipe(zt$1(1)).subscribe(l=>this._setSvgElement(l),l=>{let u=`Error retrieving icon ${t}:${n}! ${l.message}`;this._errorHandler.handleError(new Error(u))})}}static ɵfac=function(t){return new(t||a)};static ɵcmp=Qd({type:a,selectors:[[`mat-icon`]],hostAttrs:[`role`,`img`,1,`mat-icon`,`notranslate`],hostVars:10,hostBindings:function(t,n){t&2&&(Ga$1(`data-mat-icon-type`,n._usingFontIcon()?`font`:`svg`)(`data-mat-icon-name`,n._svgName||n.fontIcon)(`data-mat-icon-namespace`,n._svgNamespace||n.fontSet)(`fontIcon`,n._usingFontIcon()?n.fontIcon:null),rT(n.color?`mat-`+n.color:``),kv(`mat-icon-inline`,n.inline)(`mat-icon-no-color`,n.color!==`primary`&&n.color!==`accent`&&n.color!==`warn`))},inputs:{color:`color`,inline:[2,`inline`,`inline`,Di$1],svgIcon:`svgIcon`,fontSet:`fontSet`,fontIcon:`fontIcon`},exportAs:[`matIcon`],ngContentSelectors:it$1,decls:1,vars:0,template:function(t,n){t&1&&($S(),zS(0))},styles:[`mat-icon, mat-icon.mat-primary, mat-icon.mat-accent, mat-icon.mat-warn { 7 color: var(--%NS%mat-icon-color, inherit); 8} 9 10.mat-icon { 11 -webkit-user-select: none; 12 user-select: none; 13 background-repeat: no-repeat; 14 display: inline-block; 15 fill: currentColor; 16 height: 24px; 17 width: 24px; 18 overflow: hidden; 19} 20.mat-icon.mat-icon-inline { 21 font-size: inherit; 22 height: inherit; 23 line-height: inherit; 24 width: inherit; 25} 26.mat-icon.mat-ligature-font[fontIcon]::before { 27 content: attr(fontIcon); 28} 29 30[dir=rtl] .mat-icon-rtl-mirror { 31 transform: scale(-1, 1); 32} 33 34.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon, 35.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon { 36 display: block; 37} 38.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon, 39.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon { 40 margin: auto; 41} 42`],encapsulation:2})}return a})();var ct$1=[`*`];var en$1=(()=>{class a{elRef=p(xt);copied=!1;cdr=p(Jr$1);revertIconTimeout=null;onCopy(){let e=this.elRef.nativeElement.querySelector(`pre:not(.hide)`);e&&(navigator.clipboard.writeText(e.firstChild.textContent),this.copied=!0,this.cdr.detectChanges(),this.revertIconTimeout=setTimeout(()=>{this.copied=!1,this.cdr.detectChanges(),this.revertIconTimeout=null},2e3))}ngOnDestroy(){this.revertIconTimeout&&clearTimeout(this.revertIconTimeout)}static ɵfac=function(t){return new(t||a)};static ɵcmp=Qd({type:a,selectors:[[`app-copy-button`]],ngContentSelectors:ct$1,decls:4,vars:3,consts:[[1,`clipboard`,3,`click`]],template:function(t,n){t&1&&($S(),Ra(0,`button`,0),Wa$1(`click`,function(){return n.onCopy()}),Ra(1,`mat-icon`),gT(2),rf()(),zS(3)),t&2&&(kv(`copied`,n.copied),LC(2),Bv(n.copied?`check`:`content_copy`))},dependencies:[Ze],styles:[`[_nghost-%COMP%]{display:block;position:relative}.with-heading[_nghost-%COMP%] .clipboard[_ngcontent-%COMP%]{top:65px}[_nghost-%COMP%] .clipboard[_ngcontent-%COMP%]{color:#dfdfdf;cursor:pointer;background:transparent;border:none;padding:10px;position:absolute;top:20px;right:10px;z-index:10;opacity:.7}[_nghost-%COMP%] .clipboard[_ngcontent-%COMP%]:hover:not(.copied){opacity:1}[_nghost-%COMP%] .clipboard[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}`],changeDetection:1})}return a})();var wt={production:!0,algoliaApiKey:`6d1869890dab96592b191e63a8deb5b5`};var A=(function(o){return o[o.State=0]=`State`,o[o.Transition=1]=`Transition`,o[o.Sequence=2]=`Sequence`,o[o.Group=3]=`Group`,o[o.Animate=4]=`Animate`,o[o.Keyframes=5]=`Keyframes`,o[o.Style=6]=`Style`,o[o.Trigger=7]=`Trigger`,o[o.Reference=8]=`Reference`,o[o.AnimateChild=9]=`AnimateChild`,o[o.AnimateRef=10]=`AnimateRef`,o[o.Query=11]=`Query`,o[o.Stagger=12]=`Stagger`,o})(A||{});var ue=`*`;function $t(o,r){return{type:A.Trigger,name:o,definitions:r,options:{}}}function _t(o,r=null){return{type:A.Animate,styles:r,timings:o}}function vi(o,r=null){return{type:A.Sequence,steps:o,options:r}}function Ee(o){return{type:A.Style,styles:o,offset:null}}function Xt(o,r,i){return{type:A.State,name:o,styles:r,options:i}}function Ct(o,r,i=null){return{type:A.Transition,expr:o,animation:r,options:i}}var Me=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;
vendor: 32,662 bytes, line 42
42constructor(r=0,i=0){this.totalTime=r+i}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(r=>r()),this._onDoneFns=[])}onStart(r){this._originalOnStartFns.push(r),this._onStartFns.push(r)}onDone(r){this._originalOnDoneFns.push(r),this._onDoneFns.push(r)}onDestroy(r){this._onDestroyFns.push(r)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(r=>r()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(r=>r()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(r){this._position=this.totalTime?r*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(r){let i=r==`start`?this._onStartFns:this._onDoneFns;i.forEach(a=>a()),i.length=0}};var Ge=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(r){this.players=r;let i=0,a=0,s=0,l=this.players.length;l==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(d=>{d.onDone(()=>{++i==l&&this._onFinish()}),d.onDestroy(()=>{++a==l&&this._onDestroy()}),d.onStart(()=>{++s==l&&this._onStart()})}),this.totalTime=this.players.reduce((d,m)=>Math.max(d,m.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(r=>r()),this._onDoneFns=[])}init(){this.players.forEach(r=>r.init())}onStart(r){this._onStartFns.push(r)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(r=>r()),this._onStartFns=[])}onDone(r){this._onDoneFns.push(r)}onDestroy(r){this._onDestroyFns.push(r)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(r=>r.play())}pause(){this.players.forEach(r=>r.pause())}restart(){this.players.forEach(r=>r.restart())}finish(){this._onFinish(),this.players.forEach(r=>r.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(r=>r.destroy()),this._onDestroyFns.forEach(r=>r()),this._onDestroyFns=[])}reset(){this.players.forEach(r=>r.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(r){let i=r*this.totalTime;this.players.forEach(a=>{let s=a.totalTime?Math.min(1,i/a.totalTime):1;a.setPosition(s)})}getPosition(){let r=this.players.reduce((i,a)=>i===null||a.totalTime>i.totalTime?a:i,null);return r!=null?r.getPosition():0}beforeDestroy(){this.players.forEach(r=>{r.beforeDestroy&&r.beforeDestroy()})}triggerCallback(r){let i=r==`start`?this._onStartFns:this._onDoneFns;i.forEach(a=>a()),i.length=0}};var tt=`!`;function wi(o){return new v(3e3,!1)}function da(){return new v(3100,!1)}function ca(){return new v(3101,!1)}function ma(o){return new v(3001,!1)}function pa(o){return new v(3003,!1)}function ha(o){return new v(3004,!1)}function Ci(o,r){return new v(3005,!1)}function ki(){return new v(3006,!1)}function Pi(){return new v(3007,!1)}function Ti(o,r){return new v(3008,!1)}function Mi(o){return new v(3002,!1)}function Ai(o,r,i,a,s){return new v(3010,!1)}function Oi(){return new v(3011,!1)}function Ni(){return new v(3012,!1)}function Ii(){return new v(3200,!1)}function ji(){return new v(3202,!1)}function Ri(){return new v(3013,!1)}function Di(o){return new v(3014,!1)}function zi(o){return new v(3015,!1)}function Fi(o){return new v(3016,!1)}function qi(o,r){return new v(3404,!1)}function ua(o){return new v(3502,!1)}function Li(o){return new v(3503,!1)}function Bi(){return new v(3300,!1)}function Hi(o){return new v(3504,!1)}function Ji(o){return new v(3301,!1)}function Gi(o,r){return new v(3302,!1)}function Ui(o){return new v(3303,!1)}function Wi(o,r){return new v(3400,!1)}function Yi(o){return new v(3401,!1)}function Vi(o){return new v(3402,!1)}function Ki(o,r){return new v(3505,!1)}function Ne(o){switch(o.length){case 0:return new Me;case 1:return o[0];default:return new Ge(o)}}function nn(o,r,i=new Map,a=new Map){let s=[],l=[],d=-1,m=null;if(r.forEach(h=>{let u=h.get(`offset`),b=u==d,S=b&&m||new Map;h.forEach((k,C)=>{let w=C,P=k;if(C!==`offset`)switch(w=o.normalizePropertyName(w,s),P){case tt:P=i.get(C);break;case ue:P=a.get(C);break;default:P=o.normalizeStyleValue(C,w,P,s);break}S.set(w,P)}),b||l.push(S),m=S,d=u}),s.length)throw ua(s);return l}function kt(o,r,i,a){switch(r){case`start`:o.onStart(()=>a(i&&Zt(i,`start`,o)));break;case`done`:o.onDone(()=>a(i&&Zt(i,`done`,o)));break;case`destroy`:o.onDestroy(()=>a(i&&Zt(i,`destroy`,o)));break}}function Zt(o,r,i){let a=i.totalTime,s=!!i.disabled,l=Pt(o.element,o.triggerName,o.fromState,o.toState,r||o.phaseName,a??o.totalTime,s),d=o._data;return d!=null&&(l._data=d),l}function Pt(o,r,i,a,s=``,l=0,d){return{element:o,triggerName:r,fromState:i,toState:a,phaseName:s,totalTime:l,disabled:!!d}}function oe(o,r,i){let a=o.get(r);return a||o.set(r,a=i),a}function rn(o){let r=o.indexOf(`:`);return[o.substring(1,r),o.slice(r+1)]}var fa=typeof document>`u`?null:document.documentElement;function Tt(o){let r=o.parentNode||o.host||null;return r===fa?null:r}function xa(o){return o.substring(1,6)==`ebkit`}var Ue=null;var _i=!1;function Qi(o){Ue||(Ue=ga()||{},_i=Ue.style?`WebkitAppearance`in Ue.style:!1);let r=!0;return Ue.style&&!xa(o)&&(r=o in Ue.style,!r&&_i&&(r=`Webkit`+o.charAt(0).toUpperCase()+o.slice(1)in Ue.style)),r}function ga(){return typeof document<`u`?document.body:null}function an(o,r){for(;r;){if(r===o)return!0;r=Tt(r)}return!1}function on(o,r,i){if(i)return Array.from(o.querySelectorAll(r));let a=o.querySelector(r);return a?[a]:[]}var ba=1e3;var sn=`{{`;var Sa=`}}`;var ln=`ng-enter`;var Mt=`ng-leave`;var dt=`ng-trigger`;var ct=`.ng-trigger`;var dn=`ng-animating`;var At=`.ng-animating`;function Ae(o){if(typeof o==`number`)return o;let r=o.match(/^(-?[\.\d]+)(m?s)/);return!r||r.length<2?0:en(parseFloat(r[1]),r[2])}function en(o,r){return r===`s`?o*ba:o}function mt(o,r,i){return typeof o==`object`&&o!==null&&Object.hasOwn(o,`duration`)?o:ya(o,r,i)}var Ea=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function ya(o,r,i){let a,s=0,l=``;if(typeof o==`string`){let d=o.match(Ea);if(d===null)return r.push(wi(o)),{duration:0,delay:0,easing:``};a=en(parseFloat(d[1]),d[2]);let m=d[3];m!=null&&(s=en(parseFloat(m),d[4]));let h=d[5];h&&(l=h)}else a=o;if(!i){let d=!1,m=r.length;a<0&&(r.push(da()),d=!0),s<0&&(r.push(ca()),d=!0),d&&r.splice(m,0,wi(o))}return{duration:a,delay:s,easing:l}}function $i(o){return o.length?o[0]instanceof Map?o:o.map(r=>new Map(Object.entries(r))):[]}function ye(o,r,i){r.forEach((a,s)=>{let l=Ot(s);i&&!i.has(s)&&i.set(s,o.style[l]),o.style[l]=a})}function ze(o,r){r.forEach((i,a)=>{let s=Ot(a);o.style[s]=``})}function nt(o){return Array.isArray(o)?o.length==1?o[0]:vi(o):o}function Xi(o,r,i){let a=r.params||{},s=cn(o);s.length&&s.forEach(l=>{Object.hasOwn(a,l)||i.push(ma(l))})}var tn=new RegExp(`${sn}\\s*(.+?)\\s*${Sa}`,`g`);function cn(o){let r=[];if(typeof o==`string`){let i;for(;i=tn.exec(o);)r.push(i[1]);tn.lastIndex=0}return r}function it(o,r,i){let a=`${o}`,s=a.replace(tn,(l,d)=>{let m=r[d];return m??(i.push(pa(d)),m=``),m.toString()});return s==a?o:s}var va=/-+([a-z0-9])/g;function Ot(o){return o.replace(va,(...r)=>r[1].toUpperCase())}function Zi(o,r){return o===0||r===0}function er(o,r,i){if(i.size&&r.length){let a=r[0],s=[];if(i.forEach((l,d)=>{a.has(d)||s.push(d),a.set(d,l)}),s.length)for(let l=1;l<r.length;l++){let d=r[l];s.forEach(m=>d.set(m,Nt(o,m)))}}return r}function se(o,r,i){switch(r.type){case A.Trigger:return o.visitTrigger(r,i);case A.State:return o.visitState(r,i);case A.Transition:return o.visitTransition(r,i);case A.Sequence:return o.visitSequence(r,i);case A.Group:return o.visitGroup(r,i);case A.Animate:return o.visitAnimate(r,i);case A.Keyframes:return o.visitKeyframes(r,i);case A.Style:return o.visitStyle(r,i);case A.Reference:return o.visitReference(r,i);case A.AnimateChild:return o.visitAnimateChild(r,i);case A.AnimateRef:return o.visitAnimateRef(r,i);case A.Query:return o.visitQuery(r,i);case A.Stagger:return o.visitStagger(r,i);default:throw ha(r.type)}}function Nt(o,r){return window.getComputedStyle(o)[r]}var Pn=(()=>{class o{validateStyleProperty(i){return Qi(i)}containsElement(i,a){return an(i,a)}getParentElement(i){return Tt(i)}query(i,a,s){return on(i,a,s)}computeStyle(i,a,s){return s||``}animate(i,a,s,l,d,m=[],h){return new Me(s,l)}static ɵfac=function(a){return new(a||o)};static ɵprov=b({token:o,factory:o.ɵfac})}return o})();var Ye=class{static NOOP=new Pn};var Ve=class{};var wa=new Set([`width`,`height`,`minWidth`,`minHeight`,`maxWidth`,`maxHeight`,`left`,`top`,`bottom`,`right`,`fontSize`,`outlineWidth`,`outlineOffset`,`paddingTop`,`paddingLeft`,`paddingBottom`,`paddingRight`,`marginTop`,`marginLeft`,`marginBottom`,`marginRight`,`borderRadius`,`borderWidth`,`borderTopWidth`,`borderLeftWidth`,`borderRightWidth`,`borderBottomWidth`,`textIndent`,`perspective`]);var zt=class extends Ve{normalizePropertyName(r,i){return Ot(r)}normalizeStyleValue(r,i,a,s){let l=``,d=a.toString().trim();if(wa.has(i)&&a!==0&&a!==`0`)if(typeof a==`number`)l=`px`;else{let m=a.match(/^[+-]?[\d\.]+([a-z]*)$/);m&&m[1].length==0&&s.push(Ci(r,a))}return d+l}};var Ft=`*`;function _a(o,r){let i=[];return typeof o==`string`?o.split(/\s*,\s*/).forEach(a=>Ca(a,i,r)):i.push(o),i}function Ca(o,r,i){if(o[0]==`:`){let h=ka(o,i);if(typeof h==`function`){r.push(h);return}o=h}let a=o.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(a==null||a.length<4)return i.push(zi(o)),r;let s=a[1],l=a[2],d=a[3];r.push(tr(s,d));let m=s==Ft&&d==Ft;l[0]==`<`&&!m&&r.push(tr(d,s))}function ka(o,r){switch(o){case`:enter`:return`void => *`;case`:leave`:return`* => void`;case`:increment`:return(i,a)=>parseFloat(a)>parseFloat(i);case`:decrement`:return(i,a)=>parseFloat(a)<parseFloat(i);default:return r.push(Fi(o)),`* => *`}}var It=new Set([`true`,`1`]);var jt=new Set([`false`,`0`]);function tr(o,r){let i=It.has(o)||jt.has(o),a=It.has(r)||jt.has(r);return(s,l)=>{let d=o==Ft||o==s,m=r==Ft||r==l;return!d&&i&&typeof s==`boolean`&&(d=s?It.has(o):jt.has(o)),!m&&a&&typeof l==`boolean`&&(m=l?It.has(r):jt.has(r)),d&&m}}var mr=`:self`;var Pa=new RegExp(`s*${mr}s*,?`,`g`);function pr(o,r,i,a){return new xn(o).build(r,i,a)}var nr=``;var xn=class{_driver;constructor(r){this._driver=r}build(r,i,a){let s=new gn(i);return this._resetContextStyleTimingState(s),se(this,nt(r),s)}_resetContextStyleTimingState(r){r.currentQuerySelector=nr,r.collectedStyles=new Map,r.collectedStyles.set(nr,new Map),r.currentTime=0}visitTrigger(r,i){let a=i.queryCount=0,s=i.depCount=0,l=[],d=[];return r.name.charAt(0)==`@`&&i.errors.push(ki()),r.definitions.forEach(m=>{if(this._resetContextStyleTimingState(i),m.type==A.State){let h=m,u=h.name;u.toString().split(/\s*,\s*/).forEach(b=>{h.name=b,l.push(this.visitState(h,i))}),h.name=u}else if(m.type==A.Transition){let h=this.visitTransition(m,i);a+=h.queryCount,s+=h.depCount,d.push(h)}else i.errors.push(Pi())}),{type:A.Trigger,name:r.name,states:l,transitions:d,queryCount:a,depCount:s,options:null}}visitState(r,i){let a=this.visitStyle(r.styles,i),s=r.options&&r.options.params||null;if(a.containsDynamicStyles){let l=new Set,d=s||{};a.styles.forEach(m=>{m instanceof Map&&m.forEach(h=>{cn(h).forEach(u=>{Object.hasOwn(d,u)||l.add(u)})})}),l.size&&i.errors.push(Ti(r.name,[...l.values()]))}return{type:A.State,name:r.name,style:a,options:s?{params:s}:null}}visitTransition(r,i){i.queryCount=0,i.depCount=0;let a=se(this,nt(r.animation),i),s=_a(r.expr,i.errors);return{type:A.Transition,matchers:s,animation:a,queryCount:i.queryCount,depCount:i.depCount,options:We(r.options)}}visitSequence(r,i){return{type:A.Sequence,steps:r.steps.map(a=>se(this,a,i)),options:We(r.options)}}visitGroup(r,i){let a=i.currentTime,s=0,l=r.steps.map(d=>{i.currentTime=a;let m=se(this,d,i);return s=Math.max(s,i.currentTime),m});return i.currentTime=s,{type:A.Group,steps:l,options:We(r.options)}}visitAnimate(r,i){let a=Oa(r.timings,i.errors);i.currentAnimateTimings=a;let s,l=r.styles?r.styles:Ee({});if(l.type==A.Keyframes)s=this.visitKeyframes(l,i);else{let d=r.styles,m=!1;if(!d){m=!0;let u={};a.easing&&(u.easing=a.easing),d=Ee(u)}i.currentTime+=a.duration+a.delay;let h=this.visitStyle(d,i);h.isEmptyStep=m,s=h}return i.currentAnimateTimings=null,{type:A.Animate,timings:a,style:s,options:null}}visitStyle(r,i){let a=this._makeStyleAst(r,i);return this._validateStyleAst(a,i),a}_makeStyleAst(r,i){let a=[],s=Array.isArray(r.styles)?r.styles:[r.styles];for(let m of s)typeof m==`string`?m===ue?a.push(m):i.errors.push(Mi(m)):a.push(new Map(Object.entries(m)));let l=!1,d=null;return a.forEach(m=>{if(m instanceof Map&&(m.has(`easing`)&&(d=m.get(`easing`),m.delete(`easing`)),!l)){for(let h of m.values())if(h.toString().indexOf(sn)>=0){l=!0;break}}}),{type:A.Style,styles:a,easing:d,offset:r.offset,containsDynamicStyles:l,options:null}}_validateStyleAst(r,i){let a=i.currentAnimateTimings,s=i.currentTime,l=i.currentTime;a&&l>0&&(l-=a.duration+a.delay),r.styles.forEach(d=>{typeof d!=`string`&&d.forEach((m,h)=>{let u=i.collectedStyles.get(i.currentQuerySelector),b=u.get(h),S=!0;b&&(l!=s&&l>=b.startTime&&s<=b.endTime&&(i.errors.push(Ai(h,b.startTime,b.endTime,l,s)),S=!1),l=b.startTime),S&&u.set(h,{startTime:l,endTime:s}),i.options&&Xi(m,i.options,i.errors)})})}visitKeyframes(r,i){let a={type:A.Keyframes,styles:[],options:null};if(!i.currentAnimateTimings)return i.errors.push(Oi()),a;let s=1,l=0,d=[],m=!1,h=!1,u=0,b=r.steps.map(J=>{let Y=this._makeStyleAst(J,i),Z=Y.offset!=null?Y.offset:Aa(Y.styles),$=0;return Z!=null&&(l++,$=Y.offset=Z),h=h||$<0||$>1,m=m||$<u,u=$,d.push($),Y});h&&i.errors.push(Ni()),m&&i.errors.push(Ii());let S=r.steps.length,k=0;l>0&&l<S?i.errors.push(ji()):l==0&&(k=s/(S-1));let C=S-1,w=i.currentTime,P=i.currentAnimateTimings,F=P.duration;return b.forEach((J,Y)=>{let Z=k>0?Y==C?1:k*Y:d[Y],$=Z*F;i.currentTime=w+P.delay+$,P.duration=$,this._validateStyleAst(J,i),J.offset=Z,a.styles.push(J)}),a}visitReference(r,i){return{type:A.Reference,animation:se(this,nt(r.animation),i),options:We(r.options)}}visitAnimateChild(r,i){return i.depCount++,{type:A.AnimateChild,options:We(r.options)}}visitAnimateRef(r,i){return{type:A.AnimateRef,animation:this.visitReference(r.animation,i),options:We(r.options)}}visitQuery(r,i){let a=i.currentQuerySelector,s=r.options||{};i.queryCount++,i.currentQuery=r;let[l,d]=Ta(r.selector);i.currentQuerySelector=a.length?a+` `+l:l,oe(i.collectedStyles,i.currentQuerySelector,new Map);let m=se(this,nt(r.animation),i);return i.currentQuery=null,i.currentQuerySelector=a,{type:A.Query,selector:l,limit:s.limit||0,optional:!!s.optional,includeSelf:d,animation:m,originalSelector:r.selector,options:We(r.options)}}visitStagger(r,i){i.currentQuery||i.errors.push(Ri());let a=r.timings===`full`?{duration:0,delay:0,easing:`full`}:mt(r.timings,i.errors,!0);return{type:A.Stagger,animation:se(this,nt(r.animation),i),timings:a,options:null}}};function Ta(o){let r=!!o.split(/\s*,\s*/).find(i=>i==mr);return r&&(o=o.replace(Pa,``)),o=o.replace(/@\*/g,ct).replace(/@\w+/g,i=>ct+`-`+i.slice(1)).replace(/:animating/g,At),[o,r]}function Ma(o){return o?m({},o):null}var gn=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(r){this.errors=r}};function Aa(o){if(typeof o==`string`)return null;let r=null;if(Array.isArray(o))o.forEach(i=>{if(i instanceof Map&&i.has(`offset`)){let a=i;r=parseFloat(a.get(`offset`)),a.delete(`offset`)}});else if(o instanceof Map&&o.has(`offset`)){let i=o;r=parseFloat(i.get(`offset`)),i.delete(`offset`)}return r}function Oa(o,r){if(typeof o==`object`&&o!==null&&Object.hasOwn(o,`duration`))return o;if(typeof o==`number`){let l=mt(o,r).duration;return mn(l,0,``)}let i=o;if(i.split(/\s+/).some(l=>l.charAt(0)==`{`&&l.charAt(1)==`{`)){let l=mn(0,0,``);return l.dynamic=!0,l.strValue=i,l}let s=mt(i,r);return mn(s.duration,s.delay,s.easing)}function We(o){return o?(o=m({},o),o.params&&(o.params=Ma(o.params))):o={},o}function mn(o,r,i){return{duration:o,delay:r,easing:i}}function Tn(o,r,i,a,s,l,d=null,m=!1){return{type:1,element:o,keyframes:r,preStyleProps:i,postStyleProps:a,duration:s,delay:l,totalTime:s+l,easing:d,subTimeline:m}}var ht=class{_map=new Map;get(r){return this._map.get(r)||[]}append(r,i){let a=this._map.get(r);a||this._map.set(r,a=[]),a.push(...i)}has(r){return this._map.has(r)}clear(){this._map.clear()}};var Na=1;var ja=new RegExp(`:enter`,`g`);var Da=new RegExp(`:leave`,`g`);function hr(o,r,i,a,s,l=new Map,d=new Map,m,h,u=[]){return new bn().buildKeyframes(o,r,i,a,s,l,d,m,h,u)}var bn=class{buildKeyframes(r,i,a,s,l,d,m,h,u,b=[]){u=u||new ht;let S=new Sn(r,i,u,s,l,b,[]);S.options=h;let k=h.delay?Ae(h.delay):0;S.currentTimeline.delayNextStep(k),S.currentTimeline.setStyles([d],null,S.errors,h),se(this,a,S);let C=S.timelines.filter(w=>w.containsAnimation());if(C.length&&m.size){let w;for(let P=C.length-1;P>=0;P--){let F=C[P];if(F.element===i){w=F;break}}w&&!w.allowOnlyTimelineStyles()&&w.setStyles([m],null,S.errors,h)}return C.length?C.map(w=>w.buildKeyframes()):[Tn(i,[],[],[],0,k,``,!1)]}visitTrigger(r,i){}visitState(r,i){}visitTransition(r,i){}visitAnimateChild(r,i){let a=i.subInstructions.get(i.element);if(a){let s=i.createSubContext(r.options),l=i.currentTimeline.currentTime,d=this._visitSubInstructions(a,s,s.options);l!=d&&i.transformIntoNewTimeline(d)}i.previousNode=r}visitAnimateRef(r,i){let a=i.createSubContext(r.options);a.transformIntoNewTimeline(),this._applyAnimationRefDelays([r.options,r.animation.options],i,a),this.visitReference(r.animation,a),i.transformIntoNewTimeline(a.currentTimeline.currentTime),i.previousNode=r}_applyAnimationRefDelays(r,i,a){for(let s of r){let l=s?.delay;if(l){let d=typeof l==`number`?l:Ae(it(l,s?.params??{},i.errors));a.delayNextStep(d)}}}_visitSubInstructions(r,i,a){let l=i.currentTimeline.currentTime,d=a.duration!=null?Ae(a.duration):null,m=a.delay!=null?Ae(a.delay):null;return d!==0&&r.forEach(h=>{let u=i.appendInstructionToTimeline(h,d,m);l=Math.max(l,u.duration+u.delay)}),l}visitReference(r,i){i.updateOptions(r.options,!0),se(this,r.animation,i),i.previousNode=r}visitSequence(r,i){let a=i.subContextCount,s=i,l=r.options;if(l&&(l.params||l.delay)&&(s=i.createSubContext(l),s.transformIntoNewTimeline(),l.delay!=null)){s.previousNode.type==A.Style&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=qt);let d=Ae(l.delay);s.delayNextStep(d)}r.steps.length&&(r.steps.forEach(d=>se(this,d,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>a&&s.transformIntoNewTimeline()),i.previousNode=r}visitGroup(r,i){let a=[],s=i.currentTimeline.currentTime,l=r.options&&r.options.delay?Ae(r.options.delay):0;r.steps.forEach(d=>{let m=i.createSubContext(r.options);l&&m.delayNextStep(l),se(this,d,m),s=Math.max(s,m.currentTimeline.currentTime),a.push(m.currentTimeline)}),a.forEach(d=>i.currentTimeline.mergeTimelineCollectedStyles(d)),i.transformIntoNewTimeline(s),i.previousNode=r}_visitTiming(r,i){if(r.dynamic){let a=r.strValue;return mt(i.params?it(a,i.params,i.errors):a,i.errors)}else return{duration:r.duration,delay:r.delay,easing:r.easing}}visitAnimate(r,i){let a=i.currentAnimateTimings=this._visitTiming(r.timings,i),s=i.currentTimeline;a.delay&&(i.incrementTime(a.delay),s.snapshotCurrentStyles());let l=r.style;l.type==A.Keyframes?this.visitKeyframes(l,i):(i.incrementTime(a.duration),this.visitStyle(l,i),s.applyStylesToKeyframe()),i.currentAnimateTimings=null,i.previousNode=r}visitStyle(r,i){let a=i.currentTimeline,s=i.currentAnimateTimings;!s&&a.hasCurrentStyleProperties()&&a.forwardFrame();let l=s&&s.easing||r.easing;r.isEmptyStep?a.applyEmptyStep(l):a.setStyles(r.styles,l,i.errors,i.options),i.previousNode=r}visitKeyframes(r,i){let a=i.currentAnimateTimings,s=i.currentTimeline.duration,l=a.duration,m=i.createSubContext().currentTimeline;m.easing=a.easing,r.styles.forEach(h=>{let u=h.offset||0;m.forwardTime(u*l),m.setStyles(h.styles,h.easing,i.errors,i.options),m.applyStylesToKeyframe()}),i.currentTimeline.mergeTimelineCollectedStyles(m),i.transformIntoNewTimeline(s+l),i.previousNode=r}visitQuery(r,i){let a=i.currentTimeline.currentTime,s=r.options||{},l=s.delay?Ae(s.delay):0;l&&(i.previousNode.type===A.Style||a==0&&i.currentTimeline.hasCurrentStyleProperties())&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=qt);let d=a,m=i.invokeQuery(r.selector,r.originalSelector,r.limit,r.includeSelf,!!s.optional,i.errors);i.currentQueryTotal=m.length;let h=null;m.forEach((u,b)=>{i.currentQueryIndex=b;let S=i.createSubContext(r.options,u);l&&S.delayNextStep(l),u===i.element&&(h=S.currentTimeline),se(this,r.animation,S),S.currentTimeline.applyStylesToKeyframe();let k=S.currentTimeline.currentTime;d=Math.max(d,k)}),i.currentQueryIndex=0,i.currentQueryTotal=0,i.transformIntoNewTimeline(d),h&&(i.currentTimeline.mergeTimelineCollectedStyles(h),i.currentTimeline.snapshotCurrentStyles()),i.previousNode=r}visitStagger(r,i){let a=i.parentContext,s=i.currentTimeline,l=r.timings,d=Math.abs(l.duration),m=d*(i.currentQueryTotal-1),h=d*i.currentQueryIndex;switch(l.duration<0?`reverse`:l.easing){case`reverse`:h=m-h;break;case`full`:h=a.currentStaggerTime;break}let b=i.currentTimeline;h&&b.delayNextStep(h);let S=b.currentTime;se(this,r.animation,i),i.previousNode=r,a.currentStaggerTime=s.currentTime-S+(s.startTime-a.currentTimeline.startTime)}};var qt={};var Sn=class o{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=qt;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(r,i,a,s,l,d,m,h){this._driver=r,this.element=i,this.subInstructions=a,this._enterClassName=s,this._leaveClassName=l,this.errors=d,this.timelines=m,this.currentTimeline=h||new Lt(this._driver,i,0),m.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(r,i){if(!r)return;let a=r,s=this.options;a.duration!=null&&(s.duration=Ae(a.duration)),a.delay!=null&&(s.delay=Ae(a.delay));let l=a.params;if(l){let d=s.params;d||(d=this.options.params={}),Object.keys(l).forEach(m=>{(!i||!Object.hasOwn(d,m))&&(d[m]=it(l[m],d,this.errors))})}}_copyOptions(){let r={};if(this.options){let i=this.options.params;if(i){let a=r.params={};Object.keys(i).forEach(s=>{a[s]=i[s]})}}return r}createSubContext(r=null,i,a){let s=i||this.element,l=new o(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,a||0));return l.previousNode=this.previousNode,l.currentAnimateTimings=this.currentAnimateTimings,l.options=this._copyOptions(),l.updateOptions(r),l.currentQueryIndex=this.currentQueryIndex,l.currentQueryTotal=this.currentQueryTotal,l.parentContext=this,this.subContextCount++,l}transformIntoNewTimeline(r){return this.previousNode=qt,this.currentTimeline=this.currentTimeline.fork(this.element,r),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(r,i,a){let s={duration:i??r.duration,delay:this.currentTimeline.currentTime+(a??0)+r.delay,easing:``},l=new En(this._driver,r.element,r.keyframes,r.preStyleProps,r.postStyleProps,s,r.stretchStartingKeyframe);return this.timelines.push(l),s}incrementTime(r){this.currentTimeline.forwardTime(this.currentTimeline.duration+r)}delayNextStep(r){r>0&&this.currentTimeline.delayNextStep(r)}invokeQuery(r,i,a,s,l,d){let m=[];if(s&&m.push(this.element),r.length>0){r=r.replace(ja,`.`+this._enterClassName),r=r.replace(Da,`.`+this._leaveClassName);let h=a!=1,u=this._driver.query(this.element,r,h);a!==0&&(u=a<0?u.slice(u.length+a,u.length):u.slice(0,a)),m.push(...u)}return!l&&m.length==0&&d.push(Di(i)),m}};var Lt=class o{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(r,i,a,s){this._driver=r,this.element=i,this.startTime=a,this._elementTimelineStylesLookup=s,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(i),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(i,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(r){let i=this._keyframes.size===1&&this._pendingStyles.size;this.duration||i?(this.forwardTime(this.currentTime+r),i&&this.snapshotCurrentStyles()):this.startTime+=r}fork(r,i){return this.applyStylesToKeyframe(),new o(this._driver,r,i||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Na,this._loadKeyframe()}forwardTime(r){this.applyStylesToKeyframe(),this.duration=r,this._loadKeyframe()}_updateStyle(r,i){this._localTimelineStyles.set(r,i),this._globalTimelineStyles.set(r,i),this._styleSummary.set(r,{time:this.currentTime,value:i})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(r){r&&this._previousKeyframe.set(`easing`,r);for(let[i,a]of this._globalTimelineStyles)this._backFill.set(i,a||ue),this._currentKeyframe.set(i,ue);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(r,i,a,s){i&&this._previousKeyframe.set(`easing`,i);let l=s&&s.params||{},d=za(r,this._globalTimelineStyles);for(let[m,h]of d){let u=it(h,l,a);this._pendingStyles.set(m,u),this._localTimelineStyles.has(m)||this._backFill.set(m,this._globalTimelineStyles.get(m)??ue),this._updateStyle(m,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((r,i)=>{this._currentKeyframe.set(i,r)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((r,i)=>{this._currentKeyframe.has(i)||this._currentKeyframe.set(i,r)}))}snapshotCurrentStyles(){for(let[r,i]of this._localTimelineStyles)this._pendingStyles.set(r,i),this._updateStyle(r,i)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let r=[];for(let i in this._currentKeyframe)r.push(i);return r}mergeTimelineCollectedStyles(r){r._styleSummary.forEach((i,a)=>{let s=this._styleSummary.get(a);(!s||i.time>s.time)&&this._updateStyle(a,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();let r=new Set,i=new Set,a=this._keyframes.size===1&&this.duration===0,s=[];this._keyframes.forEach((m,h)=>{let u=new Map([...this._backFill,...m]);u.forEach((b,S)=>{b===tt?r.add(S):b===ue&&i.add(S)}),a||u.set(`offset`,h/this.duration),s.push(u)});let l=[...r.values()],d=[...i.values()];if(a){let m=s[0],h=new Map(m);m.set(`offset`,0),h.set(`offset`,1),s=[m,h]}return Tn(this.element,s,l,d,this.duration,this.startTime,this.easing,!1)}};var En=class extends Lt{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(r,i,a,s,l,d,m=!1){super(r,i,d.delay),this.keyframes=a,this.preStyleProps=s,this.postStyleProps=l,this._stretchStartingKeyframe=m,this.timings={duration:d.duration,delay:d.delay,easing:d.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let r=this.keyframes,{delay:i,duration:a,easing:s}=this.timings;if(this._stretchStartingKeyframe&&i){let l=[],d=a+i,m=i/d,h=new Map(r[0]);h.set(`offset`,0),l.push(h);let u=new Map(r[0]);u.set(`offset`,ir(m)),l.push(u);let b=r.length-1;for(let S=1;S<=b;S++){let k=new Map(r[S]),C=k.get(`offset`),w=i+C*a;k.set(`offset`,ir(w/d)),l.push(k)}a=d,i=0,s=``,r=l}return Tn(this.element,r,this.preStyleProps,this.postStyleProps,a,i,s,!0)}};function ir(o,r=3){let i=Math.pow(10,r-1);return Math.round(o*i)/i}function za(o,r){let i=new Map,a;return o.forEach(s=>{if(s===`*`){a??=r.keys();for(let l of a)i.set(l,ue)}else for(let[l,d]of s)i.set(l,d)}),i}function rr(o,r,i,a,s,l,d,m,h,u,b,S,k){return{type:0,element:o,triggerName:r,isRemovalTransition:s,fromState:i,fromStyles:l,toState:a,toStyles:d,timelines:m,queriedElements:h,preStyleProps:u,postStyleProps:b,totalTime:S,errors:k}}var pn={};var Bt=class{_triggerName;ast;_stateStyles;constructor(r,i,a){this._triggerName=r,this.ast=i,this._stateStyles=a}match(r,i,a,s){return Fa(this.ast.matchers,r,i,a,s)}buildStyles(r,i,a){let s=this._stateStyles.get(`*`);return r!==void 0&&(s=this._stateStyles.get(r?.toString())||s),s?s.buildStyles(i,a):new Map}build(r,i,a,s,l,d,m,h,u,b){let S=[],k=this.ast.options&&this.ast.options.params||pn,C=m&&m.params||pn,w=this.buildStyles(a,C,S),P=h&&h.params||pn,F=this.buildStyles(s,P,S),J=new Set,Y=new Map,Z=new Map,$=s===`void`,Ie={params:ur(P,k),delay:this.ast.options?.delay},le=b?[]:hr(r,i,this.ast.animation,l,d,w,F,Ie,u,S),ee=0;return le.forEach(re=>{ee=Math.max(re.duration+re.delay,ee)}),S.length?rr(i,this._triggerName,a,s,$,w,F,[],[],Y,Z,ee,S):(le.forEach(re=>{let Fe=re.element,Ke=oe(Y,Fe,new Set);re.preStyleProps.forEach(qe=>Ke.add(qe));let In=oe(Z,Fe,new Set);re.postStyleProps.forEach(qe=>In.add(qe)),Fe!==i&&J.add(Fe)}),rr(i,this._triggerName,a,s,$,w,F,le,[...J.values()],Y,Z,ee))}};function Fa(o,r,i,a,s){return o.some(l=>l(r,i,a,s))}function ur(o,r){let i=m({},r);return Object.entries(o).forEach(([a,s])=>{s!=null&&(i[a]=s)}),i}var yn=class{styles;defaultParams;normalizer;constructor(r,i,a){this.styles=r,this.defaultParams=i,this.normalizer=a}buildStyles(r,i){let a=new Map,s=ur(r,this.defaultParams);return this.styles.styles.forEach(l=>{typeof l!=`string`&&l.forEach((d,m)=>{d&&(d=it(d,s,i));let h=this.normalizer.normalizePropertyName(m,i);d=this.normalizer.normalizeStyleValue(m,h,d,i),a.set(m,d)})}),a}};function qa(o,r,i){return new vn(o,r,i)}var vn=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(r,i,a){this.name=r,this.ast=i,this._normalizer=a,i.states.forEach(s=>{let l=s.options&&s.options.params||{};this.states.set(s.name,new yn(s.style,l,a))}),ar(this.states,`true`,`1`),ar(this.states,`false`,`0`),i.transitions.forEach(s=>{this.transitionFactories.push(new Bt(r,s,this.states))}),this.fallbackTransition=La(r,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(r,i,a,s){return this.transitionFactories.find(d=>d.match(r,i,a,s))||null}matchStyles(r,i,a){return this.fallbackTransition.buildStyles(r,i,a)}};function La(o,r,i){let a=[(d,m)=>!0],s={type:A.Sequence,steps:[],options:null};return new Bt(o,{type:A.Transition,animation:s,matchers:a,options:null,queryCount:0,depCount:0},r)}function ar(o,r,i){o.has(r)?o.has(i)||o.set(i,o.get(r)):o.has(i)&&o.set(r,o.get(i))}var Ba=new ht;var wn=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(r,i,a){this.bodyNode=r,this._driver=i,this._normalizer=a}register(r,i){let a=[],l=pr(this._driver,i,a,[]);if(a.length)throw Li(a);this._animations.set(r,l)}_buildPlayer(r,i,a){let s=r.element,l=nn(this._normalizer,r.keyframes,i,a);return this._driver.animate(s,l,r.duration,r.delay,r.easing,[],!0)}create(r,i,a={}){let s=[],l=this._animations.get(r),d,m=new Map;if(l?(d=hr(this._driver,i,l,ln,Mt,new Map,new Map,a,Ba,s),d.forEach(b=>{let S=oe(m,b.element,new Map);b.postStyleProps.forEach(k=>S.set(k,null))})):(s.push(Bi()),d=[]),s.length)throw Hi(s);m.forEach((b,S)=>{b.forEach((k,C)=>{b.set(C,this._driver.computeStyle(S,C,ue))})});let u=Ne(d.map(b=>{let S=m.get(b.element);return this._buildPlayer(b,new Map,S)}));return this._playersById.set(r,u),u.onDestroy(()=>this.destroy(r)),this.players.push(u),u}destroy(r){let i=this._getPlayer(r);i.destroy(),this._playersById.delete(r);let a=this.players.indexOf(i);a>=0&&this.players.splice(a,1)}_getPlayer(r){let i=this._playersById.get(r);if(!i)throw Ji(r);return i}listen(r,i,a,s){let l=Pt(i,``,``,``);return kt(this._getPlayer(r),a,l,s),()=>{}}
42command(r,i,a,s){if(a==`register`){this.register(r,s[0]);return}if(a==`create`){let d=s[0]||{};this.create(r,i,d);return}let l=this._getPlayer(r);switch(a){case`play`:l.play();break;case`pause`:l.pause();break;case`reset`:l.reset();break;case`restart`:l.restart();break;case`finish`:l.finish();break;case`init`:l.init();break;case`setPosition`:l.setPosition(parseFloat(s[0]));break;case`destroy`:this.destroy(r);break}}};var or=`ng-animate-queued`;var Ha=`.ng-animate-queued`;var hn=`ng-animate-disabled`;var Ja=`.ng-animate-disabled`;var Ga=`ng-star-inserted`;var Ua=`.ng-star-inserted`;var Wa=[];var fr={namespaceId:``,setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1};var Ya={namespaceId:``,setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};var ve=`__ng_removed`;var ut=class{namespaceId;value;options;get params(){return this.options.params}constructor(r,i=``){this.namespaceId=i;let a=r&&Object.hasOwn(r,`value`),s=a?r.value:r;if(this.value=Ka(s),a){let l=r,{value:d}=l,m=dE(l,[`value`]);this.options=m}else this.options={};this.options.params||(this.options.params={})}absorbOptions(r){let i=r.params;if(i){let a=this.options.params;
vendor: 28,089 bytes, line 42
42Object.keys(i).forEach(s=>{a[s]??(a[s]=i[s])})}}};var pt=`void`;var un=new ut(pt);var _n=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(r,i,a){this.id=r,this.hostElement=i,this._engine=a,this._hostClassName=`ng-tns-`+r,fe(i,this._hostClassName)}listen(r,i,a,s){if(!this._triggers.has(i))throw Gi(a,i);if(a==null||a.length==0)throw Ui(i);if(!Qa(a))throw Wi(a,i);let l=oe(this._elementListeners,r,[]),d={name:i,phase:a,callback:s};l.push(d);let m=oe(this._engine.statesByElement,r,new Map);return m.has(i)||(fe(r,dt),fe(r,dt+`-`+i),m.set(i,un)),()=>{this._engine.afterFlush(()=>{let h=l.indexOf(d);h>=0&&l.splice(h,1),this._triggers.has(i)||m.delete(i)})}}register(r,i){return this._triggers.has(r)?!1:(this._triggers.set(r,i),!0)}_getTrigger(r){let i=this._triggers.get(r);if(!i)throw Yi(r);return i}trigger(r,i,a,s=!0){let l=this._getTrigger(i),d=new ft(this.id,i,r),m=this._engine.statesByElement.get(r);m||(fe(r,dt),fe(r,dt+`-`+i),this._engine.statesByElement.set(r,m=new Map));let h=m.get(i),u=new ut(a,this.id);if(!(a&&Object.hasOwn(a,`value`))&&h&&u.absorbOptions(h.options),m.set(i,u),h||(h=un),!(u.value===pt)&&h.value===u.value){if(!Za(h.params,u.params)){let P=[],F=l.matchStyles(h.value,h.params,P),J=l.matchStyles(u.value,u.params,P);P.length?this._engine.reportError(P):this._engine.afterFlush(()=>{ze(r,F),ye(r,J)})}return}let k=oe(this._engine.playersByElement,r,[]);k.forEach(P=>{P.namespaceId==this.id&&P.triggerName==i&&P.queued&&P.destroy()});let C=l.matchTransition(h.value,u.value,r,u.params),w=!1;if(!C){if(!s)return;C=l.fallbackTransition,w=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:r,triggerName:i,transition:C,fromState:h,toState:u,player:d,isFallbackTransition:w}),w||(fe(r,or),d.onStart(()=>{rt(r,or)})),d.onDone(()=>{let P=this.players.indexOf(d);P>=0&&this.players.splice(P,1);let F=this._engine.playersByElement.get(r);if(F){let J=F.indexOf(d);J>=0&&F.splice(J,1)}}),this.players.push(d),k.push(d),d}deregister(r){this._triggers.delete(r),this._engine.statesByElement.forEach(i=>i.delete(r)),this._elementListeners.forEach((i,a)=>{this._elementListeners.set(a,i.filter(s=>s.name!=r))})}clearElementCache(r){this._engine.statesByElement.delete(r),this._elementListeners.delete(r);let i=this._engine.playersByElement.get(r);i&&(i.forEach(a=>a.destroy()),this._engine.playersByElement.delete(r))}_signalRemovalForInnerTriggers(r,i){let a=this._engine.driver.query(r,ct,!0);a.forEach(s=>{if(s[ve])return;let l=this._engine.fetchNamespacesByElement(s);l.size?l.forEach(d=>d.triggerLeaveAnimation(s,i,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>a.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(r,i,a,s){let l=this._engine.statesByElement.get(r),d=new Map;if(l){let m=[];if(l.forEach((h,u)=>{if(d.set(u,h.value),this._triggers.has(u)){let b=this.trigger(r,u,pt,s);b&&m.push(b)}}),m.length)return this._engine.markElementAsRemoved(this.id,r,!0,i,d),a&&Ne(m).onDone(()=>this._engine.processLeaveNode(r)),!0}return!1}prepareLeaveAnimationListeners(r){let i=this._elementListeners.get(r),a=this._engine.statesByElement.get(r);if(i&&a){let s=new Set;i.forEach(l=>{let d=l.name;if(s.has(d))return;s.add(d);let h=this._triggers.get(d).fallbackTransition,u=a.get(d)||un,b=new ut(pt),S=new ft(this.id,d,r);this._engine.totalQueuedPlayers++,this._queue.push({element:r,triggerName:d,transition:h,fromState:u,toState:b,player:S,isFallbackTransition:!0})})}}removeNode(r,i){let a=this._engine;if(r.childElementCount&&this._signalRemovalForInnerTriggers(r,i),this.triggerLeaveAnimation(r,i,!0))return;let s=!1;if(a.totalAnimations){let l=a.players.length?a.playersByQueriedElement.get(r):[];if(l&&l.length)s=!0;else{let d=r;for(;d=d.parentNode;)if(a.statesByElement.get(d)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(r),s)a.markElementAsRemoved(this.id,r,!1,i);else{let l=r[ve];(!l||l===fr)&&(a.afterFlush(()=>this.clearElementCache(r)),a.destroyInnerAnimations(r),a._onRemovalComplete(r,i))}}insertNode(r,i){fe(r,this._hostClassName)}drainQueuedTransitions(r){let i=[];return this._queue.forEach(a=>{let s=a.player;if(s.destroyed)return;let l=a.element,d=this._elementListeners.get(l);d&&d.forEach(m=>{if(m.name==a.triggerName){let h=Pt(l,a.triggerName,a.fromState.value,a.toState.value);h._data=r,kt(a.player,m.phase,h,m.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):i.push(a)}),this._queue=[],i.sort((a,s)=>{let l=a.transition.ast.depCount,d=s.transition.ast.depCount;return l==0||d==0?l-d:this._engine.driver.containsElement(a.element,s.element)?1:-1})}destroy(r){this.players.forEach(i=>i.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,r)}};var Cn=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(r,i)=>{};_onRemovalComplete(r,i){this.onRemovalComplete(r,i)}constructor(r,i,a){this.bodyNode=r,this.driver=i,this._normalizer=a}get queuedPlayers(){let r=[];return this._namespaceList.forEach(i=>{i.players.forEach(a=>{a.queued&&r.push(a)})}),r}createNamespace(r,i){let a=new _n(r,i,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,i)?this._balanceNamespaceList(a,i):(this.newHostElements.set(i,a),this.collectEnterElement(i)),this._namespaceLookup[r]=a}_balanceNamespaceList(r,i){let a=this._namespaceList,s=this.namespacesByHostElement;if(a.length-1>=0){let d=!1,m=this.driver.getParentElement(i);for(;m;){let h=s.get(m);if(h){let u=a.indexOf(h);a.splice(u+1,0,r),d=!0;break}m=this.driver.getParentElement(m)}d||a.unshift(r)}else a.push(r);return s.set(i,r),r}register(r,i){let a=this._namespaceLookup[r];return a||(a=this.createNamespace(r,i)),a}registerTrigger(r,i,a){let s=this._namespaceLookup[r];s&&s.register(i,a)&&this.totalAnimations++}destroy(r,i){r&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let a=this._fetchNamespace(r);this.namespacesByHostElement.delete(a.hostElement);let s=this._namespaceList.indexOf(a);s>=0&&this._namespaceList.splice(s,1),a.destroy(i),delete this._namespaceLookup[r]}))}_fetchNamespace(r){return this._namespaceLookup[r]}fetchNamespacesByElement(r){let i=new Set,a=this.statesByElement.get(r);if(a){for(let s of a.values())if(s.namespaceId){let l=this._fetchNamespace(s.namespaceId);l&&i.add(l)}}return i}trigger(r,i,a,s){if(Rt(i)){let l=this._fetchNamespace(r);if(l)return l.trigger(i,a,s),!0}return!1}insertNode(r,i,a,s){if(!Rt(i))return;let l=i[ve];if(l&&l.setForRemoval){l.setForRemoval=!1,l.setForMove=!0;let d=this.collectedLeaveElements.indexOf(i);d>=0&&this.collectedLeaveElements.splice(d,1)}if(r){let d=this._fetchNamespace(r);d&&d.insertNode(i,a)}s&&this.collectEnterElement(i)}collectEnterElement(r){this.collectedEnterElements.push(r)}markElementAsDisabled(r,i){i?this.disabledNodes.has(r)||(this.disabledNodes.add(r),fe(r,hn)):this.disabledNodes.has(r)&&(this.disabledNodes.delete(r),rt(r,hn))}removeNode(r,i,a){if(Rt(i)){let s=r?this._fetchNamespace(r):null;s?s.removeNode(i,a):this.markElementAsRemoved(r,i,!1,a);let l=this.namespacesByHostElement.get(i);l&&l.id!==r&&l.removeNode(i,a)}else this._onRemovalComplete(i,a)}markElementAsRemoved(r,i,a,s,l){this.collectedLeaveElements.push(i),i[ve]={namespaceId:r,setForRemoval:s,hasAnimation:a,removedBeforeQueried:!1,previousTriggersValues:l}}listen(r,i,a,s,l){return Rt(i)?this._fetchNamespace(r).listen(i,a,s,l):()=>{}}_buildInstruction(r,i,a,s,l){return r.transition.build(this.driver,r.element,r.fromState.value,r.toState.value,a,s,r.fromState.options,r.toState.options,i,l)}destroyInnerAnimations(r){let i=this.driver.query(r,ct,!0);i.forEach(a=>this.destroyActiveAnimationsForElement(a)),this.playersByQueriedElement.size!=0&&(i=this.driver.query(r,At,!0),i.forEach(a=>this.finishActiveQueriedAnimationOnElement(a)))}destroyActiveAnimationsForElement(r){let i=this.playersByElement.get(r);i&&i.forEach(a=>{a.queued?a.markedForDestroy=!0:a.destroy()})}finishActiveQueriedAnimationOnElement(r){let i=this.playersByQueriedElement.get(r);i&&i.forEach(a=>a.finish())}whenRenderingDone(){return new Promise(r=>{if(this.players.length)return Ne(this.players).onDone(()=>r());r()})}processLeaveNode(r){let i=r[ve];if(i&&i.setForRemoval){if(r[ve]=fr,i.namespaceId){this.destroyInnerAnimations(r);let a=this._fetchNamespace(i.namespaceId);a&&a.clearElementCache(r)}this._onRemovalComplete(r,i.setForRemoval)}r.classList?.contains(hn)&&this.markElementAsDisabled(r,!1),this.driver.query(r,Ja,!0).forEach(a=>{this.markElementAsDisabled(a,!1)})}flush(r=-1){let i=[];if(this.newHostElements.size&&(this.newHostElements.forEach((a,s)=>this._balanceNamespaceList(a,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let a=0;a<this.collectedEnterElements.length;a++){let s=this.collectedEnterElements[a];fe(s,Ga)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let a=[];try{i=this._flushAnimations(a,r)}finally{for(let s=0;s<a.length;s++)a[s]()}}else for(let a=0;a<this.collectedLeaveElements.length;a++){let s=this.collectedLeaveElements[a];this.processLeaveNode(s)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(a=>a()),this._flushFns=[],this._whenQuietFns.length){let a=this._whenQuietFns;this._whenQuietFns=[],i.length?Ne(i).onDone(()=>{a.forEach(s=>s())}):a.forEach(s=>s())}}reportError(r){throw Vi(r)}_flushAnimations(r,i){let a=new ht,s=[],l=new Map,d=[],m=new Map,h=new Map,u=new Map,b=new Set;this.disabledNodes.forEach(v=>{b.add(v);let T=this.driver.query(v,Ha,!0);for(let M=0;M<T.length;M++)b.add(T[M])});let S=this.bodyNode,k=Array.from(this.statesByElement.keys()),C=dr(k,this.collectedEnterElements),w=new Map,P=0;C.forEach((v,T)=>{let M=ln+P++;w.set(T,M),v.forEach(R=>fe(R,M))});let F=[],J=new Set,Y=new Set;for(let v=0;v<this.collectedLeaveElements.length;v++){let T=this.collectedLeaveElements[v],M=T[ve];M&&M.setForRemoval&&(F.push(T),J.add(T),M.hasAnimation?this.driver.query(T,Ua,!0).forEach(R=>J.add(R)):Y.add(T))}let Z=new Map,$=dr(k,Array.from(J));$.forEach((v,T)=>{let M=Mt+P++;Z.set(T,M),v.forEach(R=>fe(R,M))}),r.push(()=>{C.forEach((v,T)=>{let M=w.get(T);v.forEach(R=>rt(R,M))}),$.forEach((v,T)=>{let M=Z.get(T);v.forEach(R=>rt(R,M))}),F.forEach(v=>{this.processLeaveNode(v)})});let Ie=[],le=[];for(let v=this._namespaceList.length-1;v>=0;v--)this._namespaceList[v].drainQueuedTransitions(i).forEach(M=>{let R=M.player,te=M.element;if(Ie.push(R),this.collectedEnterElements.length){let ie=te[ve];if(ie&&ie.setForMove){if(ie.previousTriggersValues&&ie.previousTriggersValues.has(M.triggerName)){let Le=ie.previousTriggersValues.get(M.triggerName),me=this.statesByElement.get(M.element);if(me&&me.has(M.triggerName)){let xt=me.get(M.triggerName);xt.value=Le,me.set(M.triggerName,xt)}}R.destroy();return}}let we=!S||!this.driver.containsElement(S,te),de=Z.get(te),je=w.get(te),K=this._buildInstruction(M,a,je,de,we);if(K.errors&&K.errors.length){le.push(K);return}if(we){R.onStart(()=>ze(te,K.fromStyles)),R.onDestroy(()=>ye(te,K.toStyles)),s.push(R);return}if(M.isFallbackTransition){R.onStart(()=>ze(te,K.fromStyles)),R.onDestroy(()=>ye(te,K.toStyles)),s.push(R);return}let Dn=[];K.timelines.forEach(ie=>{ie.stretchStartingKeyframe=!0,this.disabledNodes.has(ie.element)||Dn.push(ie)}),K.timelines=Dn,a.append(te,K.timelines);let la={instruction:K,player:R,element:te};d.push(la),K.queriedElements.forEach(ie=>oe(m,ie,[]).push(R)),K.preStyleProps.forEach((ie,Le)=>{if(ie.size){let me=h.get(Le);me||h.set(Le,me=new Set),ie.forEach((xt,Yt)=>me.add(Yt))}}),K.postStyleProps.forEach((ie,Le)=>{let me=u.get(Le);me||u.set(Le,me=new Set),ie.forEach((xt,Yt)=>me.add(Yt))})});if(le.length){let v=[];le.forEach(T=>{v.push(Ki(T.triggerName,T.errors))}),Ie.forEach(T=>T.destroy()),this.reportError(v)}let ee=new Map,re=new Map;d.forEach(v=>{let T=v.element;a.has(T)&&(re.set(T,T),this._beforeAnimationBuild(v.player.namespaceId,v.instruction,ee))}),s.forEach(v=>{let T=v.element;this._getPreviousPlayers(T,!1,v.namespaceId,v.triggerName,null).forEach(R=>{oe(ee,T,[]).push(R),R.destroy()})});let Fe=F.filter(v=>cr(v,h,u)),Ke=new Map;lr(Ke,this.driver,Y,u,ue).forEach(v=>{cr(v,h,u)&&Fe.push(v)});let qe=new Map;C.forEach((v,T)=>{lr(qe,this.driver,new Set(v),h,tt)}),Fe.forEach(v=>{let T=Ke.get(v),M=qe.get(v);Ke.set(v,new Map([...T?.entries()??[],...M?.entries()??[]]))});let Wt=[],jn=[],Rn={};d.forEach(v=>{let{element:T,player:M,instruction:R}=v;if(a.has(T)){if(b.has(T)){M.onDestroy(()=>ye(T,R.toStyles)),M.disabled=!0,M.overrideTotalTime(R.totalTime),s.push(M);return}let te=Rn;if(re.size>1){let de=T,je=[];for(;de=de.parentNode;){let K=re.get(de);if(K){te=K;break}je.push(de)}je.forEach(K=>re.set(K,te))}let we=this._buildAnimation(M.namespaceId,R,ee,l,qe,Ke);if(M.setRealPlayer(we),te===Rn)Wt.push(M);else{let de=this.playersByElement.get(te);de&&de.length&&(M.parentPlayer=Ne(de)),s.push(M)}}else ze(T,R.fromStyles),M.onDestroy(()=>ye(T,R.toStyles)),jn.push(M),b.has(T)&&s.push(M)}),jn.forEach(v=>{let T=l.get(v.element);if(T&&T.length){let M=Ne(T);v.setRealPlayer(M)}}),s.forEach(v=>{v.parentPlayer?v.syncPlayerEvents(v.parentPlayer):v.destroy()});for(let v=0;v<F.length;v++){let T=F[v],M=T[ve];if(rt(T,Mt),M&&M.hasAnimation)continue;let R=[];if(m.size){let we=m.get(T);we&&we.length&&R.push(...we);let de=this.driver.query(T,At,!0);for(let je=0;je<de.length;je++){let K=m.get(de[je]);K&&K.length&&R.push(...K)}}let te=R.filter(we=>!we.destroyed);te.length?$a(this,T,te):this.processLeaveNode(T)}return F.length=0,Wt.forEach(v=>{this.players.push(v),v.onDone(()=>{v.destroy();let T=this.players.indexOf(v);this.players.splice(T,1)}),v.play()}),Wt}afterFlush(r){this._flushFns.push(r)}afterFlushAnimationsDone(r){this._whenQuietFns.push(r)}_getPreviousPlayers(r,i,a,s,l){let d=[];if(i){let m=this.playersByQueriedElement.get(r);m&&(d=m)}else{let m=this.playersByElement.get(r);if(m){let h=!l||l==pt;m.forEach(u=>{u.queued||!h&&u.triggerName!=s||d.push(u)})}}return(a||s)&&(d=d.filter(m=>!(a&&a!=m.namespaceId||s&&s!=m.triggerName))),d}_beforeAnimationBuild(r,i,a){let s=i.triggerName,l=i.element,d=i.isRemovalTransition?void 0:r,m=i.isRemovalTransition?void 0:s;for(let h of i.timelines){let u=h.element,b=u!==l,S=oe(a,u,[]);this._getPreviousPlayers(u,b,d,m,i.toState).forEach(C=>{let w=C.getRealPlayer();w.beforeDestroy&&w.beforeDestroy(),C.destroy(),S.push(C)})}ze(l,i.fromStyles)}_buildAnimation(r,i,a,s,l,d){let m=i.triggerName,h=i.element,u=[],b=new Set,S=new Set,k=i.timelines.map(w=>{let P=w.element;b.add(P);let F=P[ve];if(F&&F.removedBeforeQueried)return new Me(w.duration,w.delay);let J=P!==h,Y=Xa((a.get(P)||Wa).map(ee=>ee.getRealPlayer())).filter(ee=>{let re=ee;return re.element?re.element===P:!1}),Z=l.get(P),$=d.get(P),Ie=nn(this._normalizer,w.keyframes,Z,$),le=this._buildPlayer(w,Ie,Y);if(w.subTimeline&&s&&S.add(P),J){let ee=new ft(r,m,P);ee.setRealPlayer(le),u.push(ee)}return le});u.forEach(w=>{oe(this.playersByQueriedElement,w.element,[]).push(w),w.onDone(()=>Va(this.playersByQueriedElement,w.element,w))}),b.forEach(w=>fe(w,dn));let C=Ne(k);return C.onDestroy(()=>{b.forEach(w=>rt(w,dn)),ye(h,i.toStyles)}),S.forEach(w=>{oe(s,w,[]).push(C)}),C}_buildPlayer(r,i,a){return i.length>0?this.driver.animate(r.element,i,r.duration,r.delay,r.easing,a):new Me(r.duration,r.delay)}};var ft=class{namespaceId;triggerName;element;_player=new Me;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(r,i,a){this.namespaceId=r,this.triggerName=i,this.element=a}setRealPlayer(r){this._containsRealPlayer||(this._player=r,this._queuedCallbacks.forEach((i,a)=>{i.forEach(s=>kt(r,a,void 0,s))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(r.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(r){this.totalTime=r}syncPlayerEvents(r){let i=this._player;i.triggerCallback&&r.onStart(()=>i.triggerCallback(`start`)),r.onDone(()=>this.finish()),r.onDestroy(()=>this.destroy())}_queueEvent(r,i){oe(this._queuedCallbacks,r,[]).push(i)}onDone(r){this.queued&&this._queueEvent(`done`,r),this._player.onDone(r)}onStart(r){this.queued&&this._queueEvent(`start`,r),this._player.onStart(r)}onDestroy(r){this.queued&&this._queueEvent(`destroy`,r),this._player.onDestroy(r)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(r){this.queued||this._player.setPosition(r)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(r){let i=this._player;i.triggerCallback&&i.triggerCallback(r)}};function Va(o,r,i){let a=o.get(r);if(a){if(a.length){let s=a.indexOf(i);a.splice(s,1)}a.length==0&&o.delete(r)}return a}function Ka(o){return o??null}function Rt(o){return o&&o.nodeType===1}function Qa(o){return o==`start`||o==`done`}function sr(o,r){let i=o.style.display;return o.style.display=r??`none`,i}function lr(o,r,i,a,s){let l=[];i.forEach(h=>l.push(sr(h)));let d=[];a.forEach((h,u)=>{let b=new Map;h.forEach(S=>{let k=r.computeStyle(u,S,s);b.set(S,k),(!k||k.length==0)&&(u[ve]=Ya,d.push(u))}),o.set(u,b)});let m=0;return i.forEach(h=>sr(h,l[m++])),d}function dr(o,r){let i=new Map;if(o.forEach(m=>i.set(m,[])),r.length==0)return i;let a=1,s=new Set(r),l=new Map;function d(m){if(!m)return a;let h=l.get(m);if(h)return h;let u=m.parentNode;return i.has(u)?h=u:s.has(u)?h=a:h=d(u),l.set(m,h),h}return r.forEach(m=>{let h=d(m);h!==a&&i.get(h).push(m)}),i}function fe(o,r){o.classList?.add(r)}function rt(o,r){o.classList?.remove(r)}function $a(o,r,i){Ne(i).onDone(()=>o.processLeaveNode(r))}function Xa(o){let r=[];return xr(o,r),r}function xr(o,r){for(let i=0;i<o.length;i++){let a=o[i];a instanceof Ge?xr(a.players,r):r.push(a)}}function Za(o,r){let i=Object.keys(o),a=Object.keys(r);if(i.length!=a.length)return!1;for(let s=0;s<i.length;s++){let l=i[s];if(!Object.hasOwn(r,l)||o[l]!==r[l])return!1}return!0}function cr(o,r,i){let a=i.get(o);if(!a)return!1;let s=r.get(o);return s?a.forEach(l=>s.add(l)):r.set(o,a),i.delete(o),!0}var at=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(r,i)=>{};constructor(r,i,a){this._driver=i,this._normalizer=a,this._transitionEngine=new Cn(r.body,i,a),this._timelineEngine=new wn(r.body,i,a),this._transitionEngine.onRemovalComplete=(s,l)=>this.onRemovalComplete(s,l)}registerTrigger(r,i,a,s,l){let d=r+`-`+s,m=this._triggerCache[d];if(!m){let h=[],b=pr(this._driver,l,h,[]);if(h.length)throw qi(s,h);m=qa(s,b,this._normalizer),this._triggerCache[d]=m}this._transitionEngine.registerTrigger(i,s,m)}register(r,i){this._transitionEngine.register(r,i)}destroy(r,i){this._transitionEngine.destroy(r,i)}onInsert(r,i,a,s){this._transitionEngine.insertNode(r,i,a,s)}onRemove(r,i,a){this._transitionEngine.removeNode(r,i,a)}disableAnimations(r,i){this._transitionEngine.markElementAsDisabled(r,i)}process(r,i,a,s){if(a.charAt(0)==`@`){let[l,d]=rn(a),m=s;this._timelineEngine.command(l,i,d,m)}else this._transitionEngine.trigger(r,i,a,s)}listen(r,i,a,s,l){if(a.charAt(0)==`@`){let[d,m]=rn(a);return this._timelineEngine.listen(d,i,m,l)}return this._transitionEngine.listen(r,i,a,s,l)}flush(r=-1){this._transitionEngine.flush(r)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(r){this._transitionEngine.afterFlushAnimationsDone(r)}};function eo(o,r){let i=null,a=null;return Array.isArray(r)&&r.length?(i=fn(r[0]),r.length>1&&(a=fn(r[r.length-1]))):r instanceof Map&&(i=fn(r)),i||a?new to(o,i,a):null}var to=(()=>{class o{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(i,a,s){this._element=i,this._startStyles=a,this._endStyles=s;let l=o.initialStylesByElement.get(i);l||o.initialStylesByElement.set(i,l=new Map),this._initialStyles=l}start(){this._state<1&&(this._startStyles&&ye(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(ye(this._element,this._initialStyles),this._endStyles&&(ye(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(o.initialStylesByElement.delete(this._element),this._startStyles&&(ze(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ze(this._element,this._endStyles),this._endStyles=null),ye(this._element,this._initialStyles),this._state=3)}}return o})();function fn(o){let r=null;return o.forEach((i,a)=>{no(a)&&(r=r||new Map,r.set(a,i))}),r}function no(o){return o===`display`||o===`position`}var Ht=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(r,i,a,s){this.element=r,this.keyframes=i,this.options=a,this._specialStyles=s,this._duration=a.duration,this._delay=a.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(r=>r()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let r=this.keyframes,i=this._triggerWebAnimation(this.element,r,this.options);if(!i)return this._onFinish(),null;this.domPlayer=i,this._finalKeyframe=r.length?r[r.length-1]:new Map;let a=()=>this._onFinish();return i.addEventListener(`finish`,a),this.onDestroy(()=>{i.removeEventListener(`finish`,a)}),i}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(r){let i=[];return r.forEach(a=>{i.push(Object.fromEntries(a))}),i}_triggerWebAnimation(r,i,a){let s=this._convertKeyframesToObject(i);try{return r.animate(s,a)}catch(l){return null}}onStart(r){this._originalOnStartFns.push(r),this._onStartFns.push(r)}onDone(r){this._originalOnDoneFns.push(r),this._onDoneFns.push(r)}onDestroy(r){this._onDestroyFns.push(r)}play(){let r=this._buildPlayer();r&&(this.hasStarted()||(this._onStartFns.forEach(i=>i()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),r.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(r=>r()),this._onDestroyFns=[])}setPosition(r){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=r*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let r=new Map;this.hasStarted()&&this._finalKeyframe.forEach((a,s)=>{s!==`offset`&&r.set(s,this._finished?a:Nt(this.element,s))}),this.currentSnapshot=r}triggerCallback(r){let i=r===`start`?this._onStartFns:this._onDoneFns;i.forEach(a=>a()),i.length=0}};var Jt=class{validateStyleProperty(r){return!0}validateAnimatableStyleProperty(r){return!0}containsElement(r,i){return an(r,i)}getParentElement(r){return Tt(r)}query(r,i,a){return on(r,i,a)}computeStyle(r,i,a){return Nt(r,i)}animate(r,i,a,s,l,d=[]){let h={duration:a,delay:s,fill:s==0?`both`:`forwards`};l&&(h.easing=l);let u=new Map,b=d.filter(C=>C instanceof Ht);Zi(a,s)&&b.forEach(C=>{C.currentSnapshot.forEach((w,P)=>u.set(P,w))});let S=$i(i).map(C=>new Map(C));S=er(r,S,u);let k=eo(r,S);return new Ht(r,S,h,k)}};var Dt=`@`;var gr=`@.disabled`;var Gt=class{namespaceId;delegate;engine;_onDestroy;ɵtype=0;constructor(r,i,a,s){this.namespaceId=r,this.delegate=i,this.engine=a,this._onDestroy=s}get data(){return this.delegate.data}destroyNode(r){this.delegate.destroyNode?.(r)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(r,i){return this.delegate.createElement(r,i)}createComment(r){return this.delegate.createComment(r)}createText(r){return this.delegate.createText(r)}appendChild(r,i){this.delegate.appendChild(r,i),this.engine.onInsert(this.namespaceId,i,r,!1)}insertBefore(r,i,a,s=!0){this.delegate.insertBefore(r,i,a),this.engine.onInsert(this.namespaceId,i,r,s)}removeChild(r,i,a,s){if(s){this.delegate.removeChild(r,i,a,s);return}this.parentNode(i)&&this.engine.onRemove(this.namespaceId,i,this.delegate)}selectRootElement(r,i){return this.delegate.selectRootElement(r,i)}parentNode(r){return this.delegate.parentNode(r)}nextSibling(r){return this.delegate.nextSibling(r)}setAttribute(r,i,a,s){this.delegate.setAttribute(r,i,a,s)}removeAttribute(r,i,a){this.delegate.removeAttribute(r,i,a)}addClass(r,i){this.delegate.addClass(r,i)}removeClass(r,i){this.delegate.removeClass(r,i)}setStyle(r,i,a,s){this.delegate.setStyle(r,i,a,s)}removeStyle(r,i,a){this.delegate.removeStyle(r,i,a)}setProperty(r,i,a){i.charAt(0)==Dt&&i==gr?this.disableAnimations(r,!!a):this.delegate.setProperty(r,i,a)}setValue(r,i){this.delegate.setValue(r,i)}listen(r,i,a,s){return this.delegate.listen(r,i,a,s)}disableAnimations(r,i){this.engine.disableAnimations(r,i)}};var kn=class extends Gt{factory;constructor(r,i,a,s,l){super(i,a,s,l),this.factory=r,this.namespaceId=i}setProperty(r,i,a){i.charAt(0)==Dt?i.charAt(1)==`.`&&i==gr?(a=a===void 0?!0:!!a,this.disableAnimations(r,a)):this.engine.process(this.namespaceId,r,i.slice(1),a):this.delegate.setProperty(r,i,a)}listen(r,i,a,s){if(i.charAt(0)==Dt){let l=io(r),d=i.slice(1),m=``;return d.charAt(0)!=Dt&&([d,m]=ro(d)),this.engine.listen(this.namespaceId,l,d,m,h=>{let u=h._data||-1;this.factory.scheduleListenerCallback(u,a,h)})}return this.delegate.listen(r,i,a,s)}};function io(o){switch(o){case`body`:return document.body;case`document`:return document;case`window`:return window;default:return o}}function ro(o){let r=o.indexOf(`.`);return[o.substring(0,r),o.slice(r+1)]}var Ut=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(r,i,a){this.delegate=r,this.engine=i,this._zone=a,i.onRemovalComplete=(s,l)=>{l?.removeChild(null,s)}}createRenderer(r,i){let s=this.delegate.createRenderer(r,i);if(!r||!i?.data?.animation){let u=this._rendererCache,b=u.get(s);if(!b){let S=()=>u.delete(s);b=new Gt(``,s,this.engine,S),u.set(s,b)}return b}let l=i.id,d=i.id+`-`+this._currentId;this._currentId++,this.engine.register(d,r);let m=u=>{Array.isArray(u)?u.forEach(m):this.engine.registerTrigger(l,d,r,u.name,u)};return i.data.animation.forEach(m),new kn(this,d,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(r,i,a){if(r>=0&&r<this._microtaskId){this._zone.run(()=>i(a));return}let s=this._animationCallbacksBuffer;s.length==0&&queueMicrotask(()=>{this._zone.run(()=>
42{s.forEach(l=>{let[d,m]=l;d(m)}),this._animationCallbacksBuffer=[]})}),s.push([i,a])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(r){this.engine.flush(),this.delegate.componentReplaced?.(r)}};var oo=(()=>{class o extends at{constructor(i,a,s){super(i,a,s)}ngOnDestroy(){this.flush()}static ɵfac=function(a){return new(a||o)(E(Z),E(Ye),E(Ve))};static ɵprov=b({token:o,factory:o.ɵfac})}return o})();function so(){return new zt}function lo(){return new Ut(p(Ff),p(at),p(z$1))}var br=[{provide:Ve,useFactory:so},{provide:at,useClass:oo},{provide:sr$1,useFactory:lo}];[...br];var co=[{provide:Ye,useFactory:()=>new Jt},{provide:Ow,useFactory:()=>`BrowserAnimations`},...br];function Sr(){return pt$1(`NgEagerAnimations`),[...co]}var Er=`Documentation`;var yr=` | NestJS - A progressive Node.js framework`;var Mn=`https://docs.nestjs.com`;var wr=(()=>{class o{titleService;metaService;router;activatedRoute;document;robotsElement;constructor(i,a,s,l,d){this.titleService=i,this.metaService=a,this.router=s,this.activatedRoute=l,this.document=d}ngOnInit(){return V(this,null,function*(){this.router.events.pipe(Ve$1(i=>i instanceof Ze$1)).subscribe(i=>{this.updateTitle(),this.updateMeta(i),this.updateCanonical(i)})})}updateTitle(){let i=this.activatedRoute.snapshot.firstChild;if(!i)return;let a=i.firstChild;a=a.firstChild?a.firstChild:a;let{data:{title:s}}=a,d=(s||Er)+yr;this.titleService.setTitle(d),this.metaService.updateTag({property:`og:title`,content:d}),this.metaService.updateTag({name:`twitter:title`,content:d})}updateCanonical(i){let a=i.urlAfterRedirects.split(/[?#]/)[0],s=a===`/`?Mn:`${Mn}${a}`;this.document.head.querySelector(`link[rel="canonical"]`)?.setAttribute(`href`,s),this.metaService.updateTag({property:`og:url`,content:s})}updateMeta(i){if(!(i&&i.url))return;i.url.includes(`crud-utilities`)&&!this.robotsElement?this.robotsElement=this.metaService.addTag({name:`robots`,content:`noindex`}):this.robotsElement&&(this.metaService.removeTagElement(this.robotsElement),this.robotsElement=void 0)}static ɵfac=function(a){return new(a||o)(Ce(tD),Ce(s8),Ce(Et$1),Ce(ln$1),Ce(Z))};static ɵcmp=Qd({type:o,selectors:[[`app-root`]],decls:1,vars:0,template:function(a,s){a&1&&qa$1(0,`router-outlet`)},dependencies:[uh],encapsulation:2})}return o})();function _r({url:o}){return o.length>0&&/^v\d+$/.test(o[0].path)?`/`+o.slice(1).map(r=>r.path).join(`/`):`/`}var Cr=(()=>{class o{set(i,a){localStorage.setItem(i,JSON.stringify(a))}get(i){let a=localStorage.getItem(i);return a?JSON.parse(a):null}remove(i){this.get(i)&&localStorage.removeItem(i)}static ɵfac=function(a){return new(a||o)};static ɵprov=b({token:o,factory:o.ɵfac,providedIn:`root`})}return o})();function po(o,r){if(o&1){let i=PS();of(0,`span`,2),Rv(`click`,function(){kp(i);return Pp(VS().toggleTheme())}),gT(1,` light_mode `),sf()}}function ho(o,r){if(o&1){let i=PS();of(0,`span`,2),Rv(`click`,function(){kp(i);return Pp(VS().toggleTheme())}),gT(1,` dark_mode `),sf()}}var kr=(()=>{class o{document;storageService;changeDetector;theme;themeChangeCount=0;constructor(i,a,s){this.document=i,this.storageService=a,this.changeDetector=s}ngOnInit(){this.setTheme(this.getStoredTheme()??`dark`)}toggleTheme(i=!1){let a=this.theme===`dark`?`light`:`dark`;i||this.storageService.set(`theme`,a),this.setTheme(a)}getStoredTheme(){return this.storageService.get(`theme`)}setTheme(i){this.theme=i;let a=this.document.documentElement,s=++this.themeChangeCount;a.setAttribute(`data-suppress-transition`,``),a.setAttribute(`mode`,i);let l=()=>{this.themeChangeCount===s&&a.removeAttribute(`data-suppress-transition`)},d=this.document.defaultView;d?(d.requestAnimationFrame(()=>{d.requestAnimationFrame(l)}),setTimeout(l,100)):l(),this.changeDetector.detectChanges()}static ɵfac=function(a){return new(a||o)(Ce(Z),Ce(Cr),Ce(Jr$1))};static ɵcmp=Qd({type:o,selectors:[[`app-theme-mode-toggle`]],decls:3,vars:2,consts:[[1,`theme-mode-toggle`],[1,`material-icons`],[1,`material-icons`,3,`click`]],template:function(a,s){a&1&&(of(0,`button`,0),TS(1,po,2,0,`span`,1),TS(2,ho,2,0,`span`,1),sf()),a&2&&(LC(),_S(s.theme===`dark`?1:-1),LC(),_S(s.theme===`light`?2:-1))},styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
42left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%], [_nghost-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;float:right;padding-right:40px}@media only screen and (max-width:767px){[_nghost-%COMP%]{padding-right:20px}}@media only screen and (max-width:480px){[_nghost-%COMP%]{position:absolute;right:20px;padding-right:0}}.theme-mode-toggle[_ngcontent-%COMP%]{border:none;width:auto;overflow:visible;background:transparent;font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;margin:0 0 0 15px;color:var(--%NS%header-color);padding:0 0 0 15px;position:relative}@media only screen and (max-width:480px){.theme-mode-toggle[_ngcontent-%COMP%]{padding:0;margin:0}}.theme-mode-toggle[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:20px;cursor:pointer;background:var(--%NS%primary-gradient);-webkit-background-clip:text!important;-webkit-text-fill-color:transparent}@media only screen and (max-width:480px){.theme-mode-toggle[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{background:var(--%NS%header-color)}}.theme-mode-toggle[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]:before{content:"";position:absolute;background:var(--%NS%header-color);opacity:.2;left:0;top:2px;bottom:2px;width:2px}.theme-mode-toggle[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]:hover{background:var(--%NS%header-color)}@media only screen and (max-width:480px){.theme-mode-toggle[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]:hover{background:var(--%NS%primary-gradient);-webkit-background-clip:text!important;-webkit-text-fill-color:transparent}}@media only screen and (max-width:480px){.theme-mode-toggle[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:24px}.theme-mode-toggle[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]:before{display:none}}`],changeDetection:1})}return o})();var Pr=(()=>{class o{static ɵfac=function(a){return new(a||o)};static ɵcmp=Qd({type:o,selectors:[[`app-social-wrapper`]],decls:11,vars:0,consts:[[1,`social-wrapper`],[`href`,`https://twitter.com/nestframework`,`title`,`Twitter account`,`target`,`_blank`],[1,`fa-brands`,`fa-x-twitter`],[`href`,`https://github.com/nestjs/nest`,`title`,`Github repository`,`target`,`_blank`],[1,`fa-brands`,`fa-github`],[`href`,`https://stackoverflow.com/questions/tagged/nestjs`,`title`,`Stackoverflow`,`target`,`_blank`],[1,`fa-brands`,`fa-stack-overflow`],[`href`,`https://nestjs.com`,`title`,`NestJS - A node.js framework built on top of TypeScript`,`target`,`_blank`],[1,`fa`,`fa-globe`],[`href`,`https://discord.gg/G7Qnnhy`,`title`,`Discord`,`target`,`_blank`,`rel`,`nofollow`],[1,`fa-brands`,`fa-discord`]],template:function(a,s){a&1&&(of(0,`div`,0)(1,`a`,1),Tv(2,`i`,2),sf(),of(3,`a`,3),Tv(4,`i`,4),sf(),of(5,`a`,5),Tv(6,`i`,6),sf(),of(7,`a`,7),Tv(8,`i`,8),sf(),of(9,`a`,9),Tv(10,`i`,10),sf()())},styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%], .social-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
42left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%], .social-wrapper[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (max-width:480px){[_nghost-%COMP%]{position:absolute;top:50%;right:20px;transform:translateY(-50%)}}.social-wrapper[_ngcontent-%COMP%]{float:right;position:relative;display:flex}.social-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;vertical-align:middle;color:var(--%NS%header-color);font-size:18px;margin-left:15px;cursor:pointer}.social-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .discord-icon[_ngcontent-%COMP%]{fill:var(--%NS%header-color);position:relative}.social-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .discord-icon[_ngcontent-%COMP%]:hover{fill:var(--%NS%primary)}.social-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:first-of-type{font-size:20px}.social-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--%NS%primary)}@media only screen and (max-width:480px){.social-wrapper[_ngcontent-%COMP%]{top:0;transform:none}.social-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:none}}@media print{.social-wrapper[_ngcontent-%COMP%]{display:none}}`],changeDetection:1})}return o})();var uo=[`*`];var Tr=(()=>{class o{toggle=new be;isSidebarOpened=!0;static ɵfac=function(a){return new(a||o)};static ɵcmp=Qd({type:o,selectors:[[`app-header`]],inputs:{isSidebarOpened:`isSidebarOpened`},outputs:{toggle:`toggle`},ngContentSelectors:uo,decls:33,vars:2,consts:[[1,`icon-wrapper`,3,`click`],[1,`nav-icon`],[1,`mobile-nav-icon`],[`height`,`512pt`,`viewBox`,`0 -27 512 512`,`width`,`512pt`,`xmlns`,`http://www.w3.org/2000/svg`,1,`desktop-nav-icon`],[`d`,`m213.117188 81.011719c6.273437-5.488281 6.910156-15.027344 1.421874-21.300781-5.492187-6.273438-15.027343-6.910157-21.300781-1.421876l-2.597656 2.273438c-6.273437 5.488281-6.910156 15.027344-1.421875 21.300781 2.984375 3.410157 7.164062 5.15625 11.367188 5.15625 3.527343 0 7.070312-1.23
420469 9.933593-3.734375zm0 0`],[`d`,`m117.898438 120.203125-2.597657 2.273437c-6.273437 5.492188-6.910156 15.027344-1.421875 21.300782 2.984375 3.414062 7.164063 5.15625 11.367188 5.15625 3.527344 0 7.070312-1.226563 9.933594-3.730469l2.597656-2.273437c6.273437-5.492188 6.910156-15.027344 1.421875-21.300782-5.488281-6.277344-15.027344-6.914062-21.300781-1.425781zm0 0`],[`d`,`m216.179688 121.503906-2.597657 2.273438c-6.269531 5.492187-6.90625 15.027344-1.417969 21.300781 2.984376 3.414063 7.164063 5.15625 11.367188 5.15625 3.527344 0 7.070312-1.230469 9.933594-3.738281l2.597656-2.273438c6.273438-5.488281 6.910156-15.027344 1.417969-21.300781-5.488281-6.273437-15.023438-6.90625-21.300781-1.417969zm0 0`],[`d`,`m315.523438 70.039062.253906-3.441406c.609375-8.316406-5.636719-15.550781-13.949219-16.160156s-15.550781 5.636719-16.160156 13.949219l-.253907 3.441406c-.609374 8.316406 5.636719 15.550781 13.949219 16.160156.375.027344.75.042969 1.121094.042969 7.835937 0 14.457031-6.054688 15.039063-13.992188zm0 0`],[`d`,`m403.570312 96.273438c-5.109374-6.589844-14.589843-7.789063-21.179687-2.683594-6.589844 5.109375-7.789063 14.589844-2.683594 21.179687l2.117188 2.730469c2.976562 3.835938 7.433593 5.847656 11.941406 5.847656 3.230469 0 6.484375-1.035156 9.238281-3.167968 6.585938-5.105469 7.789063-14.589844 2.679688-21.179688zm0 0`],[`d`,`m325.449219 118.675781c-8.308594-.628906-15.550781 5.632813-16.164063 13.945313l-.253906 3.441406c-.613281 8.316406 5.632812 15.550781 13.945312 16.164062.378907.027344.753907.042969 1.125.042969 7.832032 0 14.453126-6.050781 15.039063-13.988281l.253906-3.441406c.613281-8.316406-5.632812-15.550782-13.945312-16.164063zm0 0`],[`d`,`m479.355469 183.492188v-22.644532c0-88.691406-72.15625-160.847656-160.847657-160.847656h-116.597656c-88.691406 0-160.847656 72.15625-160.847656 160.847656v19.882813c-23.519531 5.632812-41.0625 26.820312-41.0625 52.039062v3.253907c0 25.21875 17.542969 46.40625 41.0625 52.039062v26.367188c0 3.339843.507812 6.597656 1.441406 9.6875v2.667968c0 72.097656 58.652344 130.75 130.75 130.75h175.351563c72.097656 0 130.75-58.652344 130.75-130.75v-41.484375c19.167969-8.152343 32.644531-27.171875 32.644531-49.277343v-3.253907c0-22.109375-13.476562-41.125-32.644531-49.277343zm-408.101563-22.644532c0-72.046875 58.609375-130.65625 130.65625-130.65625h116.597656c72.046876 0 130.65625 58.609375 130.65625 130.65625v18.402344h-377.910156zm377.910156 165.9375c0 4.710938-3.179687 7-4.546874 7.765625-1.378907.769531-5.023438 2.296875-9.082032-.191406-1.34375-.824219-2.664062-1.664063-3.980468-2.503906-10.746094-6.835938-24.117188-15.347657-48.917969-15.347657-24.804688 0-38.175781 8.507813-48.917969 15.347657-9.328125 5.9375-16.699219 10.628906-32.707031 10.628906-16.007813 0-23.375-4.6875-32.703125-10.628906-10.746094-6.835938-24.113282-15.347657-48.917969-15.347657-24.800781 0-38.171875 8.511719-48.914063 15.347657-9.328124 5.9375-16.695312 10.628906-32.703124 10.628906-16.003907 0-23.375-4.6875-32.699219-10.628906-7.894531-5.023438-16.839844-10.714844-30.464844-13.5625-1.425781-.296875-2.53125-1.210938-3.042969-2.394531-.03125-.078126-.058594-.160157-.09375-.238282-.136718-.390625-.21875-.800781-.21875-1.230468v-24.886719h377.910156zm-100.558593 100.558594h-175.355469c-47.492188 0-87.398438-33.097656-97.871094-77.4375 4.75 1.863281 8.773438 4.421875 13.480469 7.417969 10.742187 6.839843 24.113281 15.351562 48.914063 15.351562 24.800781 0 38.171874-8.511719 48.914062-15.351562 9.328125-5.9375 16.695312-10.628907 32.703125-10.628907s23.375 4.691407 32.703125 10.628907c10.746094 6.839843 24.113281 15.351562 48.917969 15.351562 24.800781 0 38.171875-8.511719 48.917969-15.351562 9.328124-5.9375 16.695312-10.628907 32.703124-10.628907 16.007813 0 23.378907 4.691407 32.707032 10.628907 1.460937.929687 2.917968 1.859375 4.40625 2.769531 6.667968 4.089844 14.089844 6.027344 21.488281 5.828125-15.292969 36.0625-51.054687 61.421875-92.628906 61.421875zm133.203125-191.320312c0 12.863281-10.464844 23.328124-23.328125 23.328124h-404.960938c-12.863281 0-23.328125-10.464843-23.328125-23.328124v-3.253907c0-12.863281 10.464844-23.328125 23.328125-23.328125h404.960938c12.863281 0 23.328125 10.464844 23.328125 23.328125zm0 0`],[1,`menu-wrapper`],[`id`,`search`,1,`search-wrapper`],[`href`,`https://courses.nestjs.com`,`target`,`_blank`,`title`,`Courses | NestJS - A node.js framework built on top of TypeScript`],[`href`,`https://enterprise.nestjs.com`,`target`,`_blank`,`title`,`Enterprise | NestJS - A node.js framework built on top of TypeScript`],[`href`,`https://observe.nestjs.com`,`target`,`_blank`,`title`,`Observe | NestJS - A node.js framework built on top of TypeScript`],[1,`new`],[`href`,`https://mau.nestjs.com`,`target`,`_blank`,`title`,`Deploy Nest | NestJS - A node.js framework built on top of TypeScript`]],template:function(a,s){a&1&&($S(),Ra(0,`header`)(1,`button`,0),Wa$1(`click`,function(){return s.toggle.emit()}),Ra(2,`div`,1)(3,`div`,2),qa$1(4,`span`),rf(),qp(),Ra(5,`svg`,3),qa$1(6,`path`,4)(7,`path`,5)(8,`path`,6)(9,`path`,7)(10,`path`,8)(11,`path`,9)(12,`path`,10),rf()()(),zS(13),Wp(),qa$1(14,`app-theme-mode-toggle`)(15,`app-social-wrapper`),Ra(16,`div`,11),qa$1(17,`div`,12),Ra(18,`ul`)(19,`li`)(20,`a`,13),gT(21,`Courses`),rf()(),Ra(22,`li`)(23,`a`,14),gT(24,`Enterprise`),rf()(),Ra(25,`li`)(26,`a`,15)(27,`span`,16),gT(28,`NEW`),rf(),gT(29,` Observe`),rf()(),Ra(30,`li`)(31,`a`,17),gT
42(32,`Deploy with Mau `),rf()()()()()),a&2&&(LC(),kv(`opened`,s.isSidebarOpened))},dependencies:[kr,Pr],styles:[`.transition[_ngcontent-%COMP%], .icon-wrapper[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%], .menu-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%], .icon-wrapper[_ngcontent-%COMP%] .nav-icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%], .menu-wrapper[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{background:var(--%NS%header-glow),var(--%NS%header-background);-webkit-backdrop-filter:blur(14px) saturate(160%);backdrop-filter:blur(14px) saturate(160%);border:1px solid var(--%NS%panel-border-color);border-radius:var(--%NS%radius-lg);box-sizing:border-box;overflow:hidden;display:block;height:70px;position:fixed;top:12px;left:var(--%NS%shell-offset, 12px);right:var(--%NS%shell-offset, 12px);width:auto;z-index:10000}@media print{[_nghost-%COMP%]{position:relative;top:0;left:0;right:0}}.top-bar[_ngcontent-%COMP%]{background:#0a0a0a;text-align:center;height:35px;padding:4px;letter-spacing:.2px;box-sizing:border-box}.top-bar[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0}.top-bar[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff;font-weight:600;font-size:18px}@media only screen and (max-width:480px){.top-bar[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:15px}}.new[_ngcontent-%COMP%]{position:relative;display:inline-block;vertical-align:middle;line-height:1.35;overflow:hidden;animation:badge-glow 4.5s ease-out infinite}.new[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;pointer-events:none;background:conic-gradient(from var(--%NS%badge-angle),rgba(255,255,255,0) 0deg,rgba(255,255,255,.95) 45deg,rgba(255,255,255,0) 130deg,rgba(255,255,255,0) 360deg);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;animation:badge-border-spin 4.5s linear infinite}.new[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;bottom:0;left:0;width:40%;pointer-events:none;background:linear-gradient(90deg,transparent,rgba(255,255,255,.25),transparent);animation:badge-shimmer 4.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.new[_ngcontent-%COMP%]{animation:none}.new[_ngcontent-%COMP%]:before{animation:none}.new[_ngcontent-%COMP%]:after{display:none}}.new[_ngcontent-%COMP%]{background:var(--%NS%primary-gradient);font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 6px;border-radius:5px;margin-right:2px;-webkit-text-fill-color:#fff}header[_ngcontent-%COMP%]{display:block;position:relative;background:transparent;width:100%;height:100%;z-index:10000}.icon-wrapper[_ngcontent-%COMP%]{height:100%;width:80px;top:0;bottom:0;display:inline-block;position:relative;z-index:10000;border:none;background:transparent;background-color:var(--%NS%hover-surface-0)}.icon-wrapper[_ngcontent-%COMP%]:hover{cursor:pointer;background-color:var(--%NS%hover-surface)}.icon-wrapper.opened[_ngcontent-%COMP%]{width:280px}@media only screen and (max-width:1200px){.icon-wrapper.opened[_ngcontent-%COMP%]{width:280px}}@media only screen and (max-width:991px){.icon-wrapper.opened[_ngcontent-%COMP%]{width:80px}}.icon-wrapper[_ngcontent-%COMP%] .nav-icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:30px;height:30px;
42fill:var(--%NS%header-color)}@media only screen and (max-width:767px){.icon-wrapper[_ngcontent-%COMP%]{background:transparent}}@media(min-width:1201px){.icon-wrapper[_ngcontent-%COMP%]{display:none}}@media print{.icon-wrapper[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%] .logo-wrapper{display:inline-block;height:100%;text-align:center;vertical-align:top;padding-left:30px}@media only screen and (max-width:1200px){[_nghost-%COMP%] .logo-wrapper{padding-left:15px}}@media only screen and (max-width:767px){[_nghost-%COMP%] .logo-wrapper{padding-left:10px}}[_nghost-%COMP%] .logo-wrapper a{display:inline-block;padding-top:9px}@media print{[_nghost-%COMP%] .logo-wrapper{left:50%;position:relative;transform:translate(-50%);padding:0}}.menu-wrapper[_ngcontent-%COMP%]{position:relative;float:right;padding:14px 25px}@media(min-width:1500px){.menu-wrapper[_ngcontent-%COMP%]{margin-right:0}}@media(max-width:1499px){.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:first-of-type{display:none}.menu-wrapper[_ngcontent-%COMP%] .search-wrapper[_ngcontent-%COMP%]{margin-right:0}}@media(max-width:1350px){.menu-wrapper[_ngcontent-%COMP%]{padding:14px 5px}.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-of-type(3){display:none}}@media(max-width:1150px){.menu-wrapper[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:none!important}}@media(max-width:600px){.menu-wrapper[_ngcontent-%COMP%] .search-wrapper[_ngcontent-%COMP%]{display:none}}@media only screen and (max-width:1200px){.menu-wrapper[_ngcontent-%COMP%]{margin-right:0;padding:14px 5px}}@media only screen and (max-width:991px){.menu-wrapper[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:none!important}}@media only screen and (max-width:480px){.menu-wrapper[_ngcontent-%COMP%] .search-wrapper[_ngcontent-%COMP%]{display:none}}.menu-wrapper[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle;padding:0}.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle;margin-left:30px}.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:first-of-type{margin-left:0}.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-of-type a[_ngcontent-%COMP%]{display:inline-block;box-sizing:border-box;border:0;border-radius:var(--%NS%radius-btn);font-family:inherit;font-weight:700;letter-spacing:.01em;line-height:1.2;text-align:center;cursor:pointer;color:#fff;-webkit-text-fill-color:#fff;background-image:var(--%NS%primary-gradient);box-shadow:var(--%NS%btn-shadow)}.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-of-type a[_ngcontent-%COMP%]:hover{color:#fff;box-shadow:var(--%NS%btn-shadow-hover)}.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-of-type a[_ngcontent-%COMP%]{transition:transform .13s cubic-bezier(.25,.8,.25,1),filter .13s ease,box-shadow .13s ease;will-change:transform}.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-of-type a[_ngcontent-%COMP%]:hover{transform:translateY(-1px);filter:brightness(1.08)}.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-of-type a[_ngcontent-%COMP%]:active{transform:scale(.97);filter:brightness(.96)}@media(prefers-reduced-motion:reduce){.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-of-type a[_ngcontent-%COMP%]{transition:none}.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-of-type a[_ngcontent-%COMP%]:hover, .menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-of-type a[_ngcontent-%COMP%]:active{transform:none}}.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-of-type a[_ngcontent-%COMP%]{padding:9px 16px;font-size:12.5px}@media only screen and (max-width:1200px){.menu-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-left:20px}}.menu-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--%NS%header-color);text-transform:uppercase;font-size:13px;font-weight:700}.menu-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--%NS%primary-4dp)}@media print{.menu-wrapper[_ngcontent-%COMP%]{display:none}}.workshop-wrapper[_ngcontent-%COMP%]{float:right;padding:14px 25px}@media only screen and (max-width:767px){.workshop-wrapper[_ngcontent-%COMP%]{padding:23px 15px}}@media only screen and (max-width:480px){.workshop-wrapper[_ngcontent-%COMP%]{display:none}}.workshop-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:10px;width:55px}@media only screen and (max-width:767px){.workshop-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none!important}}.workshop-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .workshop-wrapper[_ngcontent-%COMP%] .workshop-info[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}.workshop-wrapper[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:15px;font-weight:400;color:#fff;margin:0}.workshop-wrapper[_ngcontent-%COMP%] .short-title[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:767px){.workshop-wrapper[_ngcontent-%COMP%] .short-title[_ngcontent-%COMP%]{display:block}}@media only screen and (max-width:767px){.workshop-wrapper[_ngcontent-%COMP%] .long-title[_ngcontent-%COMP%]{display:none}}.workshop-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#03a9f4;font-weight:600;font-size:12px;position:relative}.workshop-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--%NS%primary)}.workshop-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover:after{background:var(--%NS%primary)}.workshop-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:after{content:"";display:block;background:#246081;height:2px;left:0;right:0;bottom:-1px;position:absolute}.workshop-wrapper[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;padding:1px 2px;font-weight:700;background:-webkit-linear-gradient(#ee2943,#d31e5a);background:-o-linear-gradient(#ee2943,#d31e5a);background:-moz-linear-gradient(#ee2943,#d31e5a);background:linear-gradient(#ee2943,#d31e5a)}@media(max-width:480px){.workshop-wrapper[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .logo-wrapper{width:100%}.icon-wrapper[_ngcontent-%COMP%]{position:absolute}}.fa-stack-overflow[_ngcontent-%COMP%]{font-size:18px}.mobile-nav-icon[_ngcontent-%COMP%]{display:none;width:25px;margin-top:5px;cursor:pointer}@media only screen and (max-width:1200px){.mobile-nav-icon[_ngcontent-%COMP%]{display:inline-block}}.mobile-nav-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .mobile-nav-icon[_ngcontent-%COMP%]:after, .mobile-nav-icon[_ngcontent-%COMP%]:before{content:"";background:var(--%NS%header-color);display:block;height:2px;width:100%}.mobile-nav-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:6px 0}@media only screen and (max-width:1200px){.desktop-nav-icon[_ngcontent-%COMP%]{display:none}}.search-wrapper[_ngcontent-%COMP%]{margin-right:2em;height:100%;display:inline-flex;align-items:center;vertical-align:middle;position:relative}.search-icon[_ngcontent-%COMP%], [_nghost-%COMP%] .DocSearch-Search-Icon{position:absolute;margin-top:7px;color:#a5a5a5!important;font-size:14px;width:14px}@media(max-width:1150px){[_nghost-%COMP%] .DocSearch-Search-Icon{margin-top:0}}.search-input[_ngcontent-%COMP%], .DocSearch-Button{background:color-mix(in srgb,var(--%NS%header-color) 4%,transparent);border:1px solid var(--%NS%search-border);border-radius:999px;padding:6px 10px 6px 14px;color:var(--%NS%header-color);font-family:Manrope,Helvetica Neue,sans-serif;font-display:swap;font-size:13.5px;outline:0;transition:border-color .12s ease,background-color .12s ease;width:215px;box-sizing:border-box}.search-input[_ngcontent-%COMP%]:hover, .DocSearch-Button:hover{border-color:color-mix(in srgb,var(--%NS%header-color) 28%,transparent)}.search-input[_ngcontent-%COMP%]:active, .search-input[_ngcontent-%COMP%]:focus, .DocSearch-Button:active, .DocSearch-Button:focus{border-color:var(--%NS%primary)}.search-input[_ngcontent-%COMP%]:focus-visible, .DocSearch-Button:focus-visible{outline:2px solid var(--%NS%primary);outline-offset:2px}@media(max-width:1300px){.search-input[_ngcontent-%COMP%], .DocSearch-Button{width:190px}}.search-input[_ngcontent-%COMP%]::placeholder{color:#a5a5a5;opacity:1} .DocSearch-Button{display:inline-flex;align-items:center;gap:8px;color:#a5a5a5;
42cursor:pointer}[_nghost-%COMP%] .DocSearch-Search-Icon{position:static;margin-top:0} .DocSearch-Button-Container{display:flex;align-items:center;gap:8px;flex:1;min-width:0} .DocSearch-Button-Placeholder{padding-left:0;font-size:13.5px;margin-top:0;display:block!important;flex:1;text-align:left} .DocSearch-Button-Keys{display:inline-flex!important;gap:3px;margin-left:auto;min-width:0} .DocSearch-Button-Key{background:color-mix(in srgb,var(--%NS%header-color) 10%,transparent);box-shadow:none;border-radius:5px;color:#a5a5a5;font-family:inherit;font-size:11px;width:auto;min-width:18px;height:20px;padding:0 4px;margin-right:0;top:0;display:inline-flex;align-items:center;justify-content:center} .DocSearch-Button:active, .DocSearch-Button:focus, .DocSearch-Button:hover{color:#a5a5a5}.close-icon[_ngcontent-%COMP%]{position:absolute;right:0;width:15px;height:15px;top:10px;cursor:pointer;visibility:hidden;transition:all 90ms ease-in-out}.close-icon.visible[_ngcontent-%COMP%]{visibility:visible}.close-icon[_ngcontent-%COMP%]:after, .close-icon[_ngcontent-%COMP%]:before{content:"";background:var(--%NS%primary);display:block;height:2px;position:absolute;width:15px}.close-icon[_ngcontent-%COMP%]:after{transform:rotate(45deg) translateY(3px)}.close-icon[_ngcontent-%COMP%]:before{transform:rotate(-45deg) translateY(3px)}@media(max-width:1300px){.shop-link[_ngcontent-%COMP%]{display:none!important}}`]})}return o})();var Mr=$t(`openCloseAnimation`,[Xt(`false`,Ee({display:`none`})),Ct(`false => true`,[Ee(`*`),Ee({height:0,overflow:`hidden`}),_t(`250ms ease-out`,Ee({height:`*`}))]),Ct(`true => false`,[Ee({height:`*`,overflow:`hidden`}),_t(`250ms ease-in`,Ee({height:0}))])]);var Ar=()=>({exact:!0});function fo(o,r){o&1&&(Ra(0,`span`,4),gT(1,`NEW`),rf())}function xo(o,r){if(o&1&&(Ra(0,`i`,10),gT(1),rf()),o&2){let i=VS(2).$implicit;LC(),uf(` `,i.icon,` `)}}function go(o,r){if(o&1&&(Ra(0,`a`,9),TS(1,xo,2,1,`i`,10),gT(2),rf()),o&2){let i=VS().$implicit;kv(`pending`,i.isPending),Sv(`routerLink`,i.path)(`routerLinkActiveOptions`,CT(6,Ar)),LC(),_S(i.icon?1:-1),LC(),uf(` `,i.title,` `)}}function bo(o,r){if(o&1&&(Ra(0,`i`,10),gT(1),rf()),o&2){let i=VS(2).$implicit;LC(),uf(` `,i.icon,` `)}}function So(o,r){if(o&1&&(Ra(0,`a`,8),TS(1,bo,2,1,`i`,10),gT(2),rf()),o&2){let i=VS().$implicit;Sv(`href`,wT(i.externalUrl),Im),LC(),_S(i.icon?1:-1),LC(),uf(` `,i.title,` `)}}function Eo(o,r){if(o&1&&(Ra(0,`li`),TS(1,go,3,7,`a`,7),TS(2,So,3,4,`a`,8),rf()),o&2){let i=r.$implicit;LC(),_S(i.externalUrl?-1:1),LC(),_S(i.externalUrl?2:-1)}}function yo(o,r){if(o&1){let i=PS();Ra(0,`div`,2)(1,`div`,3),Wa$1(`click`,function(){kp(i);return Pp(VS().toggle())}),Ra(2,`h3`),TS(3,fo,2,0,`span`,4),gT(4),rf(),qa$1(5,`i`,5),rf(),Ra(6,`ul`,6),NS(7,Eo,3,2,`li`,null,MS),rf()()}if(o&2){let i=VS();kv(`opened`,i.isOpen),LC(3),_S(i.isNew?3:-1),LC(),Bv(i.title),LC(2),Sv(`@openCloseAnimation`,i.isOpen),LC(),RS(i.children)}}function vo(o,r){if(o&1&&(Ra(0,`i`,10),gT(1),rf()),o&2){let i=VS(3);LC(),uf(` `,i.icon,` `)}}function wo(o,r){o&1&&(Ra(0,`span`,4),gT(1,`NEW`),rf())}function _o(o,r){if(o&1&&(Ra(0,`a`,9)(1,`h3`),TS(2,vo,2,1,`i`,10),TS(3,wo,2,0,`span`,4),gT(4),rf()()),o&2){let i=VS(2);kv(`has-icon`,i.icon),Sv(`routerLink`,i.path)(`routerLinkActiveOptions`,CT(7,Ar)),LC(2),_S(i.icon?2:-1),LC(),_S(i.isNew?3:-1),LC(),uf(``,i.title,` `)}}function Co(o,r){if(o&1&&(Ra(0,`i`,10),gT(1),rf()),o&2){let i=VS(3);LC(),uf(` `,i.icon,` `)}}function ko(o,r){o&1&&(Ra(0,`span`,4),gT(1,`NEW`),rf())}function Po(o,r){if(o&1&&(Ra(0,`a`,8)(1,`h3`),TS(2,Co,2,1,`i`,10),TS(3,ko,2,0,`span`,4),gT(4),rf()()),o&2){let i=VS(2);Sv(`href`,wT(i.externalUrl),Im),LC(2),_S(i.icon?2:-1),LC(),_S(i.isNew?3:-1),LC(),uf(``,i.title,` `)}}function To(o,r){if(o&1&&(Ra(0,`div`,1),TS(1,_o,5,8,`a`,11),TS(2,Po,5,5,`a`,8),rf()
42),o&2){let i=VS();LC(),_S(i.externalUrl?-1:1),LC(),_S(i.externalUrl?2:-1)}}var Or=(()=>{class o{isOpen=!1;children=[];path;title;icon;externalUrl;isNew;toggle(){this.isOpen=!this.isOpen}static ɵfac=function(a){return new(a||o)};static ɵcmp=Qd({type:o,selectors:[[`app-menu-item`]],inputs:{isOpen:`isOpen`,children:`children`,path:`path`,title:`title`,icon:`icon`,externalUrl:`externalUrl`,isNew:`isNew`},decls:2,vars:1,consts:[[1,`nav-item`,3,`opened`],[1,`heading`],[1,`nav-item`],[1,`heading`,3,`click`],[1,`new`],[`aria-hidden`,`true`,1,`ph`,`ph-caret-right`,`arrow-icon`],[1,`sub-nav`],[`routerLinkActive`,`active`,3,`pending`,`routerLink`,`routerLinkActiveOptions`],[`target`,`_blank`,3,`href`],[`routerLinkActive`,`active`,3,`routerLink`,`routerLinkActiveOptions`],[1,`material-icons`],[`routerLinkActive`,`active`,3,`routerLink`,`routerLinkActiveOptions`,`has-icon`]],template:function(a,s){a&1&&TS(0,yo,9,5,`div`,0)(1,To,3,2,`div`,1),a&2&&_S(s.children?0:1)},dependencies:[ZN,Kc],styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{position:relative;display:block}h3[_ngcontent-%COMP%]{text-transform:uppercase;font-weight:700;color:var(--%NS%color-1dp);-webkit-text-fill-color:var(--%NS%color-1dp);font-size:13px;letter-spacing:.08em;margin:10px 0;transition:color .15s ease,-webkit-text-fill-color .15s ease}h3[_ngcontent-%COMP%]:hover{color:var(--%NS%primary);-webkit-text-fill-color:var(--%NS%primary)}.new[_ngcontent-%COMP%]{position:relative;display:inline-block;vertical-align:middle;line-height:1.35;overflow:hidden;animation:badge-glow 4.5s ease-out infinite}.new[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;pointer-events:none;background:conic-gradient(from var(--%NS%badge-angle),rgba(255,255,255,0) 0deg,rgba(255,255,255,.95) 45deg,rgba(255,255,255,0) 130deg,rgba(255,255,255,0) 360deg);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;animation:badge-border-spin 4.5s linear infinite}.new[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;bottom:0;left:0;width:40%;pointer-events:none;background:linear-gradient(90deg,transparent,rgba(255,255,255,.25),transparent);animation:badge-shimmer 4.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.new[_ngcontent-%COMP%]{animation:none}.new[_ngcontent-%COMP%]:before{animation:none}.new[_ngcontent-%COMP%]:after{display:none}}.new[_ngcontent-%COMP%]{color:#fff;background:var(--%NS%primary-gradient);font-size:10.5px;letter-spacing:.04em;padding:2px 6px;margin-right:5px;font-weight:700;border-radius:5px;-webkit-text-fill-color:#fff}.active[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--%NS%primary);-webkit-text-fill-color:var(--%NS%primary)}.material-icons[_ngcontent-%COMP%]{margin-right:5px}.arrow-icon[_ngcontent-%COMP%]{-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg);position:absolute;top:2px;right:20px;font-size:15px;line-height:1;cursor:pointer;color:var(--%NS%color);
42transition:transform .2s cubic-bezier(.7,0,.3,1),color .15s ease}li[_ngcontent-%COMP%]{display:block;padding:1px 0}li[_ngcontent-%COMP%]:first-of-type{padding-top:0}li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--%NS%menu-color);font-size:14px;text-decoration:none;cursor:pointer;display:block;padding:5px 10px;margin-left:-10px;border-radius:var(--%NS%radius-sm);background-color:var(--%NS%hover-surface-0);transition:color .12s ease,background-color .12s ease}li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--%NS%color-1dp);background-color:var(--%NS%hover-surface)}li[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{font-weight:600;color:var(--%NS%primary);-webkit-text-fill-color:var(--%NS%primary);background-color:var(--%NS%active-surface)}li[_ngcontent-%COMP%] .pending[_ngcontent-%COMP%]{color:#afafaf!important;pointer-events:none}.nav-item[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:10px 0 15px}.nav-item[_ngcontent-%COMP%] .arrow-icon[_ngcontent-%COMP%]{color:var(--%NS%color)}.nav-item.opened[_ngcontent-%COMP%] .arrow-icon[_ngcontent-%COMP%]{-moz-transform:rotate(-90deg);-o-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-webkit-transform:rotate(-90deg);transform:rotate(-90deg);color:var(--%NS%primary)}.heading[_ngcontent-%COMP%]{cursor:pointer}.heading[_ngcontent-%COMP%]:hover .arrow-icon[_ngcontent-%COMP%]{color:var(--%NS%primary)}ul[_ngcontent-%COMP%]{padding-left:15px}.material-icons[_ngcontent-%COMP%]{font-size:14px;margin-left:3px;vertical-align:middle;padding-bottom:4px}.has-icon[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--%NS%primary);-webkit-text-fill-color:var(--%NS%primary)}`],data:{animation:[Mr]}})}return o})();var ot=[{title:`Introduction`,isOpened:!1,path:`/`},{title:`Overview`,isOpened:!0,children:[{title:`First steps`,path:`/first-steps`},{title:`Controllers`,path:`/controllers`},{title:`Providers`,path:`/providers`},{title:`Modules`,path:`/modules`},{title:`Middleware`,path:`/middleware`},{title:`Exception filters`,path:`/exception-filters`},{title:`Pipes`,path:`/pipes`},{title:`Guards`,path:`/guards`},{title:`Interceptors`,path:`/interceptors`},{title:`Custom decorators`,path:`/custom-decorators`}]},{title:`Fundamentals`,isOpened:!1,children:[{title:`Custom providers`,path:`/fundamentals/custom-providers`},{title:`Asynchronous providers`,path:`/fundamentals/async-providers`},{title:`Dynamic modules`,path:`/fundamentals/dynamic-modules`},{title:`Injection scopes`,path:`/fundamentals/injection-scopes`},{title:`Circular dependency`,path:`/fundamentals/circular-dependency`},{title:`Module reference`,path:`/fundamentals/module-ref`},{title:`Lazy-loading modules`,path:`/fundamentals/lazy-loading-modules`},{title:`Execution context`,path:`/fundamentals/execution-context`},{title:`Lifecycle events`,path:`/fundamentals/lifecycle-events`},{title:`Discovery service`,path:`/fundamentals/discovery-service`},{title:`Platform agnosticism`,path:`/fundamentals/platform-agnosticism`},{title:`Testing`,path:`/fundamentals/testing`}]},{title:`Application`,isOpened:!1,children:[{title:`Configuration`,path:`/application/configuration`},{title:`Validation`,path:`/application/validation`},{title:`Serialization`,path:`/application/serialization`},{title:`Logging`,path:`/application/logger`},{title:`Events`,path:`/application/events`},{title:`Task scheduling`,path:`/application/task-scheduling`},{title:`Queues`,path:`/application/queues`},{title:`HTTP client`,path:`/application/http-client`}]},{title:`Data`,isOpened:!1,children:[{title:`Overview`,path:`/data/overview`},{title:`TypeORM`,path:`/data/typeorm`},{title:`Drizzle`,path:`/data/drizzle`},{title:`MongoDB`,path:`/data/mongodb`},{title:`Prisma`,path:`/data/prisma`},{title:`MikroORM`,path:`/data/mikroorm`},{title:`Sequelize`,path:`/data/sequelize`},{title:`Caching`,path:`/data/caching`}]},{title:`Security`,isOpened:!1,children:[{title:`Authentication`,path:`/security/authentication`},{title:`Authorization`,path:`/security/authorization`},{title:`Encryption and Hashing`,path:`/security/encryption-and-hashing`},{title:`Security headers`,path:`/security/helmet`},{title:`CORS`,path:`/security/cors`},{title:`CSRF Protection`,path:`/security/csrf`},{title:`Rate limiting`,path:`/security/rate-limiting`}]},{title:`HTTP`,isOpened:!1,children:[{title:`Versioning`,path:`/http/versioning`},{title:`Cookies`,path:`/http/cookies`},{title:`Session`,path:`/http/session`},{title:`File upload and streaming`,path:`/http/file-upload`},{title:`Compression`,path:`/http/compression`},{title:`Server-Sent Events`,path:`/http/server-sent-events`},{title:`Model-View-Controller`,path:`/http/mvc`},{title:`Performance (Fastify)`,path:`/http/performance`}]},{title:`Observability`,isNew:!0,isOpened:!1,children:[{title:`Overview`,path:`/observability/overview`},{title:`SDK`,path:`/observability/sdk`},{title:`Manual instrumentation`,path:`/observability/manual-instrumentation`},{title:`Distributed tracing`,path:`/observability/distributed-tracing`},{title:`Error monitoring`,path:`/observability/error-monitoring`},{title:`Dashboard`,path:`/observability/dashboard`},{title:`MCP server`,path:`/observability/mcp-server`}]},{title:`GraphQL`,isOpened:!1,children:[{title:`Quick start`,path:`/graphql/quick-start`},{title:`Resolvers`,path:`/graphql/resolvers`},{title:`Mutations`,path:`/graphql/mutations`},{title:`Subscriptions`,path:`/graphql/subscriptions`},{title:`Scalars`,path:`/graphql/scalars`},{title:`Directives`,path:`/graphql/directives`},{title:`Interfaces`,path:`/graphql/interfaces`},{title:`Unions and Enums`,path:`/graphql/unions-and-enums`},{title:`Field middleware`,path:`/graphql/field-middleware`},{title:`Mapped types`,path:`/graphql/mapped-types`},{title:`Plugins`,path:`/graphql/plugins`},{title:`Complexity`,path:`/graphql/complexity`},{title:`Extensions`,path:`/graphql/extensions`},{title:`CLI Plugin`,path:`/graphql/cli-plugin`},{title:`Generating SDL`,path:`/graphql/generating-sdl`},{title:`Sharing models`,path:`/graphql/sharing-models`},{title:`Other features`,path:`/graphql/other-features`},{title:`Federation`,path:`/graphql/federation`}]},{title:`WebSockets`,isOpened:!1,children:[{title:`Gateways`,path:`/websockets/gateways`},{title:`Exception filters`,path:`/websockets/exception-filters`},{title:`Pipes`,path:`/websockets/pipes`},{title:`Guards`,path:`/websockets/guards`},{title:`Interceptors`,path:`/websockets/interceptors`},{title:`Adapters`,path:`/websockets/adapter`}]},{title:`Microservices`,isOpened:!1,children:[{title:`Overview`,path:`/microservices/basics`},{title:`Redis`,path:`/microservices/redis`},{title:`MQTT`,path:`/microservices/mqtt`},{title:`NATS`,path:`/microservices/nats`},{title:`RabbitMQ`,path:`/microservices/rabbitmq`},{title:`Kafka`,path:`/microservices/kafka`},{title:`gRPC`,path:`/microservices/grpc`},{title:`Custom transporters`,path:`/microservices/custom-transport`},{title:`Exception filters`,path:`/microservices/exception-filters`},{title:`Pipes`,path:`/microservices/pipes`},{title:`Pre-request hooks`,path:`/microservices/pre-request-hooks`},{title:`Guards`,path:`/microservices/guards`},{title:`Interceptors`,path:`/microservices/interceptors`}]},{title:`Deployment`,path:`/deployment`},{title:`Standalone apps`,isOpened:!1,path:`/standalone-applications`},{title:`CLI`,isOpened:!1,children:[{title:`Overview`,path:`/cli/overview`},{title:`Workspaces`,path:`/cli/monorepo`},{title:`Libraries`,path:`/cli/libraries`},{title:`Usage`,path:`/cli/usages`},{title:`Scripts`,path:`/cli/scripts`}]},{title:`OpenAPI`,isOpened:!1,children:[{title:`Introduction`,path:`/openapi/introduction`},{title:`Types and Parameters`,path:`/openapi/types-and-parameters`},{title:`Operations`,path:`/openapi/operations`},{title:`Security`,path:`/openapi/security`},{title:`Mapped Types`,path:`/openapi/mapped-types`},{title:`Decorators`,path:`/openapi/decorators`},{title:`CLI Plugin`,path:`/openapi/cli-plugin`},{title:`Other features`,path:`/openapi/other-features`}]},{title:`Recipes`,isOpened:!1,children:[{title:`REPL`,path:`/recipes/repl`},{title:`CRUD generator`,path:`/recipes/crud-generator`},{title:`SWC (fast compiler)`,path:`/recipes/swc`},{title:`Passport (auth)`,path:`/recipes/passport`},{title:`Hot reload`,path:`/recipes/hot-reload`},{title:`Router module`,path:`/recipes/router-module`},{title:`Health checks`,path:`/recipes/terminus`},{title:`CQRS`,path:`/recipes/cqrs`},{title:`Serve static`,path:`/recipes/serve-static`},{title:`Commander`,path:`/recipes/nest-commander`},{title:`Async local storage`,path:`/recipes/async-local-storage`}]},{title:`FAQ`,isOpened:!1,children:[{title:`Serverless`,path:`/faq/serverless`},{title:`HTTP adapter`,path:`/faq/http-adapter`},{title:`Keep-Alive connections`,path:`/faq/keep-alive-connections`},{title:`Global path prefix`,path:`/faq/global-prefix`},{title:`Raw body`,path:`/faq/raw-body`},{title:`Hybrid application`,path:`/faq/hybrid-application`},{title:`HTTPS & multiple servers`,path:`/faq/multiple-servers`},{title:`Request lifecycle`,path:`/faq/request-lifecycle`},{title:`Common errors`,path:`/faq/common-errors`},{title:`Examples`,externalUrl:`https://github.com/nestjs/nest/tree/master/sample`}]},{title:`Devtools`,isOpened:!1,children:[{title:`Overview`,path:`/devtools/overview`},{title:`CI/CD integration`,path:`/devtools/ci-cd-integration`}]},{title:`Migration guide`,isOpened:!1,path:`/migration-guide`},{title:`API Reference`,externalUrl:`https://api-references-nestjs.netlify.app/`},{title:`Official courses`,externalUrl:`https://courses.nestjs.com/`},{title:`Discover`,isOpened:!1,children:[{title:`Who is using Nest?`,path:`/discover/companies`},{title:`Jobs board`,externalUrl:`https://jobs.nestjs.com/`}]}
42,{title:`Support us`,isOpened:!1,path:`/support`}];function Mo(o,r){if(o&1&&qa$1(0,`app-menu-item`,1),o&2){let i=r.$implicit;Sv(`isOpen`,i.isOpened)(`title`,i.title)(`externalUrl`,i.externalUrl)(`isNew`,i.isNew)(`icon`,i.icon)(`path`,i.path)(`children`,i.children)}}var Nr=(()=>{class o{route;router;isSidebarOpened=!0;items=structuredClone(ot);constructor(i,a){this.route=i,this.router=a}ngOnInit(){this.router.events.pipe(Ve$1(i=>i instanceof Ze$1)).subscribe(()=>this.toggleCategory()),this.toggleCategory()}toggleCategory(){let{firstChild:i}=this.route.snapshot;if(i.url&&i.url[1]||i.url&&i.routeConfig&&i.routeConfig.loadChildren){let{path:a}=i.url[0],s=this.items.findIndex(({title:l})=>l.toLowerCase()===a);if(s<0)return;this.items[s].isOpened=!0,this.items[1].isOpened=!1}}static ɵfac=function(a){return new(a||o)(Ce(ln$1),Ce(Et$1))};static ɵcmp=Qd({type:o,selectors:[[`app-menu`]],inputs:{isSidebarOpened:`isSidebarOpened`},decls:7,vars:0,consts:[[`aria-label`,`Documentation`,1,`nav-container`,3,`click`],[1,`nav-item`,3,`isOpen`,`title`,`externalUrl`,`isNew`,`icon`,`path`,`children`],[`href`,`https://enterprise.nestjs.com`,`target`,`_blank`,`title`,`Enterprise | NestJS - A node.js framework built on top of TypeScript`,1,`btn`,`btn-support`],[`href`,`https://docs.nestjs.com/v11`,1,`btn`,`btn-version`]],template:function(a,s){a&1&&(Ra(0,`nav`,0),Wa$1(`click`,function(d){return d.stopPropagation()}),NS(1,Mo,1,7,`app-menu-item`,1,MS),Ra(3,`a`,2),gT(4,`Get enterprise support`),rf(),Ra(5,`a`,3),gT(6,`See Version 11`),rf()()),a&2&&(LC(),RS(s.items))},dependencies:[Or],styles:[`.transition[_ngcontent-%COMP%], [_nghost-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%], [_nghost-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{-moz-transform:translateX(calc(-100% - var(--%NS%shell-offset-vw, 12px)));-o-transform:translateX(calc(-100% - var(--%NS%shell-offset-vw, 12px)));-ms-transform:translateX(calc(-100% - var(--%NS%shell-offset-vw, 12px)));-webkit-transform:translateX(calc(-100% - var(--%NS%shell-offset-vw, 12px)));transform:translate(calc(-100% - var(--%NS%shell-offset-vw, 12px)));padding:28px 22px 40px 28px;width:280px;background:var(--%NS%menu-glow),var(--%NS%menu-background)!important;-webkit-backdrop-filter:blur(18px) saturate(150%);backdrop-filter:blur(18px) saturate(150%);border:1px solid var(--%NS%panel-border-color);border-radius:var(--%NS%radius-lg);box-shadow:inset 0 1px #ffffff0a;position:fixed!important;bottom:12px;top:94px;left:var(--%NS%shell-offset, 12px);z-index:1000;overflow:overlay}.opened[_nghost-%COMP%]{-moz-transform:translateX(0);-o-transform:translateX(0);-ms-transform:translateX(0);-webkit-transform:translateX(0);transform:translate(0)}@media only screen and (max-width:1200px){[_nghost-%COMP%]{width:280px}}@media only screen and (max-width:991px){.opened[_nghost-%COMP%]{z-index:1000;box-shadow:0 10px 40px #0000001a}}@media only screen and (max-width:767px){[_nghost-%COMP%]{padding:20px 25px}}@media only screen and (max-width:480px){[_nghost-%COMP%]{width:calc(100% - 24px)}}@media print{[_nghost-%COMP%]{display:none}}.nav-item[_ngcontent-%COMP%]{margin:0 -10px;padding:0 10px}.nav-item[_ngcontent-%COMP%]:last-of-type{border:0}.nav-item[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:20px 0}.btn-version[_ngcontent-%COMP%], .btn-support[_ngcontent-%COMP%]{transition:transform .13s cubic-bezier(.25,.8,.25,1),filter .13s ease,box-shadow .13s ease;will-change:transform}.btn-version[_ngcontent-%COMP%]:hover, .btn-support[_ngcontent-%COMP%]:hover{transform:translateY(-1px);filter:brightness(1.08)}.btn-version[_ngcontent-%COMP%]:active, .btn-support[_ngcontent-%COMP%]:active{transform:scale(.97);filter:brightness(.96)}@media(prefers-reduced-motion:reduce){.btn-version[_ngcontent-%COMP%], .btn-support[_ngcontent-%COMP%]{transition:none}.btn-version[_ngcontent-%COMP%]:hover, .btn-version[_ngcontent-%COMP%]:active, .btn-support[_ngcontent-%COMP%]:hover, .btn-support[_ngcontent-%COMP%]:active{transform:none}}.btn-version[_ngcontent-%COMP%], .btn-support[_ngcontent-%COMP%]{padding:11px 14px;font-size:12.5px;text-transform:uppercase;letter-spacing:.05em;text-align:center;
42width:calc(100% - 10px);display:block}.btn-version[_ngcontent-%COMP%]{display:inline-block;box-sizing:border-box;border:0;border-radius:var(--%NS%radius-btn);font-family:inherit;font-weight:700;letter-spacing:.01em;line-height:1.2;text-align:center;cursor:pointer;color:var(--%NS%color-1dp);background-color:var(--%NS%hover-surface-0);box-shadow:inset 0 0 0 1px var(--%NS%border-color-strong)}.btn-version[_ngcontent-%COMP%]:hover{color:var(--%NS%color-1dp);background-color:var(--%NS%hover-surface)}.btn-version[_ngcontent-%COMP%]{margin-top:5px}.btn-support[_ngcontent-%COMP%]{display:inline-block;box-sizing:border-box;border:0;border-radius:var(--%NS%radius-btn);font-family:inherit;font-weight:700;letter-spacing:.01em;line-height:1.2;text-align:center;cursor:pointer;color:#fff;-webkit-text-fill-color:#fff;background-image:var(--%NS%primary-gradient);box-shadow:var(--%NS%btn-shadow)}.btn-support[_ngcontent-%COMP%]:hover{color:#fff;box-shadow:var(--%NS%btn-shadow-hover)}.btn-support[_ngcontent-%COMP%]{margin-top:20px}`]})}return o})();var Ao=[`tocWrapper`];function Oo(o,r){o&1&&(of(0,`div`,2),gT(1,`On this page`),sf())}function No(o,r){if(o&1){let i=PS();of(0,`li`)(1,`a`,4),Rv(`click`,function(s){let l=kp(i).$implicit;return Pp(VS().navigateToAnchor(s,l.elementRef))}),gT(2),sf()()}if(o&2){let i=r.$implicit,a=r.$index,s=VS();kv(`current`,a===s.activeId),Ga$1(`id`,i.id),LC(),Mv(`href`,IT(``,s.currentURL(),`#`,i.elementRef.id),Im),LC(),uf(` `,i.textContent,` `)}}var Ir=(()=>{class o{cd;renderer;contentReference;headings=[];activeId;tocWrapper;isPositionFixed=!0;scrollTopOffset=100;scrollDebounceTime=10;scrollSubscription;timerSubscription;maxTopOffset;constructor(i,a){this.cd=i,this.renderer=a}ngOnInit(){this.scrollSubscription=wu(window,`scroll`).pipe(XE(this.scrollDebounceTime)).subscribe(()=>{this.findCurrentHeading(),this.checkViewportBoundaries()}),this.init(),this.updateOffsetTop()}ngOnChanges(){this.init(),this.updateOffsetTop()}ngOnDestroy(){this.scrollSubscription&&this.scrollSubscription.unsubscribe(),this.timerSubscription&&this.timerSubscription.unsubscribe()}init(){this.lookupHeadings(),this.findCurrentHeading(),this.findMaxTopOffset()}lookupHeadings(){if(!this.contentReference)return;let i=this.contentReference.querySelectorAll(`h3, h4`),a=s=>{let l=s&&s.indexOf(`#`);return l>=0?s.slice(0,l):s};this.headings=Array.from(i).map((s,l)=>({id:l,offsetTop:s.offsetTop,textContent:a(s.textContent),elementRef:s}))}updateOffsetTop(){this.timerSubscription=KE(600,200).pipe(zt$1(3)).subscribe(()=>this.init())}navigateToAnchor(i,a){a&&this.findCurrentHeading()}findCurrentHeading(){let a=s=>{let l=this.activeId!==s;this.activeId=s,l&&this.cd.markForCheck()};for(let s=0;s<this.headings.length;s++){if(this.headings.length-1===s)return a(s);if(this.headings[s+1].offsetTop>=window.pageYOffset+this.scrollTopOffset+15)return a(s)}}findMaxTopOffset(){if(!this.tocWrapper)return;let{nativeElement:i}=this.tocWrapper,a=document.querySelector(`.page-wrapper`);if(!a||!i)return;let s=a.scrollHeight,l=i.scrollHeight;this.maxTopOffset=s-l-this.scrollTopOffset}currentURL(){return window.location.href.split(`#`)[0]}checkViewportBoundaries(){this.isPositionFixed=this.maxTopOffset>window.pageYOffset;let{nativeElement:i}=this.tocWrapper;this.isPositionFixed?(this.renderer.removeStyle(i,`top`),this.renderer.removeStyle(i,`position`)):(this.renderer.setStyle(i,`top`,this.maxTopOffset+150+`px`),this.renderer.setStyle(i,`position`,`absolute`))}trackById(i,a){return a.id}static ɵfac=function(a){return new(a||o)(Ce(Jr$1),Ce(Mn$1))};static ɵcmp=Qd({type:o,selectors:[[`app-toc`]],viewQuery:function(a,s){if(a&1&&Av(Ao,7),a&2){let l;af(l=cf())&&(s.tocWrapper=l.first)}},inputs:{contentReference:`contentReference`,headings:`headings`},features:[ur$1],decls:6,vars:1,consts:[[`tocWrapper`,``],[`perfectScrollbar`,``,1,`toc-wrapper`],[1,`toc-label`],[3,`current`],[3,`click`,`href`]],template:function(a,s){a&1&&(of(0,`div`,1,0),TS(2,Oo,2,0,`div`,2),of(3,`ul`),NS(4,No,3,7,`li`,3,s.trackById,!0),sf()()),a&2&&(LC(2),_S(s.headings&&s.headings.length?2:-1),LC(2),RS(s.headings)
42)},styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%], .toc-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.toc-wrapper[_ngcontent-%COMP%]{--%NS%toc-top: 106px;--%NS%ad-reserve: 0px;width:var(--%NS%rail-outer-width, 250px);padding-left:var(--%NS%rail-indent, 45px);box-sizing:border-box;position:fixed;top:var(--%NS%toc-top);right:var(--%NS%rail-right);z-index:50;max-height:max(180px,100vh - var(--%NS%toc-top) - var(--%NS%ad-reserve));overflow-y:auto}@media print{.toc-wrapper[_ngcontent-%COMP%]{display:none}}.toc-wrapper[_ngcontent-%COMP%] .toc-label[_ngcontent-%COMP%]{text-transform:uppercase;font-size:11.5px;font-weight:700;letter-spacing:.1em;color:color-mix(in srgb,var(--%NS%color) 70%,transparent);margin-bottom:10px}.toc-wrapper[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{position:relative;padding:0;margin:0;border-left:1px solid var(--%NS%border-color)}.toc-wrapper[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:block;position:relative;margin:0;font-size:13px}.toc-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:block;color:color-mix(in srgb,var(--%NS%color) 85%,transparent);font-weight:400;line-height:1.45;padding:5px 0 5px 16px;margin-left:-1px;border-left:2px solid transparent}.toc-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--%NS%color-1dp);border-left-color:var(--%NS%border-color-strong)}.toc-wrapper[_ngcontent-%COMP%] .current[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--%NS%primary);border-left-color:var(--%NS%primary);font-weight:600}.page-wrapper:has(.carbon-wrapper:not(.hide) #carbonads)[_nghost-%COMP%] .toc-wrapper[_ngcontent-%COMP%], .page-wrapper:has(.carbon-wrapper:not(.hide) #carbonads) [_nghost-%COMP%] .toc-wrapper[_ngcontent-%COMP%]{--%NS%ad-reserve: 370px}`]})}return o})();var jr=(()=>{class o{httpClient;constructor(i){this.httpClient=i}addToNewsletter(i){return PE(this.httpClient.post(`https://nbdggbnqnrevwg6xlex3st3vpe0nyhiq.lambda-url.us-east-2.on.aws/?token=db1f899025b5a59a76b6b34b2a013893`,{email:i}).pipe(Wn(()=>Ee$1)))}static ɵfac=function(a){return new(a||o)(E(Uy))};static ɵprov=b({token:o,factory:o.ɵfac,providedIn:`root`})}return o})();var Rr=(()=>{class o{newsletterService;cd;isDisabled;isEmailAdded;constructor(i,a){this.newsletterService=i,this.cd=a}addToNewsletter(i,a){return V(this,null,function*(){i.preventDefault(),this.isDisabled=!0,this.cd.markForCheck(),yield this.newsletterService.addToNewsletter(a),this.isEmailAdded=!0,this.cd.markForCheck()})}static ɵfac=function(a){return new(a||o)(Ce(jr),Ce(Jr$1))};static ɵcmp=Qd({type:o,selectors:[[`app-newsletter`]],decls:14,vars:4,consts:[[`email`,``],[1,`newsletter-wrapper`],[1,`signup`],[1,`hgroup`],[1,`newsletter-form`],[1,`form-wrapper`,3,`submit`],[`id`,`newsletter-email`,`name`,`email`,`type`,`email`,`placeholder`,`Email address..`,`required`,``,1,`form-control`,3,`disabled`],[`type`,`submit`,`aria-label`,`Signup to Newsletter`,1,`signup-button`,3,`disabled`],[1,`far`,`fa-paper-plane`],[1,`icon-success`,`fas`,`fa-check-circle`]],template:function(a,s){if(a&1){let l=PS();of(0,`div`,1)(1,`div`,2)(2,`div`,3)(3,`h3`),gT(4,`Join our Newsletter`),sf(),of(5,`p`),gT(6,` Subscribe to stay up to date with the latest Nest updates, features, and videos! `),sf()(),of(7,`div`,4)(8,`form`,5),Rv(`submit`,function(m){kp(l);let h=qS(10);return Pp(s.addToNewsletter(m,h.value))}),Tv(9,`input`,6,0),of(11,`button`,7),Tv(12,`i`,8)(13,`i`,9),sf()()()()()}a&2&&(LC(9),Mv(`disabled`,s.isDisabled),LC(2),kv(`btn-success`,s.isEmailAdded),Mv(`disabled`,s.isDisabled))},styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
42left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.newsletter-wrapper[_ngcontent-%COMP%]{background:radial-gradient(700px 260px at 92% -30%,rgba(234,40,69,.16),transparent 60%),var(--%NS%background-1dp);border:1px solid var(--%NS%panel-border-color);border-radius:var(--%NS%radius-lg);box-sizing:border-box;padding:36px 40px;overflow:hidden;position:relative;margin:50px 0 30px;width:auto}@media only screen and (max-width:1200px){.newsletter-wrapper[_ngcontent-%COMP%]{padding:36px 40px}}@media only screen and (max-width:767px){.newsletter-wrapper[_ngcontent-%COMP%]{padding:30px 20px;text-align:center}}.newsletter-wrapper[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin:0 0 4px;color:var(--%NS%color-1dp)}.newsletter-wrapper[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:14px;margin:0;color:var(--%NS%color);font-weight:500;line-height:22px}.newsletter-wrapper[_ngcontent-%COMP%] .hgroup[_ngcontent-%COMP%], .newsletter-form[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}.newsletter-form[_ngcontent-%COMP%]{text-align:right;width:40%;position:relative;margin-top:5px}.newsletter-wrapper[_ngcontent-%COMP%] .hgroup[_ngcontent-%COMP%]{width:60%;float:left;position:relative}.newsletter-form[_ngcontent-%COMP%] .form-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;max-width:420px;display:inline-block;vertical-align:middle}.newsletter-form[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border:1px solid var(--%NS%border-color);font-size:14px;font-family:Manrope,sans-serif;height:40px;padding:10px 66px 10px 20px;background:var(--%NS%background);color:var(--%NS%color);width:100%;border-radius:var(--%NS%radius-btn);vertical-align:middle;box-sizing:border-box;outline:0}.newsletter-form[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{border-color:var(--%NS%primary)}.newsletter-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:inline-block;box-sizing:border-box;border:0;border-radius:var(--%NS%radius-btn);font-family:inherit;font-weight:700;letter-spacing:.01em;line-height:1.2;text-align:center;cursor:pointer;color:#fff;-webkit-text-fill-color:#fff;background-image:var(--%NS%primary-gradient);box-shadow:var(--%NS%btn-shadow)}.newsletter-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:#fff;box-shadow:var(--%NS%btn-shadow-hover)}.newsletter-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;bottom:4px;height:auto;padding:0 16px;margin:0;border-radius:calc(var(--%NS%radius-btn) - 4px);font-size:14px;line-height:1;transition:transform .13s cubic-bezier(.25,.8,.25,1),filter .13s ease,box-shadow .13s ease;cursor:pointer;outline:0}.newsletter-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not([disabled]){filter:brightness(1.08)}.newsletter-form[_ngcontent-%COMP%] button[disabled][_ngcontent-%COMP%]{background-image:none;background-color:var(--%NS%background-3dp);box-shadow:none}.newsletter-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active:not([disabled]){transform:scale(.95);filter:brightness(.96)}.newsletter-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .icon-success[_ngcontent-%COMP%], .newsletter-form[_ngcontent-%COMP%] .btn-success[_ngcontent-%COMP%] .fa-paper-plane[_ngcontent-%COMP%]{display:none}.newsletter-form[_ngcontent-%COMP%] .btn-success[disabled][_ngcontent-%COMP%]{background-image:none;background-color:var(--%NS%background);color:#1dd81c;-webkit-text-fill-color:#1dd81c;pointer-events:none}.newsletter-form[_ngcontent-%COMP%] .btn-success[_ngcontent-%COMP%] .icon-success[_ngcontent-%COMP%]{display:inline-block}.newsletter-wrapper[_ngcontent-%COMP%] .envelope-bg[_ngcontent-%COMP%]{font-size:180px;position:absolute;margin-top:-50px;margin-left:60px;color:#0000001a;z-index:0;transform:rotate(-30deg)}@media(max-width:1020px){.newsletter-wrapper[_ngcontent-%COMP%] .hgroup[_ngcontent-%COMP%], .newsletter-form[_ngcontent-%COMP%]{width:50%}}@media(max-width:990px){.newsletter-wrapper[_ngcontent-%COMP%] .hgroup[_ngcontent-%COMP%], .newsletter-form[_ngcontent-%COMP%]{width:100%}.newsletter-wrapper[_ngcontent-%COMP%] .hgroup[_ngcontent-%COMP%]{float:none;text-align:center}.newsletter-form[_ngcontent-%COMP%]{margin-top:30px;text-align:center}.newsletter-form[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{margin-left:0}.newsletter-wrapper[_ngcontent-%COMP%] .envelope-bg[_ngcontent-%COMP%]{font-size:280px}.newsletter-form[_ngcontent-%COMP%] .form-wrapper[_ngcontent-%COMP%]{max-width:400px}}`]})}return o}
42)();var Dr=(()=>{class o{currentDate=Date.now();static ɵfac=function(a){return new(a||o)};static ɵcmp=Qd({type:o,selectors:[[`app-footer`]],decls:28,vars:4,consts:[[1,`social-wrapper`],[`title`,`Kamil Mysliwiec Facebook`,`href`,`https://www.facebook.com/kammysliwiec/`,`target`,`_blank`],[1,`fa-brands`,`fa-facebook`],[`title`,`Kamil Mysliwiec Twitter`,`href`,`https://twitter.com/kammysliwiec`,`target`,`_blank`],[1,`fa-brands`,`fa-x-twitter`],[`title`,`Kamil Mysliwiec Github`,`href`,`https://github.com/kamilmysliwiec`,`target`,`_blank`],[1,`fa-brands`,`fa-github`],[`href`,`https://kamilmysliwiec.com`,`title`,`Kamil Mysliwiec Blog | Full-Stack Software Engineer`,`target`,`_blank`],[1,`fa-solid`,`fa-globe`],[1,`credits`],[`href`,`https://kamilmysliwiec.com`,`target`,`_blank`,`title`,`Kamil Mysliwiec Blog | Full-Stack Software Engineer`],[1,`separator`],[`href`,`https://dribbble.com/JakubStaron`,`title`,`Jakub Staron Dribble`,`target`,`_blank`],[`href`,`https://trilon.io`,`target`,`_blank`,`title`,`Official NestJS Consulting | Angular Consulting`],[`href`,`https://www.netlify.com`,`target`,`_blank`]],template:function(a,s){a&1&&(of(0,`footer`)(1,`div`,0)(2,`a`,1),Tv(3,`i`,2),sf(),of(4,`a`,3),Tv(5,`i`,4),sf(),of(6,`a`,5),Tv(7,`i`,6),sf(),of(8,`a`,7),Tv(9,`i`,8),sf()(),of(10,`div`,9)(11,`p`),gT(12),TT(13,`date`),of(14,`a`,10),gT(15,` Kamil Mysliwiec`),sf(),Tv(16,`span`,11),gT(17,` design by `),of(18,`a`,12),gT(19,`Jakub Staron`),sf(),Tv(20,`br`),gT(21,` Official NestJS Consulting `),of(22,`a`,13),gT(23,` Trilon.io`),sf(),Tv(24,`span`,11),gT(25,` hosted by `),of(26,`a`,14),gT(27,`Netlify`),sf()()()()),a&2&&(LC(12),uf(` Copyright © 2017-`,MT(13,1,s.currentDate,`yyyy`),` MIT by `))},dependencies:[w_],styles:[`.transition[_ngcontent-%COMP%], [_nghost-%COMP%], .social-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%], [_nghost-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{background:transparent;border-top:1px solid var(--%NS%border-color);display:block;padding:40px 0;margin:0;width:auto;font-size:14px;position:relative;z-index:12}@media only screen and (max-width:767px){[_nghost-%COMP%]{padding:30px 15px;position:static;height:auto;text-align:center}}footer[_ngcontent-%COMP%]{display:block;position:relative;color:color-mix(in srgb,var(--%NS%color) 75%,transparent);text-align:center;font-size:13px}footer[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--%NS%primary-5dp);-webkit-text-fill-color:var(--%NS%primary-5dp);font-weight:600;
42transition:color .15s ease,-webkit-text-fill-color .15s ease}footer[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--%NS%color-1dp);-webkit-text-fill-color:var(--%NS%color-1dp)}footer[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{display:inline-block;width:2px;height:12px;margin:0 3px 0 5px;vertical-align:middle;background:var(--%NS%border-color-strong)}footer[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:25px;margin-bottom:0}.social-wrapper[_ngcontent-%COMP%]{text-align:center;right:40px}.social-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle;color:var(--%NS%color-1dp);font-size:20px;margin-left:15px;cursor:pointer}.social-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:first-of-type{font-size:20px}.social-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--%NS%primary)}@media print{.social-wrapper[_ngcontent-%COMP%]{display:none}}`]})}return o})();function An(o){let r=[],i=(a,s)=>{for(let l of a)l.path&&r.push(s?{title:l.title,path:l.path,section:s}:{title:l.title,path:l.path}),l.children&&i(l.children,l.title)};return i(o),r}function On(o){let r=o.split(/[?#]/)[0].replace(/;[^/]*/g,``);return r.length>1?r.replace(/\/+$/,``):r}function zr(o,r){let i=An(o),a=On(r),s=i.findIndex(l=>l.path===a);return s<0?{prev:null,next:null}:{prev:i[s-1]??null,next:i[s+1]??null}}function jo(o,r){if(o&1&&(Ra(0,`span`,5),gT(1),rf()),o&2){let i=VS(3);LC(),Bv(i.prev.section)}}function Ro(o,r){if(o&1&&(Ra(0,`a`,1)(1,`span`,4),gT(2,`Previous`),rf(),TS(3,jo,2,1,`span`,5),Ra(4,`span`,6),gT(5),rf()()),o&2){let i=VS(2);Sv(`routerLink`,i.prev.path),Ga$1(`aria-label`,i.prevLabel),LC(3),_S(i.prev.section?3:-1),LC(2),Bv(i.prev.title)}}function Do(o,r){o&1&&qa$1(0,`span`,2)}function zo(o,r){if(o&1&&(Ra(0,`span`,5),gT(1),rf()),o&2){let i=VS(3);LC(),Bv(i.next.section)}}function Fo(o,r){if(o&1&&(Ra(0,`a`,3)(1,`span`,4),gT(2,`Next`),rf(),TS(3,zo,2,1,`span`,5),Ra(4,`span`,6),gT(5),rf()()),o&2){let i=VS(2);Sv(`routerLink`,i.next.path),Ga$1(`aria-label`,i.nextLabel),LC(3),_S(i.next.section?3:-1),LC(2),Bv(i.next.title)}}function qo(o,r){o&1&&qa$1(0,`span`,2)}function Lo(o,r){if(o&1&&(Ra(0,`nav`,0),TS(1,Ro,6,4,`a`,1)(2,Do,1,0,`span`,2),TS(3,Fo,6,4,`a`,3)(4,qo,1,0,`span`,2),rf()),o&2){let i=VS();LC(),_S(i.prev?1:2),LC(2),_S(i.next?3:4)}}var Fr=(()=>{class o{prev=null;next=null;prevLabel=``;nextLabel=``;routerSubscription;router=p(Et$1);cd=p(Jr$1);ngOnInit(){this.updateLinks(this.router.url),this.routerSubscription=this.router.events.pipe(Ve$1(i=>i instanceof Ze$1)).subscribe(i=>{this.updateLinks(i.urlAfterRedirects),this.cd.markForCheck()})}ngOnDestroy(){this.routerSubscription&&this.routerSubscription.unsubscribe()}updateLinks(i){let{prev:a,next:s}=zr(ot,i);this.prev=a,this.next=s,this.prevLabel=this.buildLabel(`Previous`,a),this.nextLabel=this.buildLabel(`Next`,s)}buildLabel(i,a){return a?a.section?`${i} page: ${a.title}, in ${a.section}`:`${i} page: ${a.title}`:``}static ɵfac=function(a){return new(a||o)};static ɵcmp=Qd({type:o,selectors:[[`app-page-nav`]],decls:1,vars:1,consts:[[`aria-label`,`Article navigation`,1,`page-nav`],[1,`page-nav__link`,`page-nav__link--prev`,3,`routerLink`],[1,`page-nav__spacer`],[1,`page-nav__link`,`page-nav__link--next`,3,`routerLink`],[1,`page-nav__label`],[1,`page-nav__section`],[1,`page-nav__title`]],template:function(a,s){a&1&&TS(0,Lo,5,2,`nav`,0),a&2&&_S(s.prev||s.next?0:-1)},dependencies:[Kc],styles:[`@charset "UTF-8";.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
42left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{display:block}.page-nav[_ngcontent-%COMP%]{width:calc(100% - 220px);max-width:860px;display:flex;justify-content:space-between;align-items:stretch;gap:16px;margin:1.5em 0 0;padding-top:1em}@media only screen and (max-width:1200px){.page-nav[_ngcontent-%COMP%]{width:100%}}@media print{.page-nav[_ngcontent-%COMP%]{display:none}}.page-nav__spacer[_ngcontent-%COMP%]{flex:1 1 0}.page-nav__link[_ngcontent-%COMP%]{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:4px;padding:14px 18px;box-sizing:border-box;border:1px solid var(--%NS%border-color);border-radius:var(--%NS%radius);background:var(--%NS%background-1dp);text-decoration:none;transition:border-color .15s ease,background-color .15s ease,transform .15s ease}.page-nav__link[_ngcontent-%COMP%]:hover{border-color:var(--%NS%primary-3dp);background:var(--%NS%hover-surface);transform:translateY(-1px)}.page-nav__link[_ngcontent-%COMP%]:active{transform:translateY(0)}.page-nav__link[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--%NS%primary-3dp);outline-offset:2px}.page-nav__link--prev[_ngcontent-%COMP%]{align-items:flex-start;text-align:left}.page-nav__link--next[_ngcontent-%COMP%]{align-items:flex-end;text-align:right}.page-nav__label[_ngcontent-%COMP%]{font-size:11.5px;line-height:1.2;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:color-mix(in srgb,var(--%NS%color) 80%,transparent)}.page-nav__section[_ngcontent-%COMP%]{font-size:12px;line-height:1.3;font-weight:600;color:color-mix(in srgb,var(--%NS%color) 80%,transparent);overflow-wrap:anywhere}.page-nav__title[_ngcontent-%COMP%]{font-size:15px;line-height:1.35;font-weight:600;overflow-wrap:anywhere;color:var(--%NS%color-1dp);-webkit-text-fill-color:var(--%NS%color-1dp);transition:color .15s ease,-webkit-text-fill-color .15s ease}.page-nav__link[_ngcontent-%COMP%]:hover .page-nav__title[_ngcontent-%COMP%]{color:var(--%NS%primary-3dp);-webkit-text-fill-color:var(--%NS%primary-3dp)}.page-nav__link--prev[_ngcontent-%COMP%] .page-nav__label[_ngcontent-%COMP%]:before{content:"\\2190";margin-right:6px}.page-nav__link--next[_ngcontent-%COMP%] .page-nav__label[_ngcontent-%COMP%]:after{content:"\\2192";margin-left:6px}@media only screen and (max-width:767px){.page-nav[_ngcontent-%COMP%]{flex-direction:column;margin-top:40px}.page-nav__spacer[_ngcontent-%COMP%]{display:none}.page-nav__link[_ngcontent-%COMP%]{width:100%}}`]})}return o})();function Bo(o,r){if(o&1){let i=PS();Ra(0,`button`,1),Wa$1(`click`,function(){kp(i);return Pp(VS().onCopy())}),Ra(1,`mat-icon`,2),gT(2),rf(),Ra(3,`span`),gT(4),rf()()}if(o&2){let i=VS();kv(`copied`,i.copied),Ga$1(`aria-label`,i.copied?`Markdown copied`:`Copy page as markdown`),LC(2),Bv(i.copied?`check`:`content_copy`),LC(2),Bv(i.copied?`Copied`:`Copy markdown`)}}var qr=(()=>{class o{markdownUrl=null;copied=!1;routerSubscription;revertTimeout=null;router=p(Et$1);cd=p(Jr$1);ngOnInit(){this.update(this.router.url),this.routerSubscription=this.router.events.pipe(Ve$1(i=>i instanceof Ze$1)).subscribe(i=>{this.update(i.urlAfterRedirects),this.cd.markForCheck()})}ngOnDestroy(){this.routerSubscription?.unsubscribe(),this.revertTimeout&&clearTimeout(this.revertTimeout)}onCopy(){return V(this,null,function*(){let i=fetch(this.markdownUrl).then(a=>{if(!a.ok)throw new Error(`${this.markdownUrl}: ${a.status}`);return a.text()});typeof ClipboardItem<`u`?yield navigator.clipboard.write([new ClipboardItem({"text/plain":i.then(a=>new Blob([a],{type:`text/plain`}))})]):yield navigator.clipboard.writeText(yield i),this.copied=!0,this.cd.markForCheck(),this.revertTimeout=setTimeout(()=>{this.copied=!1,this.revertTimeout=null,this.cd.markForCheck()},2e3)})}update(i){let a=On(i),s=An(ot).some(l=>l.path===a);this.markdownUrl=s?`${a===`/`?`/index`:a}.md`:null}static ɵfac=function(a){return new(a||o)};static ɵcmp=Qd({type:o,selectors:[[`app-copy-markdown`]],decls:1,vars:1,consts:[[`type`,`button`,1,`copy-markdown`,3,`copied`],[`type`,`button`,1,`copy-markdown`,3,`click`],[`aria-hidden`,`true`]],template:function(a,s){a&1&&TS(0,Bo,5,5,`button`,0),a&2&&_S(s.markdownUrl?0:-1)},dependencies:[Ze],styles:[`.transition[_ngcontent-%COMP%]{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast[_ngcontent-%COMP%]{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow[_ngcontent-%COMP%]{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:" ";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.center-element[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left[_ngcontent-%COMP%]{position:absolute;
42left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing[_ngcontent-%COMP%]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[_nghost-%COMP%]{display:block;position:relative;height:0;width:calc(100% - 220px);max-width:860px}@media only screen and (max-width:1200px){[_nghost-%COMP%]{width:100%}}@media print{[_nghost-%COMP%]{display:none}}.copy-markdown[_ngcontent-%COMP%]{display:inline-block;box-sizing:border-box;border:0;border-radius:var(--%NS%radius-btn);font-family:inherit;font-weight:700;letter-spacing:.01em;line-height:1.2;text-align:center;cursor:pointer;color:var(--%NS%color-1dp);background-color:var(--%NS%hover-surface-0);box-shadow:inset 0 0 0 1px var(--%NS%border-color-strong)}.copy-markdown[_ngcontent-%COMP%]:hover{color:var(--%NS%color-1dp);background-color:var(--%NS%hover-surface)}.copy-markdown[_ngcontent-%COMP%]{position:absolute;top:26px;right:0;z-index:1;display:inline-flex;align-items:center;gap:6px;padding:6px 10px;font-size:12px}.copy-markdown[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--%NS%primary-3dp);outline-offset:2px}.copy-markdown[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:16px;height:16px;font-size:16px}.copy-markdown.copied[_ngcontent-%COMP%]{color:var(--%NS%primary-3dp)}`]})}return o})();var Lr=1200;var Ho=/^\/v\d+(?:\/|$)/;function Jo(o){if(!o)return!1;try{return Ho.test(new URL(o,window.location.origin).pathname)}catch(r){return!1}}var Br=(()=>{class o{cd;router;elementRef;renderer;isSidebarOpened=!0;previousWidth;contentRef;isMarkupReady;routeAnnouncement=``;scrollSubscription;isInitialRoute=!0;scrollDebounceTime=100;constructor(i,a,s,l){this.cd=i,this.router=a,this.elementRef=s,this.renderer=l}ngOnInit(){this.router.events.pipe(Ve$1(i=>i instanceof Ze$1)).subscribe(()=>{if(window.innerWidth>768)return!1;this.isSidebarOpened=!1,this.cd.detectChanges()}),this.scrollSubscription=wu(window,`scroll`).pipe(XE(this.scrollDebounceTime)).subscribe(()=>{this.checkViewportBoundaries()})}ngAfterViewInit(){this.checkWindowWidth(window.innerWidth),this.contentRef&&this.contentRef.appendChild(this.createDocSearchScriptTag())}ngOnDestroy(){this.scrollSubscription&&this.scrollSubscription.unsubscribe()}onResize(i){this.checkWindowWidth(i.target.innerWidth)}toggleSidebar(){this.isSidebarOpened=!this.isSidebarOpened}checkWindowWidth(i){if(i=i||window.innerWidth,this.previousWidth===i)return;let a=this.previousWidth!==void 0&&this.previousWidth<=768;this.previousWidth=i,i<=768?(this.isSidebarOpened=!1,this.cd.detectChanges()):(a||i>1200&&!this.isSidebarOpened)&&(this.isSidebarOpened=!0,this.cd.detectChanges())}checkViewportBoundaries(){let i=this.elementRef.nativeElement,a=i.querySelector(`app-footer`),s=i.querySelector(`.newsletter-wrapper`),l=i.querySelector(`#carbonads`),d=i.querySelector(`.sponsors-wrapper`);if(!a||!l)return;if(window.innerWidth<768){this.renderer.removeStyle(l,`position`),this.renderer.removeStyle(l,`bottom`);return}l&&d.classList.add(`sponsors-carbon`),window.pageYOffset+window.innerHeight<s.offsetTop-a.offsetHeight+s.offsetHeight?(this.renderer.removeStyle(l,`position`),this.renderer.removeStyle(l,`bottom`)):(this.renderer.setStyle(l,`position`,`absolute`),this.renderer.setStyle(l,`bottom`,`350px`))}onRouteActivate(i){if(!i)return;let a=i.nativeElement;if(!a)return;if(this.contentRef=a.querySelector(`.content`),this.contentRef&&!this.contentRef.querySelector(`.carbon-wrapper`)){let l=this.createCarbonScriptTag(),d=document.createElement(`div`);d.classList.add(`carbon-wrapper`),window.innerWidth>Lr&&d.classList.add(`hide`),d.prepend(l),this.contentRef.prepend(d)}this.isInitialRoute?this.isInitialRoute=!1:(this.focusContent(),this.routeAnnouncement=this.readPageTitle()),this.cd.markForCheck(),setTimeout(()=>this.hideAdIfTocOverflow(),300)}skipToContent(i){i.preventDefault(),this.focusContent({preventScroll:!1})}focusContent(i={preventScroll:!0}){this.contentRef&&(this.renderer.setAttribute(this.contentRef,`tabindex`,`-1`),this.contentRef.focus(i))}readPageTitle(){return this.contentRef?.querySelector(`h3`)?.textContent?.trim()||document.title}createCarbonScriptTag(){let i=document.createElement(`script`);return i.type=`text/javascript`,i.src=`//cdn.carbonads.com/carbon.js?serve=CK7I653M&placement=nestjscom`,i.id=`_carbonads_js`,i}createDocSearchScriptTag(){let i=document.createElement(`script`);return i.type=`text/javascript`,i.src=`https://cdn.jsdelivr.net/npm/@docsearch/js@3`,i.async=!0,i.onload=()=>{window.docsearch({apiKey:wt.algoliaApiKey,indexName:`nestjs`,container:`#search`,appId:`SDCBYAN96J`,debug:!1,searchParameters:{hitsPerPage:150},transformSearchClient:a=>j(m({},a),{search:(s,...l)=>a.search(s,...l).then(d=>j(m({},d),{results:(d.results??[]).map(m$1=>{if(!Array.isArray(m$1?.hits))return m$1;let h=m$1.hits.filter(u=>!Jo(u.url));return j(m({},m$1),{hits:h,nbHits:h.length})})}))})})},i}hideAdIfTocOverflow(){let l=window.innerHeight-160-200,d=document.querySelector(`.toc-wrapper ul`);d&&(d.clientHeight>l&&window.innerWidth>Lr?this.contentRef.querySelector(`.carbon-wrapper`).classList.add(`hide`):this.contentRef.querySelector(`.carbon-wrapper`).classList.remove(`hide`))}static ɵfac=function(a){return new(a||o)(Ce(Jr$1),Ce(Et$1),Ce(xt),Ce(Mn$1))};static ɵcmp=Qd({type:o,selectors:[[`app-homepage`]],hostBindings:function(a,s){a&1&&Wa$1(`resize`,function(d){return s.onResize(d)},YI)},decls:49,vars:7,consts:[[`mainContent`,``],[`href`,`#content`,1,`skip-link`,3,`click`],[`role`,`status`,`aria-live`,`polite`,1,`visually-hidden`],[3,`toggle`,`isSidebarOpened`],[1,`logo-wrapper`],[`href`,`https://docs.nestjs.com/`,`title`,`Documentation | NestJS - A node.js framework built on top of TypeScript`],[`alt`,`NestJS Logo`,`src`,`/assets/logo-small-gradient.svg`],[1,`container-fluid`],[1,`app-menu`],[1,`container`],[1,`page-wrapper`],[3,`contentReference`],[`id`,`content`,`tabindex`,`-1`],[3,`activate`],[1,`sponsors-wrapper`],[1,`sponsors-container`],[`routerLink`,`/support`],[1,`row`,`clearfix`],[1,`inline-column`],[1,`title`],[`href`,`https://serpapi.com`,`target`,`_blank`,1,`logo-sponsor-container`],[`src`,`/assets/sponsors/serpapi.png`,`alt`,`SerpApi Logo`,1,`logo-sponsor`,`logo-sponsor--slim`],[`href`,`https://trilon.io/`,`target`,`_blank`,1,`logo-sponsor-container`],[`src`,`/assets/sponsors/trilon.svg`,`alt`,`Trilon Logo`,1,`logo-sponsor`],[`href`,`https://mojam.co`,`target`,`_blank`,1,`logo-sponsor-container`],[`src`,`/assets/sponsors/mojam-logo.png`,`alt`,`Mojam Logo`,1,`logo-sponsor`,`logo-sponsor--slim`],[`href`,`https://opencollective.com/nest`,`target`,`_blank`,`rel`,`nofollow`,1,`btn`,`btn-primary`],[`href`,`https://kamilmysliwiec.com`,`target`,`_blank`,`title`,`Kamil Mysliwiec Blog | Full-Stack S
42oftware Engineer`]],template:function(a,s){a&1&&(Ra(0,`a`,1),Wa$1(`click`,function(d){return s.skipToContent(d)}),gT(1,`Skip to content`),rf(),Ra(2,`p`,2),gT(3),rf(),Ra(4,`app-header`,3),Wa$1(`toggle`,function(){return s.toggleSidebar()}),Ra(5,`div`,4)(6,`a`,5),qa$1(7,`img`,6),rf()()(),Ra(8,`div`,7),qa$1(9,`app-menu`,8),Ra(10,`div`,9)(11,`div`,10),qa$1(12,`app-toc`,11),Ra(13,`main`,12,0),qa$1(15,`app-copy-markdown`),Ra(16,`router-outlet`,13),Wa$1(`activate`,function(d){return s.onRouteActivate(d)}),rf(),qa$1(17,`app-page-nav`),rf()(),Ra(18,`div`,14)(19,`div`,15)(20,`h3`),gT(21,`Support us`),rf(),Ra(22,`p`),gT(23,` Nest is an MIT-licensed open source project. It can grow thanks to the support of these awesome people. If you'd like to join them, please read more `),Ra(24,`a`,16),gT(25,`here`),rf(),gT(26,`. `),rf(),Ra(27,`div`,17)(28,`div`,18)(29,`h4`,19),gT(30,`Principal Sponsors`),rf(),Ra(31,`a`,20),qa$1(32,`img`,21),rf(),Ra(33,`a`,22),qa$1(34,`img`,23),rf(),Ra(35,`a`,24),qa$1(36,`img`,25),rf()(),Ra(37,`div`,18)(38,`h4`,19),gT(39,`Sponsors / Partners`),rf(),Ra(40,`a`,26)(41,`span`),gT(42,`Become a sponsor`),rf()()()()()(),qa$1(43,`app-newsletter`),Ra(44,`app-footer`)(45,`p`),gT(46,` Made by `),Ra(47,`a`,27),gT(48,` Kamil MyÅliwiec `),rf()()()()()),a&2&&(LC(3),uf(` `,s.routeAnnouncement,` 43`),LC(),Sv(`isSidebarOpened`,s.isSidebarOpened),LC(5),kv(`opened`,s.isSidebarOpened),LC(),kv(`wide`,!s.isSidebarOpened),LC(2),Sv(`contentReference`,s.contentRef))},dependencies:[Tr,Nr,Ir,uh,Kc,Rr,Dr,Fr,qr],styles:[`.transition,.container{-webkit-transition:all .2s cubic-bezier(.7,0,.3,1);-moz-transition:all .2s cubic-bezier(.7,0,.3,1);-ms-transition:all .2s cubic-bezier(.7,0,.3,1);-o-transition:all .2s cubic-bezier(.7,0,.3,1);transition:all .2s cubic-bezier(.7,0,.3,1)}.transition-fast{-webkit-transition:all .1s cubic-bezier(.7,0,.3,1);-moz-transition:all .1s cubic-bezier(.7,0,.3,1);-ms-transition:all .1s cubic-bezier(.7,0,.3,1);-o-transition:all .1s cubic-bezier(.7,0,.3,1);transition:all .1s cubic-bezier(.7,0,.3,1)}.transition-slow{-webkit-transition:all .52s cubic-bezier(.7,0,.3,1);-moz-transition:all .52s cubic-bezier(.7,0,.3,1);-ms-transition:all .52s cubic-bezier(.7,0,.3,1);-o-transition:all .52s cubic-bezier(.7,0,.3,1);transition:all .52s cubic-bezier(.7,0,.3,1)}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.center-element{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.center-left{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translate(-50%)}.center-top{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.box-sizing,.container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.container-fluid{position:relative;display:block;table-layout:fixed;width:100%;min-height:100vh}.logo-wrapper svg,.logo-wrapper img{width:42px;height:50px}.container{margin-left:calc(var(--%NS%shell-offset, 12px) + 280px);width:calc(100% - var(--%NS%shell-offset, 12px) * 2 - 280px);padding:106px 85px 0;display:inline-block;vertical-align:top;position:relative}.container.wide{margin-left:var(--%NS%shell-offset, 12px);width:calc(100% - var(--%NS%shell-offset, 12px) * 2);display:block}@media only screen and (max-width:1200px){.container{margin-left:292px;width:calc(100% - 292px);padding:106px 50px 0}.container.wide{margin-left:0;width:100%}}@media only screen and (max-width:767px){.container{margin-left:0;width:100%;padding:106px 20px 0}}@media print{.container{margin-left:0;width:100%;padding:0 20px}}.page-wrapper{color:var(--%NS%color);line-height:25px}.page-wrapper>main{display:contents}.page-wrapper a{font-weight:600;color:var(--%NS%primary-3dp)}.page-wrapper a:hover{color:#0894e2}.page-wrapper .content-inner{padding-bottom:2em;border-bottom:1px solid var(--%NS%background-2dp)}.page-wrapper .content a{color:var(--%NS%primary-3dp);-webkit-text-fill-color:var(--%NS%primary-3dp);
43transition:color .15s ease,-webkit-text-fill-color .15s ease}.page-wrapper .content a:hover{color:#0894e2;-webkit-text-fill-color:#0894e2}.page-wrapper .content blockquote strong,.page-wrapper .content #carbonads a,.page-wrapper .content blockquote a{-webkit-text-fill-color:unset!important;-webkit-background-clip:unset!important;background:none}.page-wrapper .content blockquote strong:hover,.page-wrapper .content #carbonads a:hover,.page-wrapper .content blockquote a:hover{background:none}.page-wrapper .content a:has(>code){-webkit-text-fill-color:unset!important;-webkit-background-clip:unset!important;background:none}.page-wrapper .content a:has(>code):hover{background:none}.page-wrapper .content .banner a{-webkit-text-fill-color:#000!important;-webkit-background-clip:#000!important;background:#fff}.page-wrapper .content .banner a:before{background:#fff}.page-wrapper .content .banner a:hover{-webkit-text-fill-color:#fff!important;-webkit-background-clip:#fff!important}.page-wrapper h1,.page-wrapper h2,.page-wrapper h3,.page-wrapper h4,.page-wrapper h5,.page-wrapper h6{color:var(--%NS%color-1dp);letter-spacing:-.01em}.page-wrapper h3{font-size:21px;font-weight:700;margin:45px 0 20px}.page-wrapper h4{font-weight:600;margin:40px 0 -5px}.page-wrapper h3 a,.page-wrapper h4 a{opacity:0;filter:alpha(opacity=0);margin-left:.1em;padding:0 .25rem}.page-wrapper h3 span:hover+a,.page-wrapper h3 span+a:hover,.page-wrapper h3 a:focus,.page-wrapper h4 span:hover+a,.page-wrapper h4 span+a:hover,.page-wrapper h4 a:focus{opacity:1;filter:alpha(opacity=100)}.page-wrapper h3:before,.page-wrapper h4:before{content:"";display:block;position:relative;width:0;height:5em;margin-top:-5em;pointer-events:none}.page-wrapper h5{color:var(--%NS%color);margin:30px 0 -5px;font-weight:600;font-size:15px}.page-wrapper h3:first-of-type{margin:20px 0;font-size:28px;line-height:1.25;font-weight:800;letter-spacing:-.02em;padding-right:140px}.page-wrapper h3+h5{margin-top:-10px!important}.sponsors-wrapper{border-top:1px solid var(--%NS%background-2dp);padding:10px 0 60px;margin-top:20px;position:relative}.sponsors-wrapper img{display:inline-block;vertical-align:middle}.sponsors-wrapper a{color:var(--%NS%primary);font-weight:600}.sponsors-wrapper a:hover{color:#0894e2}.sponsors-wrapper h3{font-size:20px;font-weight:700}.sponsors-wrapper h4{color:var(--%NS%color-1dp);font-weight:600;font-size:18px;margin:30px 0 18px}.sponsors-wrapper .title{margin:50px 0 25px}.sponsors-wrapper p{margin:0;line-height:24px;font-size:15px;font-weight:500;color:var(--%NS%color)}.sponsors-wrapper .logo-sponsor-container{display:inline-block;margin-top:10px;margin-right:15px;margin-bottom:5px}.sponsors-wrapper .logo-sponsor-container:last-of-type{margin-right:0;margin-bottom:0}@media(max-width:480px){.sponsors-wrapper .logo-sponsor-container{display:block;margin-bottom:20px}.sponsors-wrapper .logo-sponsor-container:last-of-type{margin-bottom:0}}.sponsors-wrapper .logo-sponsor{width:160px;filter:var(--%NS%company-logo-filter);transition:filter .15s ease,transform .15s ease}.sponsors-wrapper .logo-sponsor:hover{filter:grayscale(0);transform:translateY(-2px)}.sponsors-wrapper .logo-sponsor--high{width:140px}.sponsors-wrapper .logo-sponsor--slim{width:auto;max-height:60px}@media(max-width:480px){.sponsors-wrapper .logo-sponsor--slim{margin-left:0}}.sponsors-wrapper .logo-blueanchor{width:200px}.sponsors-wrapper .btn-primary{transition:transform .13s cubic-bezier(.25,.8,.25,1),filter .13s ease,box-shadow .13s ease;will-change:transform}.sponsors-wrapper .btn-primary:hover{transform:translateY(-1px);filter:brightness(1.08)}.sponsors-wrapper .btn-primary:active{transform:scale(.97);filter:brightness(.96)}@media(prefers-reduced-motion:reduce){.sponsors-wrapper .btn-primary{transition:none}.sponsors-wrapper .btn-primary:hover,.sponsors-wrapper .btn-primary:active{transform:none}}.sponsors-wrapper .btn-primary{color:var(--%NS%primary-4dp);padding:11px 20px;display:inline-block;font-weight:700;font-size:14px;border-radius:var(--%NS%radius-btn);position:relative;background-image:var(--%NS%primary-gradient);background-size:100% 100%;box-shadow:none}.sponsors-wrapper .btn-primary span{position:relative;z-index:3;background:var(--%NS%primary-gradient);-webkit-background-clip:text!important;-webkit-text-fill-color:transparent}.sponsors-wrapper .btn-primary:after{content:"";position:absolute;inset:1.5px;border-radius:calc(var(--%NS%radius-btn) - 1.5px);background:var(--%NS%background);transition:opacity .15s ease;z-index:1}.sponsors-wrapper .btn-primary:hover{box-shadow:var(--%NS%btn-shadow-hover)}.sponsors-wrapper .btn-primary:hover:after{opacity:0}
43.sponsors-wrapper .btn-primary:hover span{background:none;-webkit-text-fill-color:#fff}@media(min-width:1200px){.sponsors-carbon{width:calc(100% - 220px)}}.backers-wrapper{margin-top:10px}.backers-wrapper img{width:30px;border-radius:50%;-webkit-border-radius:50%}.inline-column{width:50%;vertical-align:top;margin:0;float:left}@media only screen and (max-width:991px){.inline-column{width:100%;float:none}}.toc-wrapper,.content,.companies-wrapper{display:inline-block;vertical-align:top}.content,.companies-wrapper{width:calc(100% - 220px);max-width:860px}@media print{.content,.companies-wrapper{width:100%}}@media only screen and (max-width:1200px){.content,.companies-wrapper{width:100%}}.content .row,.companies-wrapper .row{display:flex}@media only screen and (max-width:991px){.content .row,.companies-wrapper .row{display:block}}.content .thumbnail,.companies-wrapper .thumbnail{width:400px}@media only screen and (max-width:991px){.content .thumbnail,.companies-wrapper .thumbnail{width:100%;max-width:400px;margin:0 auto}}.content .thumbnail img,.companies-wrapper .thumbnail img{max-width:100%;padding-top:10px;padding-bottom:0;box-sizing:border-box}.content .thumbnail.p-l-30 img,.companies-wrapper .thumbnail.p-l-30 img{padding-left:30px}@media only screen and (max-width:991px){.content .thumbnail.p-l-30 img,.companies-wrapper .thumbnail.p-l-30 img{padding-left:0}}.content .thumbnail.p-r-30 img,.companies-wrapper .thumbnail.p-r-30 img{padding-right:30px}@media only screen and (max-width:991px){.content .thumbnail.p-r-30 img,.companies-wrapper .thumbnail.p-r-30 img{padding-right:0}}.content .content,.companies-wrapper .content{flex-basis:55%}.content .contact-us,.companies-wrapper .contact-us{background:var(--%NS%primary-gradient);color:#fff;padding:20px 30px;border-radius:var(--%NS%radius);margin:35px 0;display:flex;align-items:center}@media only screen and (max-width:767px){.content .contact-us,.companies-wrapper .contact-us{display:block;text-align:center}.content .contact-us p,.companies-wrapper .contact-us p{text-align:center}}.content .contact-us h5,.companies-wrapper .contact-us h5{text-transform:uppercase;font-weight:600;color:#fff;margin:0}.content .contact-us p,.companies-wrapper .contact-us p{margin:0}.content .contact-us a,.companies-wrapper .contact-us a{transition:transform .13s cubic-bezier(.25,.8,.25,1),filter .13s ease,box-shadow .13s ease;will-change:transform}.content .contact-us a:hover,.companies-wrapper .contact-us a:hover{transform:translateY(-1px);filter:brightness(1.08)}.content .contact-us a:active,.companies-wrapper .contact-us a:active{transform:scale(.97);filter:brightness(.96)}@media(prefers-reduced-motion:reduce){.content .contact-us a,.companies-wrapper .contact-us a{transition:none}.content .contact-us a:hover,.content .contact-us a:active,.companies-wrapper .contact-us a:hover,.companies-wrapper .contact-us a:active{transform:none}}.content .contact-us a,.companies-wrapper .contact-us a{background:#fff;border:2px solid #fff;box-sizing:border-box;padding:9px 18px;border-radius:var(--%NS%radius-btn);float:right;display:block;text-align:center;font-weight:700;box-shadow:0 3px 12px #00000024;transition:transform .13s cubic-bezier(.25,.8,.25,1),background-color .13s ease,color .13s ease,box-shadow .13s ease}.content .contact-us a:hover,.companies-wrapper .contact-us a:hover{background:transparent;color:#fff;filter:none;box-shadow:none}@media only screen and (max-width:767px){.content .contact-us a,.companies-wrapper .contact-us a{width:150px;margin:15px auto 0;float:none}}.content .contact-us .column,.companies-wrapper .contact-us .column{justify-content:center;flex-direction:column}.content .contact-us .column-text,.companies-wrapper .contact-us .column-text{flex-grow:3;margin-right:20px}.github-links{display:inline-flex;align-items:center;gap:6px;margin-top:1.2em;font-size:13px;text-decoration:none}.github-links i{font-size:16px}@media only screen and (max-width:1200px){.toc-wrapper{display:none}}.company-logo{display:inline-block;vertical-align:middle;margin:10px 20px}.company-logo img{max-width:130px;max-height:60px;padding:6px;-webkit-filter:var(--%NS%company-filter);filter:var(--%NS%company-filter);opacity:var(--%NS%company-logo-opacity);transition:filter .15s ease,opacity .15s ease,transform .15s ease}.company-logo img:hover{-webkit-filter:var(--%NS%company-filter-hover);filter:var(--%NS%company-filter-hover);opacity:1;transform:translateY(-2px)}.companies-list a{color:var(--%NS%color);font-size:15px;font-weight:400}#carbonads a{color:inherit;text-decoration:none;font-weight:400}#carbonads a:hover{color:inherit}
43#carbonads span{display:block;overflow:hidden}#carbonads_1,#carbonads_2{display:none}.carbon-img{display:block;margin:0 auto 8px;line-height:1}.carbon-text{display:block;margin-bottom:8px}.carbon-poweredby{text-transform:uppercase;display:block;font-size:10px;letter-spacing:1px;line-height:1}.carbon-wrapper #carbonads{position:fixed;z-index:11;display:block;right:var(--%NS%rail-right);bottom:20px;width:var(--%NS%rail-column);box-sizing:border-box;overflow:hidden;padding:1em;border-radius:var(--%NS%radius);border:1px solid var(--%NS%border-color);background:var(--%NS%background-2dp)!important;text-align:center;line-height:1.5;font-size:13px}@media only screen and (max-width:1200px){.carbon-wrapper #carbonads{margin:64px 0 16px 16px;padding:12px;float:right;position:static;width:auto;max-width:130px}}@media only screen and (max-width:991px){.carbon-wrapper #carbonads{padding:12px;text-align:left}}@media(max-width:360px){.carbon-wrapper #carbonads{display:none}}@media print{.carbon-wrapper{display:none}}.algolia-autocomplete .ds-dropdown-menu{width:460px;min-width:460px;margin-top:18px}.algolia-autocomplete .algolia-docsearch-suggestion--category-header{color:#151515;text-transform:uppercase;font-weight:700;font-size:16px}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{color:#757575}.algolia-autocomplete .algolia-docsearch-suggestion--title{font-weight:600;color:#151515}.algolia-autocomplete .algolia-docsearch-suggestion--text{font-size:.8rem;color:gray}.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:var(--%NS%primary);background:#fff2f4}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content{background:#fff8f9} 44`],encapsulation:2})}return o})();var Hr=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-application-context`]],features:[Iv],decls:164,vars:0,consts:[[`contentReference`,``],[`app494752999e082d198190d83be33664d38e9ad953`,``],[`appfe6c2601b3a1eee3a7fb60dea2335a2eea75b360`,``],[`apped3710933aab87400c2bcbbfc96af80d5e71169e`,``],[`app54846698b6631953cc3cb83804d3ec463c801a68`,``],[`appc84b90f2dd14216b2fe5efb21ee0a7b867b3d3de`,``],[`appd540ae70b6cdbfe080624f1b24384900eb6d9d6a`,``],[1,`content`],[1,`content-inner`],[`id`,`standalone-applications`],[`appAnchor`,``,`id`,`getting-started`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`appAnchor`,``,`id`,`retrieving-providers-from-static-modules`],[1,`info`],[`appAnchor`,``,`id`,`retrieving-providers-from-dynamic-modules`],[`routerLink`,`/fundamentals/dynamic-modules`],[`appAnchor`,``,`id`,`terminating-phase`],[`routerLink`,`/fundamentals/lifecycle-events`],[`appAnchor`,``,`id`,`example`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/nestjs/nest/tree/master/sample/18-context`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/application-context.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Ra(0,`div`,7,0)(2,`div`,8)(3,`h3`,9),gT(4,`Standalone applications`),rf(),Ra(5,`p`),gT(6,`There are several ways to mount a Nest application. You can create a web app, a microservice, or a bare Nest `),Ra(7,`strong`),gT(8,`standalone application`),rf(),gT(9,` (without any network listeners). A standalone application is a wrapper around the Nest `),Ra(10,`strong`),gT(11,`IoC container`),rf(),gT(12,`, which holds all instantiated classes. Through the standalone application object, you can obtain a reference to any existing instance from any imported module. This lets you take advantage of the Nest framework anywhere, including scripted `),Ra(13,`strong`),gT(14,`CRON`),rf(),gT(15,` jobs. You can even build a `),Ra(16,`strong`),gT(17,`CLI`),rf(),gT(18,` on top of it.`),rf(),Ra(19,`h4`,10)(20,`span`),gT(21,`Getting started`),rf()(),Ra(22,`p`),gT(23,`To create a Nest standalone application, use the following construction:`),rf(),Ra(24,`app-copy-button`,11)(25,`span`,12),qa$1(26,`app-tabs`,null,1),rf(),Ra(28,`pre`)(29,`code`,13),gT(30,` 45async function bootstrap() { 46 const app = await NestFactory.createApplicationContext(AppModule); 47 // your application logic here ... 48} 49await bootstrap(); 50`),rf()()(),Ra(31,`h4`,14)(32,`span`),gT(33,`Retrieving providers from static modules`),rf()(),Ra(34,`p`),gT(35,`The standalone application object lets you obtain a reference to any instance registered within the Nest application. Imagine that a `),Ra(36,`code`),gT(37,`TasksService`),rf(),gT(38,` provider lives in a `),Ra(39,`code`),gT(40,`TasksModule`),rf(),gT(41,`, which is imported by `),Ra(42,`code`),gT(43,`AppModule`),rf(),gT(44,`. The class provides a set of methods that you want to call from within a CRON job.`),rf(),Ra(45,`app-copy-button`,11)(46,`span`,12),qa$1(47,`app-tabs`,null,2),rf(),Ra(49,`pre`)(50,`code`,13),gT(51,` 51const tasksService = app.get(TasksService); 52`),rf()()(),Ra(52,`p`),gT(53,`To access the `),Ra(54,`code`),gT(55,`TasksService`),rf(),gT(56,` instance, use the `),Ra(57,`code`),gT(58,`get()`),rf(),gT(59,` method. It acts like a `),Ra(60,`strong`),gT(61,`query`),rf(),gT(62,` that searches for an instance in each registered module, and accepts any provider's token. For strict context checking, pass an options object with the `),Ra(63,`code`),gT(64,`strict: true`),rf(),gT(65,` property. With this option in effect, you have to navigate to a specific module to obtain an instance from that selected context.`),rf(),Ra(66,`app-copy-button`,11)(67,`span`,12),qa$1(68,`app-tabs`,null,3),rf(),Ra(70,`pre`)(71,`code`,13),gT(72,` 53const tasksService = app.select(TasksModule).get(TasksService, { strict: true }); 54`),rf()()(),Ra(73,`p`),gT(74,`The following table summarizes the methods available for retrieving instance references from the standalone application object.`),rf(),Ra(75,`table`)(76,`tr`)(77,`td`)(78,`code`),gT(79,`get()`),rf()(),Ra(80,`td`),gT(81,` Retrieves an instance of a controller or provider (including guards, filters, and so on) available in the application context. `),rf()(),Ra(82,`tr`)(83,`td`)(84,`code`),gT(85,`select()`),rf()(),Ra(86,`td`),gT(87,` Navigates through the module graph to pull out a specific instance of the selected module (used together with strict mode, as described above). `),rf()()(),Ra(88,`blockquote`,15)(89,`strong`),gT(90,`Hint`),rf(),gT(91,` In non-strict mode, the root module is selected by default. To select any other module, navigate the module graph manually, step by step. 55`),rf(),Ra(92,`p`),gT(93,`A standalone application does not have any network listeners, so Nest features tied to request handling (e.g., middleware, interceptors, pipes, and guards) are not available in this context.`),rf(),Ra(94,`p`),gT(95,`For example, even if you register a global interceptor in your application and then retrieve a controller instance with the `),Ra(96,`code`),gT(97,`app.get()`),rf(),gT(98,` method, the interceptor is not executed when you call the controller's methods.`),rf(),Ra(99,`h4`,16)(100,`span`),gT(101,`Retrieving providers from dynamic modules`),rf()(),Ra(102,`p`),gT(103,`When working with `),Ra(104,`a`,17),gT
55(105,`dynamic modules`),rf(),gT(106,`, pass `),Ra(107,`code`),gT(108,`app.select()`),rf(),gT(109,` the same object that represents the registered dynamic module in the application. For example:`),rf(),Ra(110,`app-copy-button`,11)(111,`span`,12),qa$1(112,`app-tabs`,null,4),rf(),Ra(114,`pre`)(115,`code`,13),gT(116,` 56export const dynamicConfigModule = ConfigModule.register({ folder: './config' }); 57 58@Module({ 59 imports: [dynamicConfigModule], 60}) 61export class AppModule {} 62`),rf()()(),Ra(117,`p`),gT(118,`You can then select that module later on:`),rf(),Ra(119,`app-copy-button`,11)(120,`span`,12),qa$1(121,`app-tabs`,null,5),rf(),Ra(123,`pre`)(124,`code`,13),gT(125,` 63const configService = app.select(dynamicConfigModule).get(ConfigService, { strict: true }); 64`),rf()()(),Ra(126,`h4`,18)(127,`span`),gT(128,`Terminating phase`),rf()(),Ra(129,`p`),gT(130,`If you want the Node.js process to exit after the script finishes (e.g., for a script running CRON jobs), call the `),Ra(131,`code`),gT(132,`app.close()`),rf(),gT(133,` method at the end of your `),Ra(134,`code`),gT(135,`bootstrap()`),rf(),gT(136,` function:`),rf(),Ra(137,`app-copy-button`,11)(138,`span`,12),qa$1(139,`app-tabs`,null,6),rf(),Ra(141,`pre`)(142,`code`,13),gT(143,` 65async function bootstrap() { 66 const app = await NestFactory.createApplicationContext(AppModule); 67 // application logic... 68 await app.close(); 69} 70await bootstrap(); 71`),rf()()(),Ra(144,`p`),gT(145,`As described in the `),Ra(146,`a`,19),gT(147,`lifecycle events`),rf(),gT(148,` chapter, calling `),Ra(149,`code`),gT(150,`app.close()`),rf(),gT(151,` triggers the shutdown lifecycle hooks.`),rf(),Ra(152,`h4`,20)(153,`span`),gT(154,`Example`),rf()(),Ra(155,`p`),gT(156,`A working example is available in the `),Ra(157,`a`,21),gT(158,`standalone application sample`),rf(),gT(159,` on GitHub.`),rf()(),Ra(160,`a`,22),qa$1(161,`i`,23),Ra(162,`span`),gT(163,`Edit on GitHub`),rf()()())},dependencies:[wt$1,en$1,u,Kc],encapsulation:2})}return o})();var Jr=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-components`]],features:[Iv],decls:364,vars:24,consts:[[`contentReference`,``],[`app12eb4411fdf6b2b0259b96d5e732e92f07fd1c25`,``],[`app61a8528feb5ac7d5168a3a26a0e0e2cf2e5d73f2`,``],[`app7e23a3fb9c3b50d08f0189808e3913a6e4db4615`,``],[`app68b2841706030cd377ce57aa4ec5ada24ba4039c`,``],[1,`content`],[1,`content-inner`],[`id`,`providers`],[`src`,`/assets/Components_1.png`,1,`illustrative-image`],[`routerLink`,`/modules`],[1,`info`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/SOLID`],[`appAnchor`,``,`id`,`services`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/Inversion_of_control`],[`appAnchor`,``,`id`,`dependency-injection`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://angular.dev/guide/di`],[1,`warning`],[`href`,`/fundamentals/custom-providers#interfaces-and-abstract-classes`],[`appAnchor`,``,`id`,`scopes`],[`routerLink`,`/fundamentals/injection-scopes`],[`appAnchor`,``,`id`,`custom-providers`],[`routerLink`,`/fundamentals/custom-providers`],[`appAnchor`,``,`id`,`optional-providers`],[`appAnchor`,``,`id`,`property-based-injection`],[`appAnchor`,``,`id`,`provider-registration`],[1,`file-tree`],[1,`item`],[1,`children`],[`appAnchor`,``,`id`,`manual-instantiation`],[`routerLink`,`/fundamentals/module-ref`],[`routerLink`,`/standalone-applications`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/components.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Ra(0,`div`,5,0)(2,`div`,6)(3,`h3`,7),gT(4,`Providers`),rf(),Ra(5,`p`),gT(6,`Providers are a core concept in Nest. Many of the basic Nest classes, such as services, repositories, factories, and helpers, can be treated as providers. The main idea behind a provider is that it can be `),Ra(7,`strong`),gT(8,`injected`),rf(),gT(9,` as a dependency, which lets objects form relationships with each other. The Nest runtime takes care of "wiring up" these objects.`),rf(),Ra(10,`figure`),qa$1(11,`img`,8),rf(),Ra(12,`p`),gT(13,`In the previous chapter, we built a basic `),Ra(14,`code`),gT(15,`CatsController`),rf(),gT(16,`. Controllers should handle HTTP requests and delegate more complex tasks to `),Ra(17,`strong`),gT(18,`providers`),rf(),gT(19,`. In their simplest form, providers are plain JavaScript classes listed in the `),Ra(20,`code`),gT(21,`providers`),rf(),gT(22,` array of a module. For more details, see the `),Ra(23,`a`,9),gT(24,`Modules`),rf(),gT(25,` chapter.`),rf(),Ra(26,`blockquote`,10)(27,`strong`),gT(28,`Hint`),rf(),gT(29,` Nest lets you design and organize dependencies in an object-oriented way, so it's good practice to follow the `),Ra(30,`a`,11),gT(31,`SOLID principles`),rf(),gT(32,`. 72`),rf(),Ra(33,`h4`,12)(34,`span`),gT(35,`Services`),rf()(),Ra(36,`p`),gT(37,`Let's start by creating a `),Ra(38,`code`),gT(39,`CatsService`),rf(),gT(40,`. This service handles data storage and retrieval for the `),Ra(41,`code`),gT(42,`C
72atsController`),rf(),gT(43,`. Because it encapsulates application logic, it's a natural candidate for a provider.`),rf(),Ra(44,`app-copy-button`,13)(45,`span`,14),gT(46),TT(47,`extension`),qa$1(48,`app-tabs`,null,1),rf(),Ra(50,`pre`)(51,`code`,15),gT(52,` 73import { Injectable } from '@nestjs/common'; 74import type { Cat } from './interfaces/cat.interface.js'; 75 76@Injectable() 77export class CatsService { 78 private readonly cats: Cat[] = []; 79 80 create(cat: Cat) { 81 this.cats.push(cat); 82 } 83 84 findAll(): Cat[] { 85 return this.cats; 86 } 87} 88`),rf()(),Ra(53,`pre`)(54,`code`,15),gT(55,` 89import { Injectable } from '@nestjs/common'; 90 91@Injectable() 92export class CatsService { 93 constructor() { 94 this.cats = []; 95 } 96 97 create(cat) { 98 this.cats.push(cat); 99 } 100 101 findAll() { 102 return this.cats; 103 } 104} 105`),rf()()(),Ra(56,`blockquote`,10)(57,`strong`),gT(58,`Hint`),rf(),gT(59,` To create a service with the CLI, run `),Ra(60,`code`),gT(61,`$ nest g service cats`),rf(),gT(62,`. 106`),rf(),Ra(63,`p`)(64,`code`),gT(65,`CatsService`),rf(),gT(66,` is a basic class with one property and two methods. The key addition is the `),Ra(67,`code`),gT(68,`@Injectable()`),rf(),gT(69,` decorator. It attaches metadata to the class, declaring that `),Ra(70,`code`),gT(71,`CatsService`),rf(),gT(72,` can be managed by the Nest `),Ra(73,`a`,16),gT(74,`IoC`),rf(),gT(75,` container.`),rf(),Ra(76,`p`),gT(77,`The example also uses a `),Ra(78,`code`),gT(79,`Cat`),rf(),gT(80,` interface:`),rf(),Ra(81,`app-copy-button`,13)(82,`span`,14),gT(83),TT(84,`extension`),qa$1(85,`app-tabs`,null,2),rf(),Ra(87,`pre`)(88,`code`,15),gT(89,` 107export interface Cat { 108 name: string; 109 age: number; 110 breed: string; 111} 112`),rf()()(),Ra(90,`p`),gT(91,`Now that we have a service to store and retrieve cats, let's use it in the `),Ra(92,`code`),gT(93,`CatsController`),rf(),gT(94,`:`),rf(),Ra(95,`app-copy-button`,13)(96,`span`,14),gT(97),TT(98,`extension`),qa$1(99,`app-tabs`,null,3),rf(),Ra(101,`pre`)(102,`code`,15),gT(103,` 113import { Controller, Get, Post, Body } from '@nestjs/common'; 114import { CreateCatDto } from './dto/create-cat.dto.js'; 115import { CatsService } from './cats.service.js'; 116import type { Cat } from './interfaces/cat.interface.js'; 117 118@Controller('cats') 119export class CatsController { 120 constructor(private catsService: CatsService) {} 121 122 @Post() 123 async create(@Body() createCatDto: CreateCatDto) { 124 this.catsService.create(createCatDto); 125 } 126 127 @Get() 128 async findAll(): Promise<Cat[]> {
129 return this.catsService.findAll(); 130 } 131} 132`),rf()(),Ra(104,`pre`)(105,`code`,15),gT(106,` 133import { Controller, Get, Post, Body, Bind, Dependencies } from '@nestjs/common'; 134import { CatsService } from './cats.service.js'; 135 136@Controller('cats') 137@Dependencies(CatsService) 138export class CatsController { 139 constructor(catsService) { 140 this.catsService = catsService; 141 } 142 143 @Post() 144 @Bind(Body()) 145 async create(createCatDto) { 146 this.catsService.create(createCatDto); 147 } 148 149 @Get() 150 async findAll() { 151 return this.catsService.findAll(); 152 } 153} 154`),rf()()(),Ra(107,`p`)(108,`code`),gT(109,`CatsService`),rf(),gT(110,` is `),Ra(111,`strong`),gT(112,`injected`),rf(),gT(113,` through the class constructor. The next section explains how Nest resolves it.`),rf(),Ra(114,`h4`,17)(115,`span`),gT(116,`Dependency injection`),rf()(),Ra(117,`p`),gT(118,`Nest is built around the `),Ra(119,`strong`),gT(120,`dependency injection`),rf(),gT(121,` design pattern. For an introduction to the concept, see the `),Ra(122,`a`,18),gT(123,`Angular documentation`),rf(),gT(124,`.`),rf(),Ra(125,`p`),gT(126,`Nest resolves dependencies by their type. In the example below, Nest resolves `),Ra(127,`code`),gT(128,`catsService`),rf(),gT(129,` by supplying an instance of `),Ra(130,`code`),gT(131,`CatsService`),rf(),gT(132,`. With the default (singleton) scope, Nest creates the instance once and shares it with every class that depends on it. Nest then passes the instance to the controller's constructor:`),rf(),Ra(133,`app-copy-button`)(134,`pre`)(135,`code`,15),gT(136,` 155constructor(private catsService: CatsService) {} 156`),rf()()(),Ra(137,`p`),gT(138,`This single line does two things:`),rf(),Ra(139,`ul`)(140,`li`),gT(141,`The `),Ra(142,`code`),gT(143,`private`),rf(),gT(144,` keyword makes `),Ra(145,`code`),gT(146,`catsService`),rf(),gT(147,` a TypeScript `),Ra(148,`strong`),gT(149,`parameter property`),rf(),gT(150,`: it declares a `),Ra(151,`code`),gT(152,`catsService`),rf(),gT(153,` member on the class and assigns the constructor argument to it, so you don't have to write `),Ra(154,`code`),gT(155,`this.catsService = catsService`),rf(),gT(156,` yourself.`),rf(),Ra(157,`li`),gT(158,`The `),Ra(159,`code`),gT(160,`CatsService`),rf(),gT(161,` type annotation is what Nest resolves against. At compile time, TypeScript emits the constructor's parameter types as metadata, and the container reads that metadata to determine which provider to supply.`),rf()(),Ra(162,`blockquote`,19)(163,`strong`),gT(164,`Warning`),rf(),gT(165,` Because resolution relies on the emitted type, the annotation must refer to something that exists at runtime, that is, a `),Ra(166,`strong`),gT(167,`class`),rf(),gT(168,`. Interfaces and type aliases are erased during compilation. If `),Ra(169,`code`),gT(170,`AppConfig`),rf(),gT(171,` is an interface, `),Ra(172,`code`),gT(173,`constructor(private config: AppConfig)`),rf(),gT(174,` leaves Nest with no token to look up, and the application fails at startup with a "Nest can't resolve dependencies" error. The same happens when you import a class with `),Ra(175,`code`),gT(176,`import type`),rf(),gT(177,`, because the import is erased as well. To inject something that isn't a class, register it under a token and inject it explicitly with `),Ra(178,`code`),gT(179,`@Inject()`),rf(),gT(180,`, as described in `),Ra(181,`a`,20),gT(182,`Custom providers`),rf(),gT(183,`. 157`),rf(),Ra(184,`h4`,21)(185,`span`),gT(186,`Scopes`),rf()(),Ra(187,`p`),gT(188,`By default, a provider's lifetime ("scope") matches the application lifecycle. When the application bootstraps, Nest resolves every dependency, which means every provider is instantiated. Likewise, when the application shuts down, every provider is destroyed. You can also give a provider a different scope, for example, make it `),Ra(189,`strong`),gT(190,`request-scoped`),rf(),gT(191,` so that its lifetime is tied to an individual request. See the `),Ra(192,`a`,22),gT(193,`Injection scopes`),rf(),gT(194,` chapter for details.`),rf(),Ra(195,`p`),qa$1(196,`app-banner-courses`),rf(),Ra(197,`h4`,23)(198,`span`),gT(199,`Custom providers`),rf()(),Ra(200,`p`),gT(201,`Nest has a built-in inversion of control (IoC) container that manages the relationships between providers. The container underpins dependency injection and supports more than the class-based providers shown so far: you can also define providers with plain values, classes, and synchronous or asynchronous factories. For examples, see the `),Ra(202,`a`,24),gT(203,`Custom providers`),rf(),gT(2
15704,` chapter.`),rf(),Ra(205,`h4`,25)(206,`span`),gT(207,`Optional providers`),rf()(),Ra(208,`p`),gT(209,`Some dependencies are not always required. For example, a class might depend on a `),Ra(210,`strong`),gT(211,`configuration object`),rf(),gT(212,` but fall back to default values when none is provided. Such a dependency is optional, and its absence should not cause an error.`),rf(),Ra(213,`p`),gT(214,`To mark a dependency as optional, apply the `),Ra(215,`code`),gT(216,`@Optional()`),rf(),gT(217,` decorator to the constructor parameter:`),rf(),Ra(218,`app-copy-button`)(219,`pre`)(220,`code`,15),gT(221,` 158import { Injectable, Optional, Inject } from '@nestjs/common'; 159 160@Injectable() 161export class HttpService<T> { 162 constructor(@Optional() @Inject('HTTP_OPTIONS') private httpClient: T) {} 163} 164`),rf()()(),Ra(222,`p`),gT(223,`This example injects a custom provider, so it passes the `),Ra(224,`code`),gT(225,`HTTP_OPTIONS`),rf(),gT(226,` custom `),Ra(227,`strong`),gT(228,`token`),rf(),gT(229,` to `),Ra(230,`code`),gT(231,`@Inject()`),rf(),gT(232,`. The previous examples used constructor-based injection, where each dependency is identified by its class in the constructor signature. For more on custom providers and their tokens, see the `),Ra(233,`a`,24),gT(234,`Custom providers`),rf(),gT(235,` chapter.`),rf(),Ra(236,`p`)(237,`code`),gT(238,`@Optional()`),rf(),gT(239,` only affects what happens when the provider is `),Ra(240,`em`),gT(241,`missing`),rf(),gT(242,`: if nothing is registered under `),Ra(243,`code`),gT(244,`HTTP_OPTIONS`),rf(),gT(245,`, Nest injects `),Ra(246,`code`),gT(247,`undefined`),rf(),gT(248,` instead of failing at startup. The class is therefore responsible for the fallback, typically by merging the injected value, if any, over a set of defaults.`),rf(),Ra(249,`h4`,26)(250,`span`),gT(251,`Property-based injection`),rf()(),Ra(252,`p`),gT(253,`The examples so far use constructor-based injection, where providers are injected through the constructor. In some cases, `),Ra(254,`strong`),gT(255,`property-based injection`),rf(),gT(256,` is more convenient. For example, if a base class depends on one or more providers, passing them up through `),Ra(257,`code`),gT(258,`super()`),rf(),gT(259,` from every subclass becomes cumbersome. Instead, you can apply the `),Ra(260,`code`),gT(261,`@Inject()`),rf(),gT(262,` decorator directly to a property:`),rf(),Ra(263,`app-copy-button`)(264,`pre`)(265,`code`,15),gT(266,` 165import { Injectable, Inject } from '@nestjs/common'; 166 167@Injectable() 168export class HttpService<T> { 169 @Inject('HTTP_OPTIONS') 170 private readonly httpClient: T; 171} 172`),rf()()(),Ra(267,`blockquote`,19)(268,`strong`),gT(269,`Warning`),rf(),gT(270,` If your class doesn't extend another class, prefer `),Ra(271,`strong`),gT(272,`constructor-based`),rf(),gT(273,` injection. The constructor states explicitly which dependencies the class requires, which makes the code easier to follow than properties annotated with `),Ra(274,`code`),gT(275,`@Inject()`),rf(),gT(276,`. 173`),rf(),Ra(277,`h4`,27)(278,`span`),gT(279,`Provider registration`),rf()(),Ra(280,`p`),gT(281,`With a provider (`),Ra(282,`code`),gT(283,`CatsService`),rf(),gT(284,`) and a consumer (`),Ra(285,`code`),gT(286,`CatsController`),rf(),gT(287,`) in place, you need to register the service with Nest so that it can perform the injection. To do so, add the service to the `),Ra(288,`code`),gT(289,`providers`),rf(),gT(290,` array of the `),Ra(291,`code`),gT(292,`@Module()`),rf(),gT(293,` decorator in the module file (`),Ra(294,`code`),gT(295,`app.module.ts`),rf(),gT(296,`):`),rf(),Ra(297,`app-copy-button`,13)(298,`span`,14),gT(299),TT(300,`extension`),qa$1(301,`app-tabs`,null,4),rf(),Ra(303,`pre`)(304,`code`,15),gT(305,` 174import { Module } from '@nestjs/common'; 175import { CatsController } from './cats/cats.controller.js'; 176import { CatsService } from './cats/cats.service.js'; 177 178@Module({ 179 controllers: [CatsController], 180 providers: [CatsService], 181}) 182export class AppModule {} 183`),rf()()(),Ra(306,`p`),gT(307,`Nest can now resolve the dependencies of the `),Ra(308,`code`),gT(309,`CatsController`),rf(),gT(310,` class.`),rf(),Ra(311,`p`),gT(312,`The directory structure now looks like this:`),rf(),Ra(313,`div`,28)(314,`div`,29),gT(315,`src`),rf(),Ra(316,`div`,30)(317,`div`,29),gT(318,`cats`),rf(),Ra(319,`div`,30)(320,`div`,29),gT(321,`dto`),rf(),Ra(322,`div`,30)(323,`div`,29),gT(324,`create-cat.dto.ts`),rf()(),Ra(325,`div`,29),gT(326,`interfaces`),rf(),Ra(327,`div`,30)(328,`div`,29),gT(329,`cat.interface.ts`),rf()(),Ra(330,`div`,29),gT(331,`cats.controller.ts`),rf(),Ra(332,`div`,29),gT(333,`cats.service.ts`),rf()(),Ra(334,`div`,29),gT(335,`app.module.ts`),rf(),Ra(336,`div`,29),gT(337,`main.ts`),rf()()(),Ra(338,`h4`,31)(339,`span`),gT(340,`Manual instantiation`),rf()(),Ra(341,`p`),gT(342,`So far, Nest has resolved dependencies automatically. In some cases, you may
183need to step outside the dependency injection system and retrieve or instantiate providers manually. Two techniques cover these cases:`),rf(),Ra(343,`ul`)(344,`li`),gT(345,`To retrieve existing instances or instantiate providers dynamically, use `),Ra(346,`code`),gT(347,`ModuleRef`),rf(),gT(348,`, described in the `),Ra(349,`a`,32),gT(350,`Module reference`),rf(),gT(351,` chapter.`),rf(),Ra(352,`li`),gT(353,`To get providers within the `),Ra(354,`code`),gT(355,`bootstrap()`),rf(),gT(356,` function (e.g., for standalone applications or to use a configuration service during bootstrapping), see `),Ra(357,`a`,33),gT(358,`Standalone applications`),rf(),gT(359,`.`),rf()()(),Ra(360,`a`,34),qa$1(361,`i`,35),Ra(362,`span`),gT(363,`Edit on GitHub`),rf()()()),a&2){let l=qS(49),d=qS(86),m=qS(100),h=qS(302);LC(46),uf(` `,MT(47,12,`cats.service`,l.isJsActive),` 184`),LC(4),kv(`hide`,l.isJsActive),LC(3),kv(`hide`,!l.isJsActive),LC(30),uf(` `,MT(84,15,`interfaces/cat.interface`,d.isJsActive),` 185`),LC(14),uf(` `,MT(98,18,`cats.controller`,m.isJsActive),` 186`),LC(4),kv(`hide`,m.isJsActive),LC(3),kv(`hide`,!m.isJsActive),LC(195),uf(` `,MT(300,21,`app.module`,h.isJsActive),` 187`)}},dependencies:[wt$1,en$1,u,Kc,l$1,g],encapsulation:2})}return o})();var Gr=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-controllers`]],features:[Iv],decls:1354,vars:128,consts:[[`contentReference`,``],[`app220f5a0af5ad41565641ca6d6746a287e8f967d4`,``],[`app941a4b8d582b599f4b12cf7e4883861a4d95eee7`,``],[`appee9d84cb1e7565b4479e8cf324eeb7b73ee20125`,``],[`appf7c3f8c6d779645293921ff2d808b9874fccb1df`,``],[`app6f46770200cb96e6efe8e354401b49ff81dff01a`,``],[`app1f57d9d2f02f8f595e7e3c02959eeec60cd33289`,``],[`app19a5e6e48d55665fab8e0120fa0b4aefae2b3e99`,``],[`appfe54bd08bd29397e727792003336b2593df630f3`,``],[`app4e1d1c6b35773700de948e303e03e2344c44ea26`,``],[`app24980b0b247436aa0767e94c872c2364b131bfac`,``],[`appbd0c0c5b9c5846e49b75679cb6fbcab1e78a3aef`,``],[`app7b13a9eb3c4348e194a387bfe6a8d7f23969fb96`,``],[`app4ff089244639a7935fa1c1843fe7901d74defbd9`,``],[`app06077a6ff446f6969a2f706ec3f6423e0c5903f6`,``],[`appfb2f0ec45d432c0937069bda10f96898dd1e3dd6`,``],[`app9e137e168b846d9a4b15ccc8e42ebae5384122e4`,``],[`app83ea403333896be2e30a19adf5f4a8bc7da1259f`,``],[`app983ca167fd56133ed7910b73dd16a886b4540db7`,``],[`appbe558fb18f814ff6a10ebb4af7db0e3791927437`,``],[1,`content`],[1,`content-inner`],[`id`,`controllers`],[`src`,`/assets/Controllers_1.png`,1,`illustrative-image`],[1,`info`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://docs.nestjs.com/application/validation`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://docs.nestjs.com/recipes/crud-generator#crud-generator`],[`appAnchor`,``,`id`,`routing`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`href`,`controllers#status-code`],[`href`,`https://expressjs.com/en/api.html#res`,`rel`,`nofollow`,`target`,`_blank`],[1,`warning`],[`appAnchor`,``,`id`,`request-object`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/en/api.html#req`],[1,`table-code-asterisk`],[`routerLink`,`/techniques/cookies`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://standardschema.dev/`],[`routerLink`,`/custom-decorators`],[`appAnchor`,``,`id`,`resources`],[`appAnchor`,``,`id`,`route-wildcards`],[`appAnchor`,``,`id`,`route-conflicts-and-resolution-order`],[`appAnchor`,``,`id`,`status-code`],[`appAnchor`,``,`id`,`response-headers`],[`appAnchor`,``,`id`,`redirection`],[`appAnchor`,``,`id`,`route-parameters`],[`href`,`/controllers#route-conflicts-and-resolution-order`],[`appAnchor`,``,`id`,`sub-domain-routing`],[`appAnchor`,``,`id`,`state-sharing`],[`routerLink`,`/fundamentals/injection-scopes`],[`appAnchor`,``,`id`,`asynchronicity`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://rxjs.dev/guide/observable`],[`appAnchor`,``,`id`,`request-payloads`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://docs.nestjs.com/application/validation#stripping-properties`],[`appAnchor`,``,`id`,`query-parameters`],[1,`language-plaintext`],[`routerLink`,`/pipes`],[`appAnchor`,``,`id`,`handling-errors`],[`routerLink`,`/exception-filters`],[`appAnchor`,``,`id`,`observing-routes-in-production`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.observe.nestjs.com/`,`title`,`NestJS Observe`],[`routerLink`,`/observability/overview`],[`routerLink`,`/observability/dashboard`],[`appAnchor`,``,`id`,`full-resource-sample`],[`routerLink`,`/recipes/crud-generator`],[`appAnchor`,``,`id`,`getting-up-and-running`],[`appAnchor`,``,`id`,`library-specific-approach`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/en/api.html#res`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/controllers.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Ra(0,`div`,20,0)(2,`div`,21)(3,`h3`,22),gT(4,`Controllers`),rf(),Ra(5,`p`),gT(6,`Controllers are responsible for handling incoming `),Ra(7,`strong`),gT(8,`requests`),rf(),gT(9,` and sending `),Ra(10,`strong`),gT(11,`responses`),rf(),gT(12,` back to the client.`),rf(),Ra(13,`figure`),qa$1(14,`img`,23),rf(),Ra(1
1875,`p`),gT(16,`A controller's purpose is to handle specific requests for the application. The `),Ra(17,`strong`),gT(18,`routing`),rf(),gT(19,` mechanism determines which controller handles each request. A controller often has multiple routes, and each route can perform a different action.`),rf(),Ra(20,`p`),gT(21,`To create a basic controller, you use classes and `),Ra(22,`strong`),gT(23,`decorators`),rf(),gT(24,`. Decorators associate classes with the required metadata, which Nest uses to build a routing map that connects requests to their corresponding controllers.`),rf(),Ra(25,`blockquote`,24)(26,`strong`),gT(27,`Hint`),rf(),gT(28,` To create a CRUD controller with built-in `),Ra(29,`a`,25),gT(30,`validation`),rf(),gT(31,`, use the CLI's `),Ra(32,`a`,26),gT(33,`CRUD generator`),rf(),gT(34,`: `),Ra(35,`code`),gT(36,`nest g resource [name]`),rf(),gT(37,`. 188`),rf(),Ra(38,`h4`,27)(39,`span`),gT(40,`Routing`),rf()(),Ra(41,`p`),gT(42,`The following example uses the `),Ra(43,`code`),gT(44,`@Controller()`),rf(),gT(45,` decorator, which is `),Ra(46,`strong`),gT(47,`required`),rf(),gT(48,` to define a basic controller, with an optional route path prefix of `),Ra(49,`code`),gT(50,`cats`),rf(),gT(51,`. A path prefix in the `),Ra(52,`code`),gT(53,`@Controller()`),rf(),gT(54,` decorator groups related routes and reduces repetitive code. For example, to group the routes that manage cat entities under the `),Ra(55,`code`),gT(56,`/cats`),rf(),gT(57,` path, specify the `),Ra(58,`code`),gT(59,`cats`),rf(),gT(60,` prefix in the `),Ra(61,`code`),gT(62,`@Controller()`),rf(),gT(63,` decorator. You then don't need to repeat that portion of the path for each route in the file.`),rf(),Ra(64,`app-copy-button`,28)(65,`span`,29),gT(66),TT(67,`extension`),qa$1(68,`app-tabs`,null,1),rf(),Ra(70,`pre`)(71,`code`,30),gT(72,` 189import { Controller, Get } from '@nestjs/common'; 190 191@Controller('cats') 192export class CatsController { 193 @Get() 194 findAll(): string { 195 return 'This action returns all cats'; 196 } 197} 198`),rf()(),Ra(73,`pre`)(74,`code`,30),gT(75,` 199import { Controller, Get } from '@nestjs/common'; 200 201@Controller('cats') 202export class CatsController { 203 @Get() 204 findAll() { 205 return 'This action returns all cats'; 206 } 207} 208`),rf()()(),Ra(76,`blockquote`,24)(77,`strong`),gT(78,`Hint`),rf(),gT(79,` To create a controller using the CLI, run the `),Ra(80,`code`),gT(81,`$ nest g controller [name]`),rf(),gT(82,` command. 209`),rf(),Ra(83,`p`),gT(84,`The `),Ra(85,`code`),gT(86,`@Get()`),rf(),gT(87,` HTTP request method decorator placed before the `),Ra(88,`code`),gT(89,`findAll()`),rf(),gT(90,` method tells Nest to create a handler for a specific endpoint. An endpoint is defined by the HTTP request method (GET in this case) and the route path. The route path of a handler combines the (optional) prefix declared for the controller `),Ra(91,`strong`),gT(92,`and`),rf(),gT(93,` any path specified in the method's decorator. Since the example sets a prefix (`),Ra(94,`code`),gT(95,`cats`),rf(),gT(96,`) and no path in the method decorator, Nest maps `),Ra(97,`code`),gT(98,`GET /cats`),rf(),gT(99,` requests to this handler.`),rf(),Ra(100,`p`),gT(101,`If the method decorator also specified a path, such as `),Ra(102,`code`),gT(103,`@Get('breed')`),rf(),gT(104,`, the resulting route would be `),Ra(105,`code`),gT(106,`GET /cats/breed`),rf(),gT(107,`.`),rf(),Ra(108,`p`),gT(109,`When a `),Ra(110,`code`),gT(111,`GET /cats`),rf(),gT(112,` request arrives, Nest routes it to the user-defined `),Ra(113,`code`),gT(114,`findAll()`),rf(),gT(115,` method. The method name is arbitrary: you must declare a method to bind the route to, but Nest attaches no significance to its name.`),rf(),Ra(116,`p`),gT(117,`This method returns a 200 status code along with the associated response, which in this case is a string. To explain why, we need to introduce the two `),Ra(118,`strong`),gT(119,`different`),rf(),gT(120,` options Nest provides for manipulating responses:`),rf(),Ra(121,`table`)(122,`tr`)(123,`td`),gT(124,`Standard (recommended)`),rf(),Ra(125,`td`),gT(126,` With this built-in method, when a route handler returns a JavaScript object or array, it is `),Ra(127,`strong`),gT(128,`automatically`),rf(),gT(129,` serialized to JSON. When it returns a JavaScript primitive type (e.g., `),Ra(130,`code`),gT(131,`string`),rf(),gT(132,`, `),Ra(133,`code`),gT(134,`number`),rf(),gT(135,`, `),Ra(136,`code`),gT(137,`boolean`),rf(),gT(138,`), Nest sends the value without attempting to serialize it. Response handling is therefore straightforward: return the value, and Nest takes care of the rest. `),qa$1(139,`br`)(140,`br`),gT(141,` The response's `),Ra(142,`strong`),gT(143,`status code`),rf(),gT(144,` is 200 by default, except for POST requests, which use 201. You can change this behavior b
209y adding the `),Ra(145,`code`),gT(146,`@HttpCode(...)`),rf(),gT(147,` decorator at the handler level (see `),Ra(148,`a`,31),gT(149,`Status code`),rf(),gT(150,`). `),rf()(),Ra(151,`tr`)(152,`td`),gT(153,`Library-specific`),rf(),Ra(154,`td`),gT(155,` You can use the library-specific (e.g., Express) `),Ra(156,`a`,32),gT(157,`response object`),rf(),gT(158,`, injected with the `),Ra(159,`code`),gT(160,`@Res()`),rf(),gT(161,` decorator in the route handler signature (e.g., `),Ra(162,`code`),gT(163,`findAll(@Res() response)`),rf(),gT(164,`). This approach lets you use the native response handling methods exposed by that object. For example, with Express, you can construct responses with code like `),Ra(165,`code`),gT(166,`response.status(200).send()`),rf(),gT(167,`. `),rf()()(),Ra(168,`blockquote`,33)(169,`strong`),gT(170,`Warning`),rf(),gT(171,` Nest detects when a handler uses either `),Ra(172,`code`),gT(173,`@Res()`),rf(),gT(174,` or `),Ra(175,`code`),gT(176,`@Next()`),rf(),gT(177,`, which indicates that you have chosen the library-specific option. If both approaches are used at the same time, the standard approach is `),Ra(178,`strong`),gT(179,`automatically disabled`),rf(),gT(180,` for that route and no longer works as expected. To combine them (for example, to inject the response object only to set cookies or headers while leaving the rest to the framework), set the `),Ra(181,`code`),gT(182,`passthrough`),rf(),gT(183,` option to `),Ra(184,`code`),gT(185,`true`),rf(),gT(186,` in the `),Ra(187,`code`),gT(188),rf(),gT(189,` decorator. 210`),rf(),Ra(190,`p`),qa$1(191,`app-banner-devtools`),rf(),Ra(192,`h4`,34)(193,`span`),gT(194,`Request object`),rf()(),Ra(195,`p`),gT(196,`Handlers often need access to the client's `),Ra(197,`strong`),gT(198,`request`),rf(),gT(199,` details. Nest provides access to the `),Ra(200,`a`,35),gT(201,`request object`),rf(),gT(202,` of the underlying platform (Express by default). To access it, add the `),Ra(203,`code`),gT(204,`@Req()`),rf(),gT(2
21005,` decorator to the handler's signature, which instructs Nest to inject it.`),rf(),Ra(206,`app-copy-button`,28)(207,`span`,29),gT(208),TT(209,`extension`),qa$1(210,`app-tabs`,null,2),rf(),Ra(212,`pre`)(213,`code`,30),gT(214,` 211import { Controller, Get, Req } from '@nestjs/common'; 212import type { Request } from 'express'; 213 214@Controller('cats') 215export class CatsController { 216 @Get() 217 findAll(@Req() request: Request): string { 218 return 'This action returns all cats'; 219 } 220} 221`),rf()(),Ra(215,`pre`)(216,`code`,30),gT(217,` 222import { Controller, Bind, Get, Req } from '@nestjs/common'; 223 224@Controller('cats') 225export class CatsController { 226 @Get() 227 @Bind(Req()) 228 findAll(request) { 229 return 'This action returns all cats'; 230 } 231} 232`),rf()()(),Ra(218,`blockquote`,24)(219,`strong`),gT(220,`Hint`),rf(),gT(221,` To take advantage of `),Ra(222,`code`),gT(223,`express`),rf(),gT(224,` typings (as in the `),Ra(225,`code`),gT(226,`request: Request`),rf(),gT(227,` parameter above), install the `),Ra(228,`code`),gT(229,`@types/express`),rf(),gT(230,` package. 233`),rf(),Ra(231,`p`),gT(232,`The request object represents the HTTP request and has properties for the query string, route parameters, HTTP headers, and body (see the `),Ra(233,`a`,35),gT(234,`Express documentation`),rf(),gT(235,`). In most cases, you don't need to access these properties manually. Instead, use dedicated decorators such as `),Ra(236,`code`),gT(237,`@Body()`),rf(),gT(238,` or `),Ra(239,`code`),gT(240,`@Query()`),rf(),gT(241,`, which are available out of the box. The following table lists the provided decorators and the platform-specific objects they represent.`),rf(),Ra(242,`table`)(243,`tbody`)(244,`tr`)(245,`td`)(246,`code`),gT(247,`@Request(), @Req()`),rf()(),Ra(248,`td`)(249,`code`),gT(250,`req`),rf()()(),Ra(251,`tr`)(252,`td`)(253,`code`),gT(254,`@Response(), @Res()`),rf(),Ra(255,`span`,36),gT(256,`*`),rf()(),Ra(257,`td`)(258,`code`),gT(259,`res`),rf()()(),Ra(260,`tr`)(261,`td`)(262,`code`),gT(263,`@Next()`),rf()(),Ra(264,`td`)(265,`code`),gT(266,`next`),rf()()(),Ra(267,`tr`)(268,`td`)(269,`code`),gT(270,`@Session()`),rf()(),Ra(271,`td`)(272,`code`),gT(273,`req.session`),rf()()(),Ra(274,`tr`)(275,`td`)(276,`code`),gT(277,`@Param(key?: string)`),rf()(),Ra(278,`td`)(279,`code`),gT(280,`req.params`),rf(),gT(281,` / `),Ra(282,`code`),gT(283,`req.params[key]`),rf()()(),Ra(284,`tr`)(285,`td`)(286,`code`),gT(287,`@Body(key?: string)`),rf()(),Ra(288,`td`)(289,`code`),gT(290,`req.body`),rf(),gT(291,` / `),Ra(292,`code`),gT(293,`req.body[key]`),rf()()(),Ra(294,`tr`)(295,`td`)(296,`code`),gT(297,`@Query(key?: string)`),rf()(),Ra(298,`td`)(299,`code`),gT(300,`req.query`),rf(),gT(301,` / `),Ra(302,`code`),gT(303,`req.query[key]`),rf()()(),Ra(304,`tr`)(305,`td`)(306,`code`),gT(307,`@Headers(name?: string)`),rf()(),Ra(308,`td`)(309,`code`),gT(310,`req.headers`),rf(),gT(311,` / `),Ra(312,`code`),gT(313,`req.headers[name]`),rf()()(),Ra(314,`tr`)(315,`td`)(316,`code`),gT(317,`@Cookies(name?: string)`),rf()(),Ra(318,`td`),gT(319,`request cookies / the cookie named `),Ra(320,`code`),gT(321,`name`),rf(),gT(322,` (see `),Ra(323,`a`,37),gT(324,`Cookies`),rf(),gT(325,`)`),rf()(),Ra(326,`tr`)(327,`td`)(328,`code`),gT(329,`@SignedCookies(name?: string)`),rf()(),Ra(330,`td`),gT(331,`verified signed cookies / the signed cookie named `),Ra(332,`code`),gT(333,`name`),rf()()(),Ra(334,`tr`)(335,`td`)(336,`code`),gT(337,`@Ip()`),rf()(),Ra(338,`td`)(339,`code`),gT(340,`req.ip`),rf()()(),Ra(341,`tr`)(342,`td`)(343,`code`),gT(344,`@HostParam()`),rf()(),Ra(345,`td`)(346,`code`),gT(347,`req.hosts`),rf()()()()(),Ra(348,`p`)(349,`sup`),gT(350,`* `),rf(),gT(351,`For compatibility with typings across underlying HTTP platforms (e.g., Express and Fastify), Nest provides the `),Ra(352,`code`),gT(353,`@Res()`),rf(),gT(354,` and `),Ra(355,`code`),gT(356,`@Response()`),rf(),gT(357,` decorators. `),Ra(358,`code`),gT(359,`@Res()`),rf(),gT(360,` is an alias for `),Ra(361,`code`),gT(362,`@Response()`),rf(),gT(363,`. Both directly expose the native `),Ra(364,`code`),gT(365,`response`),rf(),gT(366,` object of the underlying platform. When using them, also install the typings for the underlying library (e.g., `),Ra(367,`code`),gT(368,`@types/express`),rf(),gT(369,`) to take full advantage of them. When you inject either `),Ra(370,`code`),gT(371,`@Res()`),rf(),gT(372,` or `),Ra(373,`co
233de`),gT(374,`@Response()`),rf(),gT(375,` in a route handler, you put Nest into `),Ra(376,`strong`),gT(377,`library-specific mode`),rf(),gT(378,` for that handler, and you become responsible for managing the response. You must then send a response by calling a method on the `),Ra(379,`code`),gT(380,`response`),rf(),gT(381,` object (e.g., `),Ra(382,`code`),gT(383,`res.json(...)`),rf(),gT(384,` or `),Ra(385,`code`),gT(386,`res.send(...)`),rf(),gT(387,`); otherwise, the request will hang.`),rf(),Ra(388,`p`)(389,`code`),gT(390,`@Body()`),rf(),gT(391,`, `),Ra(392,`code`),gT(393,`@Query()`),rf(),gT(394,`, `),Ra(395,`code`),gT(396,`@Param()`),rf(),gT(397,`, and `),Ra(398,`code`),gT(399,`@RawBody()`),rf(),gT(400,` also accept an options object with `),Ra(401,`code`),gT(402,`schema`),rf(),gT(403,` and `),Ra(404,`code`),gT(405,`pipes`),rf(),gT(406,` properties. This lets you attach `),Ra(407,`a`,38),gT(408,`Standard Schema`),rf(),gT(409,` compatible schemas, such as those created with Zod, Valibot, or ArkType, directly to route parameters.`),rf(),Ra(410,`app-copy-button`)(411,`pre`)(412,`code`,30),gT(413,` 234@Post() 235create(@Body({ schema: createCatSchema }) createCatDto: CreateCatDto) { 236 return this.catsService.create(createCatDto); 237} 238 239@Get(':id') 240findOne(@Param('id', { schema: z.coerce.number().int().positive() }) id: number) { 241 return this.catsService.findOne(id); 242} 243`),rf()()(),Ra(414,`p`),gT(415,`On their own, these decorators only attach the schema as metadata. To validate against it, register the built-in `),Ra(416,`code`),gT(417,`StandardSchemaValidationPipe`),rf(),gT(418,` or a custom pipe that reads `),Ra(419,`code`),gT(420,`metadata.schema`),rf(),gT(421,`.`),rf(),Ra(422,`blockquote`,24)(423,`strong`),gT(424,`Hint`),rf(),gT(425,` To learn how to create your own decorators, see the `),Ra(426,`a`,39),gT(427,`Custom route decorators`),rf(),gT(428,` chapter. 244`),rf(),Ra(429,`h4`,40)(430,`span`),gT(431,`Resources`),rf()(),Ra(432,`p`),gT(433,`Earlier, we defined an endpoint to fetch the cats resource (`),Ra(434,`strong`),gT(435,`GET`),rf(),gT(436,` route). Typically, we also want an endpoint that creates new records. Let's add a `),Ra(437,`strong`),gT(438,`POST`),rf(),gT(439,` handler:`),rf(),Ra(440,`app-copy-button`,28)(441,`span`,29),gT(442),TT(443,`extension`),qa$1(444,`app-tabs`,null,3),rf(),Ra(446,`pre`)(447,`code`,30),gT(448,` 245import { Controller, Get, Post } from '@nestjs/common'; 246 247@Controller('cats') 248export class CatsController { 249 @Post() 250 create(): string { 251 return 'This action adds a new cat'; 252 } 253 254 @Get() 255 findAll(): string { 256 return 'This action returns all cats'; 257 } 258} 259`),rf()(),Ra(449,`pre`)(450,`code`,30),gT(451,` 260import { Controller, Get, Post } from '@nestjs/common'; 261 262@Controller('cats') 263export class CatsController { 264 @Post() 265 create() { 266 return 'This action adds a new cat'; 267 } 268 269 @Get() 270 findAll() { 271 return 'This action returns all cats'; 272 } 273} 274`),rf()()(),Ra(452,`p`),gT(453,`Nest provides decorators for all standard HTTP methods: `),Ra(454,`code`),gT(455,`@Get()`),rf(),gT(456,`, `),Ra(457,`code`),gT(458,`@Post()`),rf(),gT(459,`, `),Ra(460,`code`),gT(461,`@Put()`),rf(),gT(462,`, `),Ra(463,`code`),gT(464,`@Delete()`),rf(),gT(465,`, `),Ra(466,`code`),gT(467,`@Patch()`),rf(),gT(468,`, `),Ra(469,`code`),gT(470,`@Options()`),rf(),gT(471,`, `),Ra(472,`code`),gT(473,`@Head()`),rf(),gT(474,`, and `),Ra(475,`code`),gT(476,`@QueryMethod()`),rf(),gT(477,`. The last one maps to the `),Ra(478,`code`),gT(479,`QUERY`),rf(),gT(480,` method; it is named `),Ra(481,`code`),gT(482,`QueryMethod`),rf(),gT(483,` to avoid a clash with the `),Ra(484,`code`),gT(485,`@Query()`),rf(),gT(486,` parameter decorator. In addition, `),Ra(487,`code`),gT(488,`@All()`),rf(),gT(489,` defines an endpoint that handles all of them.`),rf(),Ra(490,`h4`,41)(491,`span`),gT(492,`Route wildcards`),rf()(),Ra(493,`p`),gT(494,`Nest also supports pattern-based routes. For example, an asterisk (`),Ra(495,`code`),gT(496,`*`),rf(),gT(497,`) at the end of a path acts as a wildcard that matches any combination of characters. In the following example, the `),Ra(498,`code`),gT(499,`findAll(
274)`),rf(),gT(500,` method is executed for any route that starts with `),Ra(501,`code`),gT(502,`abcd/`),rf(),gT(503,`, regardless of the number of characters that follow.`),rf(),Ra(504,`app-copy-button`)(505,`pre`)(506,`code`,30),gT(507,` 275@Get('abcd/*') 276findAll() { 277 return 'This route uses a wildcard'; 278} 279`),rf()()(),Ra(508,`p`),gT(509,`The `),Ra(510,`code`),gT(511,`'abcd/*'`),rf(),gT(512,` route path matches `),Ra(513,`code`),gT(514,`abcd/`),rf(),gT(515,`, `),Ra(516,`code`),gT(517,`abcd/123`),rf(),gT(518,`, `),Ra(519,`code`),gT(520,`abcd/abc`),rf(),gT(521,`, and so on. In string-based paths, the hyphen (`),Ra(522,`code`),gT(523,`-`),rf(),gT(524,`) and the dot (`),Ra(525,`code`),gT(526,`.`),rf(),gT(527,`) are interpreted literally.`),rf(),Ra(528,`p`),gT(529,`This approach works with both Express and Fastify. Express v5, however, made its routing stricter: in plain Express, a wildcard must be named for the route to work (e.g., `),Ra(530,`code`),gT(531),rf(),gT(532,`, where `),Ra(533,`code`),gT(534,`splat`),rf(),gT(535,` is an arbitrary name for the wildcard parameter with no special meaning). Because Nest provides a compatibility layer for Express, you can still use an unnamed asterisk (`),Ra(536,`code`),gT(537,`*`),rf(),gT(538,`) as a wildcard.`),rf(),Ra(539,`p`),gT(540,`For asterisks in the `),Ra(541,`strong`),gT(542,`middle of a route`),rf(),gT(543,`, Express requires named wildcards (e.g., `),Ra(544,`code`),gT(545),rf(),gT(546,`), while Fastify does not support them at all.`),rf(),Ra(547,`h4`,42)(548,`span`),gT(549,`Route conflicts and resolution order`),rf()(),Ra(550,`p`),gT(551,`Nest registers routes in declaration order. On order-sensitive adapters, such as the default Express adapter, a parametric route can therefore silently shadow a more specific one:`),rf(),Ra(552,`app-copy-button`)(553,`pre`)(554,`code`,30),gT(555,` 280@Controller('users') 281export class UsersController { 282 @Get(':id') 283 findOne() {} 284 285 @Get('me') // never reached: \`:id\` matches "me" first 286 findMe() {} 287} 288`),rf()()(),Ra(556,`p`),gT(557,`This is easy to miss: the application boots without a warning, and the problem only surfaces at runtime, when a request is dispatched to the wrong handler. Pipes such as `),Ra(558,`code`),gT(559,`ParseIntPipe`),rf(),gT(560,` do not help here, because routing selects the handler `),Ra(561,`em`),gT(562,`before`),rf(),gT(563,` any pipe runs.`),rf(),Ra(564,`p`),gT(565,`NestJS v12 adds two opt-in `),Ra(566,`code`),gT(567,`NestApplicationOptions`),rf(),gT(568,` properties that guard against this. Both default to the previous behavior, so existing applications are unaffected unless you set them.`),rf(),Ra(569,`p`)(570,`strong`)(571,`code`),gT(572,`routeConflictPolicy`),rf()(),gT(573,` enables bootstrap-time diagnostics. For each kind of conflict, it takes a severity of `),Ra(574,`code`),gT(575,`'off'`),rf(),gT(576,` (the default), `),Ra(577,`code`),gT(578,`'warn'`),rf(),gT(579,`, or `),Ra(580,`code`),gT(581,`'error'`),rf(),gT(582,`:`),rf(),Ra(583,`app-copy-button`)(584,`pre`)(585,`code`,30),gT(586,` 289const app = await NestFactory.create(AppModule, { 290 routeConflictPolicy: { duplicate: 'error', shadow: 'warn' }, 291}); 292`),rf()()(),Ra(587,`table`)(588,`tr`)(589,`td`)(590,`code`),gT(591,`duplicate`),rf()(),Ra(592,`td`),gT(593,`Two routes share an identical method, path, host, and version.`),rf()(),Ra(594,`tr`)(595,`td`)(596,`code`),gT(597,`shadow`),rf()(),Ra(598,`td`),gT(599,`Two route patterns can match the same request (e.g., `),Ra(600,`code`),gT(601,`/users/me`),rf(),gT(602,` and `),Ra(603,`code`),gT(604,`/users/:id`),rf(),gT(605,`).`),rf()()(),Ra(606,`p`),gT(607,`With `),Ra(608,`code`),gT(609,`'error'`),rf(),gT(610,`, all offending pairs are aggregated into a single `),Ra(611,`code`),gT(612,`RouteConflictException`),rf(),gT(613,`, thrown when the application initializes (in `),Ra(614,`code`),gT(615,`app.init()`),rf(),gT(616,`, or in `),Ra(617,`code`),gT(618,`app.listen()`),rf(),gT(619,` if you don't call `),Ra(620,`code`),gT(621,`init()`),rf(),gT(622,` explicitly). This way, you see every conflict at once rather than one per restart.`),rf(),Ra(623,`p`)(624,`strong`)(625,`code`),gT(626,`routeResolutionStrategy`),rf()(),gT(627,` controls registration order. Setting it to `),Ra(628,`code`),gT(629,`'specificity'`),rf(),gT(630,` registers the most specific routes first (literal segments take precedence over parametric segments, which take precedence over wildcards), so the example above works regardless of declaration order:`),rf(),Ra(631,`app-copy-button`)(632,`pre`)(633,`code`,30),gT(634,` 293const app = await NestFactory.create(AppModule, { 294 routeResolutionStrategy: 'specificity', 295}); 296`),rf()()(),Ra(635,`p`),gT(636,`The default is `),Ra(637,`code`),gT(638,`'declaration'`),rf(),gT(639,`, which preserves the previous behavior.`),rf(),Ra(640,`blockquote`,24)(641,`strong`),gT(642,`Hint`),rf(),gT(643,` Apart from the `),Ra(644,`code`),gT(645,`duplicate`),rf(),gT(646,` policy, these options only matter on adapters where registration order affects matching. `),Ra(647,`code`),gT(648,`ExpressAdapter`),rf(),gT(649,` is order-sensitive; `),Ra(650,`code`),gT(651,`FastifyAdapter`),rf(),gT(652,` is not, because its router (`),Ra(653,`code`),gT(654,`find-my-way`),rf(),gT(655,`) already ranks routes by specificity. On Fastify, the `),Ra(656,`code`),gT(657,`shadow`),rf(),gT(658,` policy is a no-op and `),Ra(659,`co
296de`),gT(660,`'specificity'`),rf(),gT(661,` sorting has no effect, while the `),Ra(662,`code`),gT(663,`duplicate`),rf(),gT(664,` policy is honored on both adapters. The `),Ra(665,`code`),gT(666,`RouteConflictPolicy`),rf(),gT(667,`, `),Ra(668,`code`),gT(669,`RouteConflictPolicyLevel`),rf(),gT(670,`, and `),Ra(671,`code`),gT(672,`RouteResolutionStrategy`),rf(),gT(673,` types are exported from `),Ra(674,`code`),gT(675,`@nestjs/common`),rf(),gT(676,`. 297`),rf(),Ra(677,`h4`,43)(678,`span`),gT(679,`Status code`),rf()(),Ra(680,`p`),gT(681,`As mentioned, the default response `),Ra(682,`strong`),gT(683,`status code`),rf(),gT(684,` is `),Ra(685,`strong`),gT(686,`200`),rf(),gT(687,`, except for POST requests, which default to `),Ra(688,`strong`),gT(689,`201`),rf(),gT(690,`. You can change this behavior with the `),Ra(691,`code`),gT(692,`@HttpCode(...)`),rf(),gT(693,` decorator at the handler level.`),rf(),Ra(694,`app-copy-button`)(695,`pre`)(696,`code`,30),gT(697,` 298@Post() 299@HttpCode(204) 300create() { 301 return 'This action adds a new cat'; 302} 303`),rf()()(),Ra(698,`blockquote`,24)(699,`strong`),gT(700,`Hint`),rf(),gT(701,` Import `),Ra(702,`code`),gT(703,`HttpCode`),rf(),gT(704,` from the `),Ra(705,`code`),gT(706,`@nestjs/common`),rf(),gT(707,` package. 304`),rf(),Ra(708,`p`),gT(709,`Often, the status code isn't static but depends on various factors. In that case, use a library-specific `),Ra(710,`strong`),gT(711,`response`),rf(),gT(712,` object (injected with `),Ra(713,`code`),gT(714,`@Res()`),rf(),gT(715,`) or, in case of an error, throw an exception.`),rf(),Ra(716,`h4`,44)(717,`span`),gT(718,`Response headers`),rf()(),Ra(719,`p`),gT(720,`To set a custom response header, use either the `),Ra(721,`code`),gT(722,`@Header()`),rf(),gT(723,` decorator or a library-specific response object (and call `),Ra(724,`code`),gT(725,`res.header()`),rf(),gT(726,` directly).`),rf(),Ra(727,`app-copy-button`)(728,`pre`)(729,`code`,30),gT(730,` 305@Post() 306@Header('Cache-Control', 'no-store') 307create() { 308 return 'This action adds a new cat'; 309} 310`),rf()()(),Ra(731,`blockquote`,24)(732,`strong`),gT(733,`Hint`),rf(),gT(734,` Import `),Ra(735,`code`),gT(736,`Header`),rf(),gT(737,` from the `),Ra(738,`code`),gT(739,`@nestjs/common`),rf(),gT(740,` package. 311`),rf(),Ra(741,`h4`,45)(742,`span`),gT(743,`Redirection`),rf()(),Ra(744,`p`),gT(745,`To redirect a response to a specific URL, use either the `),Ra(746,`code`),gT(747,`@Redirect()`),rf(),gT(748,` decorator or a library-specific response object (and call `),Ra(749,`code`),gT(750,`res.redirect()`),rf(),gT(751,` directly).`),rf(),Ra(752,`p`)(753,`code`),gT(754,`@Redirect()`),rf(),gT(755,` takes two optional arguments, `),Ra(756,`code`),gT(757,`url`),rf(),gT(758,` and `),Ra(759,`code`),gT(760,`statusCode`),rf(),gT(761,`. If omitted, `),Ra(762,`code`),gT(763,`statusCode`),rf(),gT(764,` defaults to `),Ra(765,`code`),gT(766,`302`),rf(),gT(767,` (`),Ra(768,`code`),gT(769,`Found`),rf(),gT(770,`).`),rf(),Ra(771,`app-copy-button`)(772,`pre`)(773,`code`,30),gT(774,` 312@Get() 313@Redirect('https://nestjs.com', 301) 314`),rf()()(),Ra(775,`blockquote`,24)(776,`strong`),gT(777,`Hint`),rf(),gT(778,` To determine the HTTP status code or the redirect URL dynamically, return an object that follows the `),Ra(779,`code`),gT(780,`HttpRedirectResponse`),rf(),gT(781,` interface (exported from `),Ra(782,`code`),gT(783,`@nestjs/common`),rf(),gT(784,`). 315`),rf(),Ra(785,`p`),gT(786,`Returned values override any arguments passed to the `),Ra(787,`code`),gT(788,`@Redirect()`),rf(),gT(789,` decorator. For example:`),rf(),Ra(790,`app-copy-button`,28)(791,`span`,29),qa$1(792,`app-tabs`,null,4),rf(),Ra(794,`pre`)(795,`code`,30),gT(796,` 316@Get('docs') 317@Redirect('https://docs.nestjs.com', 302) 318getDocs(@Query('version') version) { 319 if (version && version === '5') { 320 return { url: 'https://docs.nestjs.com/v5/' }; 321 } 322} 323`),rf()(),Ra(797,`pre`)(798,`code`,30),gT(799,` 324@Get('docs') 325@Redirect('https://docs.nestjs.com', 302) 326@Bind(Query('version')) 327getDocs(version) { 328 if (version && version === '5') { 329 return { url: 'https://docs.nestjs.com/v5/' }; 330 } 331} 332`),rf()()(),Ra(800,`h4`,46)(801,`span`),gT(802,`Route parameters`),rf()(),Ra(803,`p`),gT(804,`Routes with static paths don't work when you need to accept `),Ra(805,`strong`),gT(806,`dynamic data`),rf(),gT(807,` as part of the request (e.g., `),Ra(808,`
332code`),gT(809,`GET /cats/1`),rf(),gT(810,` to get the cat with id `),Ra(811,`code`),gT(812,`1`),rf(),gT(813,`). To define a route with parameters, add route parameter `),Ra(814,`strong`),gT(815,`tokens`),rf(),gT(816,` to the route path to capture the dynamic values from the URL, as the `),Ra(817,`code`),gT(818,`@Get()`),rf(),gT(819,` decorator in the example below shows. You can then access these route parameters with the `),Ra(820,`code`),gT(821,`@Param()`),rf(),gT(822,` decorator, added to the method signature.`),rf(),Ra(823,`blockquote`,24)(824,`strong`),gT(825,`Hint`),rf(),gT(826,` Declare routes with parameters after any static paths, so that the parameterized path doesn't intercept traffic destined for the static one. See `),Ra(827,`a`,47),gT(828,`Route conflicts and resolution order`),rf(),gT(829,` for the options that detect this at bootstrap or resolve it for you. 333`),rf(),Ra(830,`app-copy-button`,28)(831,`span`,29),qa$1(832,`app-tabs`,null,5),rf(),Ra(834,`pre`)(835,`code`,30),gT(836,` 334@Get(':id') 335findOne(@Param() params: any): string { 336 console.log(params.id); 337 return \`This action returns a #\${params.id} cat\`; 338} 339`),rf()(),Ra(837,`pre`)(838,`code`,30),gT(839,` 340@Get(':id') 341@Bind(Param()) 342findOne(params) { 343 console.log(params.id); 344 return \`This action returns a #\${params.id} cat\`; 345} 346`),rf()()(),Ra(840,`p`),gT(841,`The `),Ra(842,`code`),gT(843,`@Param()`),rf(),gT(844,` decorator decorates a method parameter (`),Ra(845,`code`),gT(846,`params`),rf(),gT(847,` in the example above), making the `),Ra(848,`strong`),gT(849,`route`),rf(),gT(850,` parameters available as properties of that parameter inside the method. As the code shows, you access the `),Ra(851,`code`),gT(852,`id`),rf(),gT(853,` parameter as `),Ra(854,`code`),gT(855,`params.id`),rf(),gT(856,`. Alternatively, pass a specific parameter token to the decorator and reference the route parameter directly by name in the method body.`),rf(),Ra(857,`blockquote`,24)(858,`strong`),gT(859,`Hint`),rf(),gT(860,` Import `),Ra(861,`code`),gT(862,`Param`),rf(),gT(863,` from the `),Ra(864,`code`),gT(865,`@nestjs/common`),rf(),gT(866,` package. 347`),rf(),Ra(867,`app-copy-button`,28)(868,`span`,29),qa$1(869,`app-tabs`,null,6),rf(),Ra(871,`pre`)(872,`code`,30),gT(873,` 348@Get(':id') 349findOne(@Param('id') id: string): string { 350 return \`This action returns a #\${id} cat\`; 351} 352`),rf()(),Ra(874,`pre`)(875,`code`,30),gT(876,` 353@Get(':id') 354@Bind(Param('id')) 355findOne(id) { 356 return \`This action returns a #\${id} cat\`; 357} 358`),rf()()(),Ra(877,`h4`,48)(878,`span`),gT(879,`Sub-domain routing`),rf()(),Ra(880,`p`),gT(881,`The `),Ra(882,`code`),gT(883,`@Controller()`),rf(),gT(884,` decorator can take a `),Ra(885,`code`),gT(886,`host`),rf(),gT(887,` option to require that the HTTP host of incoming requests matches a specific value.`),rf(),Ra(888,`app-copy-button`,28)(889,`span`,29),gT(890),TT(891,`extension`),qa$1(892,`app-tabs`,null,7),rf(),Ra(894,`pre`)(895,`code`,30),gT(896,` 359@Controller({ host: 'admin.example.com' }) 360export class AdminController { 361 @Get() 362 index(): string { 363 return 'Admin page'; 364 } 365} 366`),rf()(),Ra(897,`pre`)(898,`code`,30),gT(899,` 367@Controller({ host: 'admin.example.com' }) 368export class AdminController { 369 @Get() 370 index() { 371 return 'Admin page'; 372 } 373} 374`),rf()()(),Ra(900,`blockquote`,33)(901,`strong`),gT(902,`Warning`),rf(),gT(903,` Since `),Ra(904,`strong`),gT(905,`Fastify`),rf(),gT(906,` does not support nested routers, use the default Express adapter if you rely on sub-domain routing. 375`),rf(),Ra(907,`p`),gT(908,`Like a route `),Ra(909,`code`),gT(910,`path`),rf(),gT(911,`, the `),Ra(912,`code`),gT(913,`host`),rf(),gT(914,` option can use tokens to capture the dynamic value at that position in the host name, as the host parameter token in the `),Ra(915,`code`),gT(916,`@Controller()`),rf(),gT(917,` decorator below shows. You can access host parameters declared this way with the `),Ra(918,`code`),gT(919,`@HostParam()`),rf(),gT(920,` decorator, added to the method signature.`),rf(),Ra(921,`app-copy-button`,28)(922,`span`,29),gT(923),TT(924,`extension`),qa$1(925,`app-tabs`,null,8),rf(),Ra(927,`pre`)(928,`code`,30),gT(929,` 376@Controller({ host: ':account.example.com' }) 377export class AccountController { 378 @Get() 379 getInfo(@HostParam('account') account: string) { 380 return account; 381 } 382} 383`),rf()(),Ra(930,`pre`)(931,`code`,30),gT(932,` 384@Controller({ host: ':account.example.com' }) 385export class AccountController { 386 @Get() 387 @Bind(HostParam('account')) 388 getInfo(account) { 389 return account; 390 } 391} 392`),rf()()(),Ra(933,`h4`,49)(934,`span`),gT(935,`State sharing`),rf()(),Ra(936,`p`),gT(937,`Developers coming from other programming languages may be surprised to learn that in Nest, nearly everything is shared across incoming requests. This includes resources such as the database connection pool, singleton services with global state, and more. Node.js doesn't follow the request/response multi-threaded stateless model, in which each request is handled by a separate thread. As a result, using singleton instances in Nest is fully `),Ra(938,`strong`),gT(939,`safe`),rf(),gT(940,`.`),rf(),Ra(941,`p`),gT(942,`That said, some edge cases may require request-based lifetimes for controllers, such as per-request caching in GraphQL applications, request tracking, or multi-tenancy. To learn how to control this, see `),Ra(943,`a`,50),gT(944,`Injection scopes`),rf(),gT(945,`.`),rf(),Ra(946,`h4`,51)(947,`span`),gT(948,`Asynchronicity`),rf()(),Ra(949,`p`),gT(950,`Modern JavaScript relies heavily on `),Ra(951,`strong`),gT(952,`asynchronous`),rf(),gT(953,` data handling, and Nest fully supports `),Ra(954,`code`),gT(955,`async`),rf(),gT(956,` functions. An `),Ra(957,`code`),gT(958,`async`),rf(),gT(959,` function always returns a `),Ra(960,`code`),gT(961,`Promise`),rf(),gT(962,`, so a route handler can return a deferred value that Nest resolves automatically:`),rf(),Ra(963,`app-copy-button`,28)(964,`span`,29),gT(965),TT(966,`extension`),qa$1(967,`app-tabs`,null,9),rf(),Ra(969,`pre`)(970,`code`,30),gT(971,` 393@Get()
394async findAll(): Promise<any[]> { 395 return []; 396} 397`),rf()(),Ra(972,`pre`)(973,`code`,30),gT(974,` 398@Get() 399async findAll() { 400 return []; 401} 402`),rf()()(),Ra(975,`p`),gT(976,`Route handlers can also return RxJS `),Ra(977,`a`,52),gT(978,`observable streams`),rf(),gT(979,`. Nest subscribes to the stream internally and resolves the last emitted value once the stream completes.`),rf(),Ra(980,`app-copy-button`,28)(981,`span`,29),gT(982),TT(983,`extension`),qa$1(984,`app-tabs`,null,10),rf(),Ra(986,`pre`)(987,`code`,30),gT(988,` 403@Get() 404findAll(): Observable<any[]> { 405 return of([]); 406} 407`),rf()(),Ra(989,`pre`)(990,`code`,30),gT(991,` 408@Get() 409findAll() { 410 return of([]); 411} 412`),rf()()(),Ra(992,`p`),gT(993,`Both approaches are valid; choose the one that best suits your needs.`),rf(),Ra(994,`h4`,53)(995,`span`),gT(996,`Request payloads`),rf()(),Ra(997,`p`),gT(998,`The POST route handler in the previous example didn't accept any client parameters. Let's fix that by adding the `),Ra(999,`code`),gT(1e3,`@Body()`),rf(),gT(1001,` decorator.`),rf(),Ra(1002,`p`),gT(1003,`Before we proceed (if you're using TypeScript), we need to define the `),Ra(1004,`strong`),gT(1005,`DTO`),rf(),gT(1006,` (Data Transfer Object) schema. A DTO is an object that defines the shape of data sent over the network. You could define the DTO schema using `),Ra(1007,`strong`),gT(1008,`TypeScript`),rf(),gT(1009,` interfaces or plain classes, but `),Ra(1010,`strong`),gT(1011,`classes`),rf(),gT(1012,` are the recommended choice. Classes are part of the JavaScript ES6 standard, so they are preserved as real entities in the compiled JavaScript. TypeScript interfaces, by contrast, are removed during transpilation, so Nest can't reference them at runtime. This matters because features such as `),Ra(1013,`strong`),gT(1014,`pipes`),rf(),gT(1015,` rely on access to the metatype of variables at runtime, which is only possible with classes.`),rf(),Ra(1016,`p`),gT(1017,`Create the `),Ra(1018,`code`),gT(1019,`CreateCatDto`),rf(),gT(1020,` class:`),rf(),Ra(1021,`app-copy-button`,28)(1022,`span`,29),gT(1023),TT(1024,`extension`),qa$1(1025,`app-tabs`,null,11),rf(),Ra(1027,`pre`)(1028,`code`,30),gT(1029,` 413export class CreateCatDto { 414 name: string; 415 age: number; 416 breed: string; 417} 418`),rf()()(),Ra(1030,`p`),gT(1031,`It has three basic properties. We can now use the new DTO inside the `),Ra(1032,`code`),gT(1033,`CatsController`),rf(),gT(1034,`:`),rf(),Ra(1035,`app-copy-button`,28)(1036,`span`,29),gT(1037),TT(1038,`extension`),qa$1(1039,`app-tabs`,null,12),rf(),Ra(1041,`pre`)(1042,`code`,30),gT(1043,` 419@Post() 420async create(@Body() createCatDto: CreateCatDto) { 421 return 'This action adds a new cat'; 422} 423`),rf()(),Ra(1044,`pre`)(1045,`code`,30),gT(1046,` 424@Post() 425@Bind(Body()) 426async create(createCatDto) { 427 return 'This action adds a new cat'; 428} 429`),rf()()(),Ra(1047,`blockquote`,24)(1048,`strong`),gT(1049,`Hint`),rf(),gT(1050,` The `),Ra(1051,`code`),gT(1052,`ValidationPipe`),rf(),gT(1053,` can filter out properties that the route handler should not receive. You whitelist the acceptable properties, and any property not in the whitelist is automatically stripped from the resulting object. In the `),Ra(1054,`code`),gT(1055,`CreateCatDto`),rf(),gT(1056,` example, the whitelist consists of the `),Ra(1057,`code`),gT(1058,`name`),rf(),gT(1059,`, `),Ra(1060,`code`),gT(1061,`age`),rf(),gT(1062,`, and `),Ra(1063,`code`),gT(1064,`breed`),rf(),gT(1065,` properties. Learn more in `),Ra(1066,`a`,54),gT(1067,`Stripping properties`),rf(),gT(1068,`. 430`),rf(),Ra(1069,`h4`,55)(1070,`span`),gT(1071,`Query parameters`),rf()(),Ra(1072,`p`),gT(1073,`To extract query parameters from incoming requests, use the `),Ra(1074,`code`),gT(1075,`@Query()`),rf(),gT(1076,` decorator.`),rf(),Ra(1077,`p`),gT(1078,`Consider a route that filters a list of cats by query parameters such as `),Ra(1079,`code`),gT(1080,`age`),rf(),gT(1081,` and `),Ra(1082,`code`),gT(1083,`breed`),rf(),gT(1084,`. First, define the query parameters in the `),Ra(1085,`code`),gT(1086,`CatsController`),rf(),gT(1087,`:`),rf(),Ra(1088,`app-copy-button`,28)(1089,`span`,29),gT(1090),TT(1091,`extension`),qa$1(1092,`app-tabs`,null,13),rf(),Ra(1094,`pre`)(1095,`code`,30),gT(1096,` 431@Get() 432async findAll(@Query('age') age: number, @Query('breed') breed: string) { 433 return \`This action returns all cats filtered by age: \${age} and breed: \${breed}\`; 434} 435`),rf()(),Ra(1097,`pre`)(1098,`code`,30),gT(1099,` 436@Get() 437@Bind(Query('age'), Query('breed')) 438async findAll(age, breed) { 439 return \`This action returns all cats filtered by age: \${age} and breed: \${breed}\`; 440} 441`),rf()()(),Ra(1100,`p`),gT(1101,`In this example, the `),Ra(1102,`code`),gT(1103,`@Query()`),rf(),gT(1104,` decorator extracts the values of `),Ra(1105,`code`),gT(1106,`age`),rf(),gT(1107,` and `),Ra(1108,`code`),gT(1109,`breed`),rf(),gT(1110,` from the query string. For example, a request to:`),rf(),Ra(1111,`pre`)(1112,`code`,56),gT(1113,` 442GET /cats?age=2&breed=Persian 443`),rf()(),Ra(1114,`p`),gT(1115,`results in `),Ra(1116,`code`),gT(1117,`age`),rf(),gT(1118,` being `),Ra(1119,`code`),gT(1120,`'2'`),rf(),gT(1121,` and `),Ra(1122,`code`),gT(1123,`breed`),rf(),gT(1124,` being `),Ra(1125,`code`),gT(1126,`'Persian'`),rf(),gT(1127,`. Query parameter values arrive as strings, and the `),Ra(1128,`code`),gT(1129,`number`),rf(),gT(1130,` type annotation alone doesn't convert them. To receive a number, apply a pipe such as `),Ra(1131,`code`),gT(1132,`ParseIntPipe`),rf(),gT(1133,` (see `),Ra(1134,`a`,57),gT(1135,`Pipes`),rf(),gT(1136,`).`),rf(),Ra(1137,`p`),gT(1138,`If your application needs to handle more complex query parameters, such as nested objects or arrays:`),rf(),Ra(1139,`pre`)(1140,`code`,56),gT(1141,` 444?filter[where][name]=John&filter[where][age]=30 445?item[]=1&item[]=2 446`),rf()(),Ra(1142,`p`),gT(1143,`configure your HTTP adapter (Express or Fastify) to use an appropriate query parser. In Express, use the `),Ra(1144,`code`),gT(1145,`extended`),rf(),gT(1146,` parser, which supports rich query objects:`),rf(),Ra(1147,`app-copy-button`,28)(1148,`span`,29),gT(1149),TT(1150,`extension`),qa$1(1151,`app-tabs`,null,14),rf(),Ra(1153,`pre`)(1154,`code`,30),gT(1155,` 447const app = await NestFactory.create<NestExpressApplication>(AppModule); 448app.set('query parser', 'extended'); 449`),rf()(),Ra(1156,`pre`)(1157,`code`,30),gT(1158,` 450const app = await NestFactory.create(AppModule); 451app.set('query parser', 'extended'); 452`),rf()()(),Ra(1159,`p`),gT(1160,`In Fastify, use the `),Ra(1161,`code`),gT(1162,`querystringParser`),rf(),gT(1163,` option:`),rf(),Ra(1164,`app-copy-button`,28)(1165,`span`,29),gT(1166),TT(1167,`extension`),qa$1(1168,`app-tabs`,null,15),rf(),Ra(1170,`pre`)(1171,`code`,30),gT(1172,` 453const app = await NestFactory.create<NestFastifyApplication>( 454 AppModule, 455 new FastifyAdapter({ 456 querystringParser: (str) => qs.parse(str), 457 }), 458); 459`),rf()(),Ra(1173,`pre`)(1174,`code`,30),gT(1175,` 460const app = await NestFactory.create( 461 AppModule, 462 new FastifyAdapter({ 463 querystringParser: (str) => qs.parse(str), 464 }), 465); 466`),rf()()(),Ra(1176,`blockquote`,24)(1177,`strong`),gT(1178,`Hint`),rf(),Ra(1179,`code`),gT(1180,`qs`),rf(),gT(1181,` is a query string parser that supports nesting and arrays. Install it with `),Ra(1182,`code`),gT(1183,`npm install qs`),rf(),gT(1184,`. 467`),rf(),Ra(1185,`h4`,58)(1186,`span`),gT(1187,`Handling errors`),rf()(),Ra(1188,`p`),gT(1189,`Handling errors (i.e., working with exceptions) is covered in the `),Ra(1190,`a`,59),gT(1191,`Exception filters`),rf(),gT(1192,` chapter.`),rf(),Ra(1193,`h4`,60)(1194,`span`),gT(1195,`Observing routes in production`),rf()(),Ra(1196,`p`),gT(1197,`A controller that behaves perfectly on your machine can behave very differently under real traffic. In production, the question is never "does this route work?" but "why did `),Ra(1198,`code`),gT(1199,`GET /cats/:id`),rf(),gT(1200,` go from 40 ms to 900 ms after Tuesday's deploy, and is it every request or one unlucky tenant?"`),rf(),Ra(1201,`p`),gT(1202,`Route handlers are the natural unit for answering that question, and `),Ra(1203,`a`,61),gT(1204,`NestJS Observe`),rf(),gT(1205,` reports on exactly that unit. Because the `),Ra(1206,`code`),gT(1207,`@nestjs/observe`),rf(),gT(1208,` SDK hooks into Nest's own request lifecycle rather than wrapping the HTTP server, every measurement is labeled with the route pattern you declared (`),Ra(1209,`code`),gT(1210,`GET /cats/:id`),rf(),gT(1211,`, not 10,000 distinct URLs). Each route is therefore a single line you can sort, chart, and alert on:`),rf(),Ra(1212,`app-copy-button`)(1213,`pre`)(1214,`code`,30),gT(1215,` 468const app = await NestFactory.create(AppModule, { 469 instrument: ObserveInstrument, 470}); 471`),rf()()(),Ra(1216,`p`),gT(1217,`Together with importing `),Ra(1218,`code`),gT(1219,`ObserveModule.forRoot()`),rf(),gT(1220,` into your root module, that is the whole integration. From there, a slow route is three clicks away: sort the route list by p95; open the operation to see whether the regression is constant or spiky and whether it started with a release; then open one slow execution and read its waterfall to see which controller, service method, or query held the time. Time is attributed per `),Ra(1221,`strong`),gT(1222,`class and method`),rf(),gT(1223,`, with awaited time subtracted, so `),Ra(1224,`code`),gT(1225,`CatsService.findOne()`),rf(),gT(1226,` spending 800 ms in its own code is immediately distinguishable from `),Ra(1227,`code`),gT(1228,`CatsService.findOne()`),rf(),gT(1229,` waiting 800 ms on the database.`),rf(),Ra(1230,`p`),gT(1231,`See the `),Ra(1232,`a`,62),gT(1233,`Observability`),rf(),gT(1234,` chapter to get set up, and `),Ra(1235,`a`,63),gT(1236,`Dashboard`),rf(),gT(1237,` for the full walk from an alert down to a single request.`),rf(),Ra(1238,`h4`,64)(1239,`span`),gT(1240,`Full resource sample`),rf()(),Ra(1241,`p`),gT(1242,`The following example uses several of the available decorators to create a basic controller. The controller exposes a few methods to access and manipulate internal data.`),rf(),Ra(1243,`app-copy-button`,28)(1244,`span`,29),gT(1245),TT(1246,`extension`),qa$1(1247,`app-tabs`,null,16),rf(),Ra(1249,`pre`)(1250,`c
471ode`,30),gT(1251,` 472import { Controller, Get, Query, Post, Body, Put, Param, Delete } from '@nestjs/common'; 473import { CreateCatDto, UpdateCatDto, ListAllEntities } from './dto.js'; 474 475@Controller('cats') 476export class CatsController { 477 @Post() 478 create(@Body() createCatDto: CreateCatDto) { 479 return 'This action adds a new cat'; 480 } 481 482 @Get() 483 findAll(@Query() query: ListAllEntities) { 484 return \`This action returns all cats (limit: \${query.limit} items)\`; 485 } 486 487 @Get(':id') 488 findOne(@Param('id') id: string) { 489 return \`This action returns a #\${id} cat\`; 490 } 491 492 @Put(':id') 493 update(@Param('id') id: string, @Body() updateCatDto: UpdateCatDto) { 494 return \`This action updates a #\${id} cat\`; 495 } 496 497 @Delete(':id') 498 remove(@Param('id') id: string) { 499 return \`This action removes a #\${id} cat\`; 500 } 501} 502`),rf()(),Ra(1252,`pre`)(1253,`code`,30),gT(1254,` 503import { Controller, Get, Query, Post, Body, Put, Param, Delete, Bind } from '@nestjs/common'; 504 505@Controller('cats') 506export class CatsController { 507 @Post() 508 @Bind(Body()) 509 create(createCatDto) { 510 return 'This action adds a new cat'; 511 } 512 513 @Get() 514 @Bind(Query()) 515 findAll(query) { 516 return \`This action returns all cats (limit: \${query.limit} items)\`; 517 } 518 519 @Get(':id') 520 @Bind(Param('id')) 521 findOne(id) { 522 return \`This action returns a #\${id} cat\`; 523 } 524 525 @Put(':id') 526 @Bind(Param('id'), Body()) 527 update(id, updateCatDto) { 528 return \`This action updates a #\${id} cat\`; 529 } 530 531 @Delete(':id') 532 @Bind(Param('id')) 533 remove(id) { 534 return \`This action removes a #\${id} cat\`; 535 } 536} 537`),rf()()(),Ra(1255,`blockquote`,24)(1256,`strong`),gT(1257,`Hint`),rf(),gT(1258,` The Nest CLI provides a generator (schematic) that automatically creates `),Ra(1259,`strong`),gT(1260,`all the boilerplate code`),rf(),gT(1261,`, so you don't have to write it manually. Learn more in the `),Ra(1262,`a`,65),gT(1263,`CRUD generator`),rf(),gT(1264,` recipe. 538`),rf(),Ra(1265,`h4`,66)(1266,`span`),gT(1267,`Getting up and running`),rf()(),Ra(1268,`p`),gT(1269,`Even with `),Ra(1270,`code`),gT(1271,`CatsController`),rf(),gT(1272,` fully defined, Nest doesn't know about it yet and won't create an instance of the class.`),rf(),Ra(1273,`p`),gT(1274,`Controllers must always belong to a module, which is why we include the `),Ra(1275,`code`),gT(1276,`controllers`),rf(),gT(1277,` array in the `),Ra(1278,`code`),gT(1279,`@Module()`),rf(),gT(1280,` decorator. Since we haven't defined any modules other than the root `),Ra(1281,`code`),gT(1282,`AppModule`),rf(),gT(1283,`, we'll use it to register `),Ra(1284,`code`),gT(1285,`CatsController`),rf(),gT(1286,`:`),rf(),Ra(1287,`app-copy-button`,28)(1288,`span`,29),gT(1289),TT(1290,`extension`),qa$1(1291,`app-tabs`,null,17),rf(),Ra(1293,`pre`)(1294,`code`,30),gT(1295,` 539import { Module } from '@nestjs/common'; 540import { CatsController } from './cats/cats.controller.js'; 541 542@Module({ 543 controllers: [CatsController], 544}) 545export class AppModule {} 546`),rf()()(),Ra(1296,`p`),gT(1297,`With this metadata attached to the module class through the `),Ra(1298,`code`),gT(1299,`@Module()`),rf(),gT(1300,` decorator, Nest can determine which controllers to mount.`),rf(),Ra(1301,`h4`,67)(1302,`span`),gT(1303,`Library-specific approach`),rf()(),Ra(1304,`p`),gT(1305,`So far, we've covered the standard Nest way of manipulating responses. The alternative is to use a library-specific `),Ra(1306,`a`,68),gT(1307,`response object`),rf(),gT(1308,`, injected with the `),Ra(1309,`code`),gT(1310,`@Res()`),rf(),gT(1311,` decorator. To highlight the differences, let's rewrite `),Ra(1312,`code`),gT(1313,`CatsController`),rf(),gT(1314,` as follows:`),rf(),Ra(1315,`app-copy-button`,28)(1316,`span`,29),qa$1(1317,`app-tabs`,null,18),rf(),Ra(1319,`pre`)(1320,`code`,30),gT(1321,` 547import { Controller, Get, Post, Res, HttpStatus } from '@nestjs/common'; 548import type { Response } from 'express'; 549 550@Controller('cats') 551export class CatsController { 552 @Post() 553 create(@Res() res: Response) { 554 res.status(HttpStatus.CREATED).send(); 555 } 556 557 @Get() 558 findAll(@Res() res: Response) { 559 res.status(HttpStatus.OK).json([]); 560 } 561} 562`),rf()(),Ra(1322,`pre`)(1323,`code`,30),gT(1324,` 563import { Controller, Get, Post, Bind, Res, HttpStatus } from '@nestjs/common'; 564 565@Controller('cats') 566export class CatsController { 567 @Post() 568 @Bind(Res()) 569 create(res) { 570 res.status(HttpStatus.CREATED).send(); 571 } 572 573 @Get() 574 @Bind(Res()) 575 findAll(res) { 576 res.status(HttpStatus.OK).json([]); 577 } 578} 579`),rf()()(),Ra(1325,`p`),gT(1326,`This approach offers more flexibility by giving full control over the response object (e.g., header manipulation and access to library-specific features), but it should be used with caution. It is generally less clear and has some downsides. The main disadvantage is that your co
579de becomes platform-dependent, since different underlying libraries may expose different APIs on the response object. It also makes testing harder, as you need to mock the response object, among other things.`),rf(),Ra(1327,`p`),gT(1328,`In addition, this approach loses compatibility with Nest features that rely on standard response handling, such as interceptors and the `),Ra(1329,`code`),gT(1330,`@HttpCode()`),rf(),gT(1331,` / `),Ra(1332,`code`),gT(1333,`@Header()`),rf(),gT(1334,` decorators. To address this, enable the `),Ra(1335,`code`),gT(1336,`passthrough`),rf(),gT(1337,` option:`),rf(),Ra(1338,`app-copy-button`,28)(1339,`span`,29),qa$1(1340,`app-tabs`,null,19),rf(),Ra(1342,`pre`)(1343,`code`,30),gT(1344,` 580@Get() 581findAll(@Res({ passthrough: true }) res: Response) { 582 res.status(HttpStatus.OK); 583 return []; 584} 585`),rf()(),Ra(1345,`pre`)(1346,`code`,30),gT(1347,` 586@Get() 587@Bind(Res({ passthrough: true })) 588findAll(res) { 589 res.status(HttpStatus.OK); 590 return []; 591} 592`),rf()()(),Ra(1348,`p`),gT(1349,`This way, you can interact with the native response object (for example, to set cookies or headers based on specific conditions) while leaving the rest to the framework.`),rf()(),Ra(1350,`a`,69),qa$1(1351,`i`,70),Ra(1352,`span`),gT(1353,`Edit on GitHub`),rf()()()),a&2){let l=qS(69),d=qS(211),m=qS(445),h=qS(793),u=qS(833),b=qS(870),S=qS(893),k=qS(926),C=qS(968),w=qS(985),P=qS(1026),F=qS(1040),J=qS(1093),Y=qS(1152),Z=qS(1169),$=qS(1248),Ie=qS(1292),le=qS(1318),ee=qS(1341);LC(66),uf(` `,MT(67,86,`cats.controller`,l.isJsActive),` 593`),LC(4),kv(`hide`,l.isJsActive),LC(3),kv(`hide`,!l.isJsActive),LC(115),Vv(`@Res(`,`{`,` passthrough: true `,`}`,`)`),LC(20),uf(` `,MT(209,89,`cats.controller`,d.isJsActive),` 594`),LC(4),kv(`hide`,d.isJsActive),LC(3),kv(`hide`,!d.isJsActive),LC(227),uf(` `,MT(443,92,`cats.controller`,m.isJsActive),` 595`),LC(4),kv(`hide`,m.isJsActive),LC(3),kv(`hide`,!m.isJsActive),LC(82),uf(`abcd/`,`{`,`*splat}`),LC(14),uf(`ab`,`{`,`*splat}cd`),LC(249),kv(`hide`,h.isJsActive),LC(3),kv(`hide`,!h.isJsActive),LC(37),kv(`hide`,u.isJsActive),LC(3),kv(`hide`,!u.isJsActive),LC(34),kv(`hide`,b.isJsActive),LC(3),kv(`hide`,!b.isJsActive),LC(16),uf(` `,MT(891,95,`admin.controller`,S.isJsActive),` 596`),LC(4),kv(`hide`,S.isJsActive),LC(3),kv(`hide`,!S.isJsActive),LC(26),uf(` `,MT(924,98,`account.controller`,k.isJsActive),` 597`),LC(4),kv(`hide`,k.isJsActive),LC(3),kv(`hide`,!k.isJsActive),LC(35),uf(` `,MT(966,101,`cats.controller`,C.isJsActive),` 598`),LC(4),kv(`hide`,C.isJsActive),LC(3),kv(`hide`,!C.isJsActive),LC(10),uf(` `,MT(983,104,`cats.controller`,w.isJsActive),` 599`),LC(4),kv(`hide`,w.isJsActive),LC(3),kv(`hide`,!w.isJsActive),LC(34),uf(` `,MT(1024,107,`create-cat.dto`,P.isJsActive),` 600`),LC(14),uf(` `,MT(1038,110,`cats.controller`,F.isJsActive),` 601`),LC(4),kv(`hide`,F.isJsActive),LC(3),kv(`hide`,!F.isJsActive),LC(46),uf(` `,MT(1091,113,`cats.controller`,J.isJsActive),` 602`),LC(4),kv(`hide`,J.isJsActive),LC(3),kv(`hide`,!J.isJsActive),LC(52),uf(` `,MT(1150,116,`main`,Y.isJsActive),` 603`),LC(4),kv(`hide`,Y.isJsActive),LC(3),kv(`hide`,!Y.isJsActive),LC(10),uf(` `,MT(1167,119,`main`,Z.isJsActive),` 604`),LC(4),kv(`hide`,Z.isJsActive),LC(3),kv(`hide`,!Z.isJsActive),LC(72),uf(` `,MT(1246,122,`cats.controller`,$.isJsActive),` 605`),LC(4),kv(`hide`,$.isJsActive),LC(3),kv(`hide`,!$.isJsActive),LC(37),uf(` `,MT(1290,125,`app.module`,Ie.isJsActive),` 606`),LC(30),kv(`hide`,le.isJsActive),LC(3),kv(`hide`,!le.isJsActive),LC(20),kv(`hide`,ee.isJsActive),LC(3),kv(`hide`,!ee.isJsActive)}},dependencies:[wt$1,en$1,u,s,Kc,g],encapsulation:2})}return o})();var Ur=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-custom-decorators`]],features:[Iv],decls:334,vars:32,consts:[[`contentReference`,``],[`app9b67d4ea1a2b6a863eb55e0cefdc6e5978563a04`,``],[`appdd9ebb61a82ca645cecffe614314039a40c46ad2`,``],[`app2815ed0e0a204fcdf4c4481bdabdfa50651cc5dd`,``],[`appd89361e2f984fc7e3a16e73447d2b8be2a193852`,``],[`app2d87ecfebbfd65c8f26300c1bd80dce53f99fd4f`,``],[`appfb491f6f1fd6178731d74bcaf3cf74a5096a3f83`,``],[1,`content`],[1,`content-inner`],[`id`,`custom-route-decorators`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841`],[1,`external`],[`appAnchor`,``,`id`,`param-decorators`],[1,`language-typescript`],[1,`with-heading`],[1,`filename`],[`appAnchor`,``,`id`,`passing-data`],[`href`,`/security/authentication#implementing-the-authentication-guard`],[1,`language-json`],[1,`info`],[`appAnchor`,``,`id`,`working-with-pipes`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://standardschema.dev/`],[`href`,`/application/validation#validating-custom-decorators`],[`appAnchor`,``,`id`,`decorator-composition`],[1,`warning`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/custom-decorators.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Ra(0,`div`,7,
6060)(2,`div`,8)(3,`h3`,9),gT(4,`Custom route decorators`),rf(),Ra(5,`p`),gT(6,`Nest is built around a language feature called `),Ra(7,`strong`),gT(8,`decorators`),rf(),gT(9,`. Decorators are well established in many programming languages but are still relatively new to JavaScript. For a deeper look at how decorators work, see `),Ra(10,`a`,10),gT(11,`this article`),rf(),gT(12,`. Here's a simple definition:`),rf(),Ra(13,`blockquote`,11),gT(14,` An ES2016 decorator is an expression which returns a function and can take a target, name and property descriptor as arguments. You apply it by prefixing the decorator with an `),Ra(15,`code`),gT(16,`@`),rf(),gT(17,` character and placing this at the very top of what you are trying to decorate. Decorators can be defined for either a class, a method or a property. 607`),rf(),Ra(18,`h4`,12)(19,`span`),gT(20,`Param decorators`),rf()(),Ra(21,`p`),gT(22,`Nest provides a set of `),Ra(23,`strong`),gT(24,`param decorators`),rf(),gT(25,` that you can use in HTTP route handlers. The following table lists them along with the plain Express (or Fastify) objects they represent:`),rf(),Ra(26,`table`)(27,`tbody`)(28,`tr`)(29,`td`)(30,`code`),gT(31,`@Request(), @Req()`),rf()(),Ra(32,`td`)(33,`code`),gT(34,`req`),rf()()(),Ra(35,`tr`)(36,`td`)(37,`code`),gT(38,`@Response(), @Res()`),rf()(),Ra(39,`td`)(40,`code`),gT(41,`res`),rf()()(),Ra(42,`tr`)(43,`td`)(44,`code`),gT(45,`@Next()`),rf()(),Ra(46,`td`)(47,`code`),gT(48,`next`),rf()()(),Ra(49,`tr`)(50,`td`)(51,`code`),gT(52,`@Session()`),rf()(),Ra(53,`td`)(54,`code`),gT(55,`req.session`),rf()()(),Ra(56,`tr`)(57,`td`)(58,`code`),gT(59,`@Param(param?: string)`),rf()(),Ra(60,`td`)(61,`code`),gT(62,`req.params`),rf(),gT(63,` / `),Ra(64,`code`),gT(65,`req.params[param]`),rf()()(),Ra(66,`tr`)(67,`td`)(68,`code`),gT(69,`@Body(param?: string)`),rf()(),Ra(70,`td`)(71,`code`),gT(72,`req.body`),rf(),gT(73,` / `),Ra(74,`code`),gT(75,`req.body[param]`),rf()()(),Ra(76,`tr`)(77,`td`)(78,`code`),gT(79,`@Query(param?: string)`),rf()(),Ra(80,`td`)(81,`code`),gT(82,`req.query`),rf(),gT(83,` / `),Ra(84,`code`),gT(85,`req.query[param]`),rf()()(),Ra(86,`tr`)(87,`td`)(88,`code`),gT(89,`@Headers(param?: string)`),rf()(),Ra(90,`td`)(91,`code`),gT(92,`req.headers`),rf(),gT(93,` / `),Ra(94,`code`),gT(95,`req.headers[param]`),rf()()(),Ra(96,`tr`)(97,`td`)(98,`code`),gT(99,`@Ip()`),rf()(),Ra(100,`td`)(101,`code`),gT(102,`req.ip`),rf()()(),Ra(103,`tr`)(104,`td`)(105,`code`),gT(106,`@HostParam(param?: string)`),rf()(),Ra(107,`td`)(108,`code`),gT(109,`req.hosts`),rf(),gT(110,` / `),Ra(111,`code`),gT(112,`req.hosts[param]`),rf()()()()(),Ra(113,`p`),gT(114,`You can also create your own `),Ra(115,`strong`),gT(116,`custom decorators`),rf(),gT(117,`. To see why this is useful, consider a common pattern in Node.js applications: properties are attached to the `),Ra(118,`strong`),gT(119,`request`),rf(),gT(120,` object and then extracted manually in each route handler, with code like the following:`),rf(),Ra(121,`app-copy-button`)(122,`pre`)(123,`code`,13),gT(124,` 608const user = req.user; 609`),rf()()(),Ra(125,`p`),gT(126,`To make your code more readable and transparent, you can create a `),Ra(127,`code`),gT(128,`@User()`),rf(),gT(129,` decorator and reuse it across all of your controllers:`),rf(),Ra(130,`app-copy-button`,14)(131,`span`,15),gT(132),TT(133,`extension`),qa$1(134,`app-tabs`,null,1),rf(),Ra(136,`pre`)(137,`code`,13),gT(138,` 610import { createParamDecorator, ExecutionContext } from '@nestjs/common'; 611 612export const User = createParamDecorator( 613 (data: unknown, ctx: ExecutionContext) => { 614 const request = ctx.switchToHttp().getRequest(); 615 return request.user; 616 }, 617); 618`),rf()()(),Ra(139,`p`),gT(140,`You can then use it wherever you need it:`),rf(),Ra(141,`app-copy-button`,14)(142,`span`,15),qa$1(143,`app-tabs`,null,2),rf(),Ra(145,`pre`)(146,`code`,13),gT(147,` 619@Get() 620async findOne(@User() user: UserEntity) { 621 console.log(user); 622} 623`),rf()(),Ra(148,`pre`)(149,`code`,13),gT(150,` 624@Get() 625@Bind(User()) 626async findOne(user) { 627 console.log(user); 628} 629`),rf()()(),Ra(151,`h4`,16)(152,`span`),gT(153,`Passing data`),rf()(),Ra(154,`p`),gT(155,`When the behavior of your decorator depends on some condition, use the `),Ra(156,`code`),gT(157,`data`),rf(),gT(158,` parameter to pass an argument to the decorator's factory function. One use case is a custom decorator that extracts a property from the request object by key. Suppose, for example, that your `),Ra(159,`a`,17),gT
629(160,`authentication layer`),rf(),gT(161,` validates requests and attaches a user entity to the request object. The user entity for an authenticated request might look like this:`),rf(),Ra(162,`pre`)(163,`code`,18),gT(164,` 630{ 631 "id": 101, 632 "firstName": "Alan", 633 "lastName": "Turing", 634 "email": "[email protected]", 635 "roles": ["admin"] 636} 637`),rf()(),Ra(165,`p`),gT(166,`Let's define a decorator that takes a property name as a key and returns the associated value if it exists (or `),Ra(167,`code`),gT(168,`undefined`),rf(),gT(169,` if it doesn't, or if the `),Ra(170,`code`),gT(171,`user`),rf(),gT(172,` object has not been created):`),rf(),Ra(173,`app-copy-button`,14)(174,`span`,15),gT(175),TT(176,`extension`),qa$1(177,`app-tabs`,null,3),rf(),Ra(179,`pre`)(180,`code`,13),gT(181,` 638import { createParamDecorator, ExecutionContext } from '@nestjs/common'; 639 640export const User = createParamDecorator( 641 (data: string, ctx: ExecutionContext) => { 642 const request = ctx.switchToHttp().getRequest(); 643 const user = request.user; 644 645 return data ? user?.[data] : user; 646 }, 647); 648`),rf()(),Ra(182,`pre`)(183,`code`,13),gT(184,` 649import { createParamDecorator } from '@nestjs/common'; 650 651export const User = createParamDecorator((data, ctx) => { 652 const request = ctx.switchToHttp().getRequest(); 653 const user = request.user; 654 655 return data ? user && user[data] : user; 656}); 657`),rf()()(),Ra(185,`p`),gT(186,`You can then access a particular property through the `),Ra(187,`code`),gT(188,`@User()`),rf(),gT(189,` decorator in the controller:`),rf(),Ra(190,`app-copy-button`,14)(191,`span`,15),qa$1(192,`app-tabs`,null,4),rf(),Ra(194,`pre`)(195,`code`,13),gT(196,` 658@Get() 659async findOne(@User('firstName') firstName: string) { 660 console.log(\`Hello \${firstName}\`); 661} 662`),rf()(),Ra(197,`pre`)(198,`code`,13),gT(199,` 663@Get() 664@Bind(User('firstName')) 665async findOne(firstName) { 666 console.log(\`Hello \${firstName}\`); 667} 668`),rf()()(),Ra(200,`p`),gT(201,`You can use the same decorator with different keys to access different properties. If the `),Ra(202,`code`),gT(203,`user`),rf(),gT(204,` object is deep or complex, this keeps route handler implementations simpler and more readable.`),rf(),Ra(205,`blockquote`,19)(206,`strong`),gT(207,`Hint`),rf(),Ra(208,`code`),gT(209,`createParamDecorator<T>()`),rf(),gT(210,` is generic, so you can enforce type safety explicitly, e.g., `),Ra(211,`code`),gT(212,`createParamDecorator<string>((data, ctx) => ...)`),rf(),gT(213,`. Alternatively, specify a parameter type in the factory function, e.g., `),Ra(214,`code`),gT(215,`createParamDecorator((data: string, ctx) => ...)`),rf(),gT(216,`. If you omit both, `),Ra(217,`code`),gT(218,`data`),rf(),gT(219,` is typed as `),Ra(220,`code`),gT(221,`any`),rf(),gT(222,`. 669`),rf(),Ra(223,`h4`,20)(224,`span`),gT(225,`Working with pipes`),rf()(),Ra(226,`p`),gT(227,`Nest treats custom param decorators the same way as the built-in ones (`),Ra(228,`code`),gT(229,`@Body()`),rf(),gT(230,`, `),Ra(231,`code`),gT(232,`@Param()`),rf(),gT(233,`, and `),Ra(234,`code`),gT(235,`@Query()`),rf(),gT(236,`). This means pipes also run for parameters annotated with custom decorators (in our examples, the `),Ra(237,`code`),gT(238,`user`),rf(),gT(239,` argument). You can also apply a pipe directly to the custom decorator:`),rf(),Ra(240,`app-copy-button`,14)(241,`span`,15),qa$1(242,`app-tabs`,null,5),rf(),Ra(244,`pre`)(245,`code`,13),gT(246,` 670@Get() 671async findOne( 672 @User(new ValidationPipe({ validateCustomDecorators: true })) 673 user: UserEntity, 674) { 675 console.log(user); 676} 677`),rf()(),Ra(247,`pre`)(248,`code`,13),gT(249,` 678@Get() 679@Bind(User(new ValidationPipe({ validateCustomDecorators: true }))) 680async findOne(user) { 681 console.log(user); 682} 683`),rf()()(),Ra(250,`blockquote`,19)(251,`strong`),gT(252,`Hint`),rf(),gT(253,` By default, `),Ra(254,`code`),gT(255,`ValidationPipe`),rf(),gT(256,` does not validate arguments annotated with custom decorators. That's why the example above sets the `),Ra(257,`code`),gT(258,`validateCustomDecorators`),rf(),gT(259,` option to `),Ra(260,`code`),gT(261,`true`),rf(),gT(262,`. 684`),rf(),Ra(263,`p`),gT(264,`Custom decorators also accept the `),Ra(265,`code`),gT(266,`schema`),rf(),gT(267,` option of the built-in parameter decorators. Pass a `),Ra(268,`a`,21),gT
684(269,`Standard Schema`),rf(),gT(270,` compatible schema, such as a Zod schema, and a `),Ra(271,`code`),gT(272,`StandardSchemaValidationPipe`),rf(),gT(273,` with the `),Ra(274,`code`),gT(275,`validateCustomDecorators`),rf(),gT(276,` option enabled validates the decorator's value against it:`),rf(),Ra(277,`app-copy-button`)(278,`pre`)(279,`code`,13),gT(280,` 685@Get() 686async findOne(@User('email', { schema: z.email() }) email: string) { 687 console.log(email); 688} 689`),rf()()(),Ra(281,`p`),gT(282,`See `),Ra(283,`a`,22),gT(284,`Validating custom decorators`),rf(),gT(285,` for details.`),rf(),Ra(286,`h4`,23)(287,`span`),gT(288,`Decorator composition`),rf()(),Ra(289,`p`),gT(290,`Nest provides the `),Ra(291,`code`),gT(292,`applyDecorators()`),rf(),gT(293,` helper to compose multiple decorators. For example, suppose you want to combine all authentication-related decorators into a single decorator:`),rf(),Ra(294,`app-copy-button`,14)(295,`span`,15),gT(296),TT(297,`extension`),qa$1(298,`app-tabs`,null,6),rf(),Ra(300,`pre`)(301,`code`,13),gT(302,` 690import { applyDecorators, SetMetadata, UseGuards } from '@nestjs/common'; 691import { ApiBearerAuth, ApiUnauthorizedResponse } from '@nestjs/swagger'; 692 693export function Auth(...roles: Role[]) { 694 return applyDecorators( 695 SetMetadata('roles', roles), 696 UseGuards(AuthGuard, RolesGuard), 697 ApiBearerAuth(), 698 ApiUnauthorizedResponse({ description: 'Unauthorized' }), 699 ); 700} 701`),rf()(),Ra(303,`pre`)(304,`code`,13),gT(305,` 702import { applyDecorators, SetMetadata, UseGuards } from '@nestjs/common'; 703import { ApiBearerAuth, ApiUnauthorizedResponse } from '@nestjs/swagger'; 704 705export function Auth(...roles) { 706 return applyDecorators( 707 SetMetadata('roles', roles), 708 UseGuards(AuthGuard, RolesGuard), 709 ApiBearerAuth(), 710 ApiUnauthorizedResponse({ description: 'Unauthorized' }), 711 ); 712} 713`),rf()()(),Ra(306,`p`),gT(307,`You can then use this custom `),Ra(308,`code`),gT(309,`@Auth()`),rf(),gT(310,` decorator as follows:`),rf(),Ra(311,`app-copy-button`)(312,`pre`)(313,`code`,13),gT(314,` 714@Get('users') 715@Auth('admin') 716findAllUsers() {} 717`),rf()()(),Ra(315,`p`),gT(316,`This applies all four decorators with a single declaration.`),rf(),Ra(317,`blockquote`,24)(318,`strong`),gT(319,`Warning`),rf(),gT(320,` The `),Ra(321,`code`),gT(322,`@ApiHideProperty()`),rf(),gT(323,` decorator from the `),Ra(324,`code`),gT(325,`@nestjs/swagger`),rf(),gT(326,` package is not composable and does not work correctly with the `),Ra(327,`code`),gT(328,`applyDecorators()`),rf(),gT(329,` function. 718`),rf()(),Ra(330,`a`,25),qa$1(331,`i`,26),Ra(332,`span`),gT(333,`Edit on GitHub`),rf()()()),a&2){let l=qS(135),d=qS(144),m=qS(178),h=qS(193),u=qS(243),b=qS(299);LC(132),uf(` `,MT(133,23,`user.decorator`,l.isJsActive),` 719`),LC(13),kv(`hide`,d.isJsActive),LC(3),kv(`hide`,!d.isJsActive),LC(27),uf(` `,MT(176,26,`user.decorator`,m.isJsActive),` 720`),LC(4),kv(`hide`,m.isJsActive),LC(3),kv(`hide`,!m.isJsActive),LC(12),kv(`hide`,h.isJsActive),LC(3),kv(`hide`,!h.isJsActive),LC(47),kv(`hide`,u.isJsActive),LC(3),kv(`hide`,!u.isJsActive),LC(49),uf(` `,MT(297,29,`auth.decorator`,b.isJsActive),` 721`),LC(4),kv(`hide`,b.isJsActive),LC(3),kv(`hide`,!b.isJsActive)}},dependencies:[wt$1,en$1,u,g],encapsulation:2})}return o})();var Wr=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-who-uses`]],features:[Iv],decls:424,vars:0,consts:[[1,`content`],[`id`,`who-is-using-nest`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/nestjs/nest/issues/1006`],[`appAnchor`,``,`id`,`companies`],[1,`companies-wrapper`],[`href`,`https://roche.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/roche-logo.png`,2,`width`,`90px`],[`href`,`https://adidas.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/adidas.svg`,2,`width`,`80px`],[`href`,`https://capgemini.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/capgemini.svg`],[`href`,`https://www.societegenerale.fr/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/societe-generale-logo.png`],[`href`,`https://rewe-digital.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/rewe.svg`,2,`width`,`180px`],[`href`,`https://www.decathlon.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/decathlon.png`],[`href`,`https://www.autodesk.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/autodesk.png`],[`href`,`https://www.neo4j.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/neo4j.png`],[`href`,`https://bmw.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/bmw.svg`],[`href`,`https://gitlab.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/gitlab.png`],[`href`,`https://www.ibm.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/ibm.svg`],[`href`,`https://www.jetbrains.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/jetbrains.svg`],[`href`,`https://www.mercedes-benz.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/mercedes.png`],[`href`,`https://totalenergies.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/totalenergies.svg`],[`href`,`https://www.bytedance.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/bytedance.png`],[`href`,`https://www.shipt.com/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/shipt.png`],[`href`,`https://github.com/Sanofi-IADC`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/sanofi.png`],[`href`,`https://sitepen.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/sitepen.svg`],[`href`,`https://trilon.io`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`https://nestjs.com/img/trilon.png`],[`href`,`https://www.vuestorefront.io/`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/vue-storefront.png`],[`href`,`https://hingehealth.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/hingehealth.png`,2,`width`,`120px`],[`href`,`https://whiskeyhouse.com`,`target`,`_blank`,`rel`,`nofollow`,1,`company-logo`],[`src`,`/assets/logo/whiskey-house.svg`],[1,`companies-list`],[`href`,`https://gorrion.io/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`http://balticdatascience.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://prohabits.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://komed-health.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://kerberus.com.co/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`http://xtremis.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://notadd.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`http://jsdaddy.io/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://yumpingo.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://analytics-importer.cz/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://dayzim.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://wizkids.co.uk/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://pilvia.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://wi-q.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`http://agrofel.com.br`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://societegenerale.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://trashpanda.hulan.nl/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://bytedance.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://votercircle.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://erento.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://ideas.manticore-labs.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://smartexlab.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://automama.ru/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://iflix.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://frontendwatch.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://mobilejazz.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://cgiandi.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.titlex.com.au/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://codengage.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://budacode.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://blueanchor.io/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.easymetrics.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://getapollo.io/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://big-bench.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.qingtui.cn/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.rosebayconsult.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.patrocinium.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://creatorsdaily.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://autoscar.com.br`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.mediktiv.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://harmonize.health`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://accerlery.be`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.facile.it`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://shopback.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.ottonova.de`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.radity.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://globalctoforum.org`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://halojasa.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://hexito.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://rivvy.app`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://padfever.com/`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://datenlotse.org`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://bemum.co`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://weoptimeye.ai`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://nemovote.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://selleo.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://pchas.ir`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://tayeh.ir`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://forwardigital.co.uk`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://rozetka.com.ua`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.itrio.net`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://alexishr.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://dyrector.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://stijlbreuk.nl`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://polygon-software.ch`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://bewith.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://swetrix.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://swyftlogistics.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://evershop.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://e-design.ca`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://growthm
721ill.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://tarken.com.br`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://remato.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://remberg.de/en`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://uninterrupted.tech`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.digando.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://novu.co`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://aqreach.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://phalco.de`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.tesseractpro.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.kwanso.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://cmdn.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://ayo.so`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://devitjobs.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://formation.tech`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://gofirmex.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://vbdhub.org`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://www.arven-tech.com`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://runsystem.net`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://zenobank.io`,`target`,`_blank`,`rel`,`nofollow`],[`href`,`https://github.com/nestjs/docs.nestjs.com/pulls`,`target`,`_blank`]],template:function(a,s){a&1&&(Ra(0,`div`,0)(1,`h3`,1),gT(2,`Who is using Nest?`),rf(),Ra(3,`p`),gT(4,`Nest helps companies of all sizes build their products at scale. 722If you use Nest and would like to be listed here, comment on the `),Ra(5,`a`,2),gT(6,`"Who is using Nest in production?" GitHub issue`),rf(),gT(7,`. 723We'd be glad to add your logo.`),rf(),Ra(8,`h4`,3)(9,`span`),gT(10,`Companies`),rf()(),Ra(11,`p`),gT(12,`To our knowledge, all of the following companies have built projects on top of Nest:`),rf()(),Ra(13,`div`,4)(14,`a`,5),qa$1(15,`img`,6),rf(),Ra(16,`a`,7),qa$1(17,`img`,8),rf(),Ra(18,`a`,9),qa$1(19,`img`,10),rf(),Ra(20,`a`,11),qa$1(21,`img`,12),rf(),Ra(22,`a`,13),qa$1(23,`img`,14),rf(),Ra(24,`a`,15),qa$1(25,`img`,16),rf(),Ra(26,`a`,17),qa$1(27,`img`,18),rf(),Ra(28,`a`,19),qa$1(29,`img`,20),rf(),Ra(30,`a`,21),qa$1(31,`img`,22),rf(),Ra(32,`a`,23),qa$1(33,`img`,24),rf(),Ra(34,`a`,25),qa$1(35,`img`,26),rf(),Ra(36,`a`,27),qa$1(37,`img`,28),rf(),Ra(38,`a`,29),qa$1(39,`img`,30),rf(),Ra(40,`a`,31),qa$1(41,`img`,32),rf(),Ra(42,`a`,33),qa$1(43,`img`,34),rf(),Ra(44,`a`,35),qa$1(45,`img`,36),rf(),Ra(46,`a`,37),qa$1(47,`img`,38),rf(),Ra(48,`a`,39),qa$1(49,`img`,40),rf(),Ra(50,`a`,41),qa$1(51,`img`,42),rf(),Ra(52,`a`,43),qa$1(53,`img`,44),rf(),Ra(54,`a`,45),qa$1(55,`img`,46),rf(),Ra(56,`a`,47),qa$1(57,`img`,48),rf()(),Ra(58,`table`,49)(59,`tr`)(60,`td`)(61,`a`,50),gT(62,`https://gorrion.io/`),rf()()(),Ra(63,`tr`)(64,`td`)(65,`a`,51),gT(66,`http://balticdatascience.com/`),rf()()(),Ra(67,`tr`)(68,`td`)(69,`a`,52),gT(70,`https://prohabits.com/`),rf()()(),Ra(71,`tr`)(72,`td`)(73,`a`,53),gT(74,`https://komed-health.com/`),rf()()(),Ra(75,`tr`)(76,`td`)(77,`a`,54),gT(78,`https://kerberus.com.co/`),rf()()(),Ra(79,`tr`)(80,`td`)(81,`a`,55),gT(82,`http://xtremis.com/`),rf()()(),Ra(83,`tr`)(84,`td`)(85,`a`,56),gT(86,`https://notadd.com/`),rf()()(),Ra(87,`tr`)(88,`td`)(89,`a`,57),gT(90,`http://jsdaddy.io/`),rf()()(),Ra(91,`tr`)(92,`td`)(93,`a`,58),gT(94,`https://yumpingo.com/`),rf()()(),Ra(95,`tr`)(96,`td`)(97,`a`,59),gT(98,`https://analytics-importer.cz/`),rf()()(),Ra(99,`tr`)(100,`td`)(101,`a`,60),gT(102,`https://dayzim.com/`),rf()()(),Ra(103,`tr`)(104,`td`)(105,`a`,61),gT(106,`https://wizkids.co.uk/`),rf()()(),Ra(107,`tr`)(108,`td`)(109,`a`,62),gT(110,`https://pilvia.com/`),rf()()(),Ra(111,`tr`)(112,`td`)(113,`a`,63),gT(114,`https://wi-q.com/`),rf()()(),Ra(115,`tr`)(116,`td`)(117,`a`,64),gT(118,`http://agrofel.com.br`),rf()()(),Ra(119,`tr`)(120,`td`)(121,`a`,65),gT(122,`https://societegenerale.com/`),rf()()(),Ra(123,`tr`)(124,`td`)(125,`a`,66),gT(126,`https://trashpanda.hulan.nl/`),rf()()(),Ra(127,`tr`)(128,`td`)(129,`a`,67),gT(130,`https://bytedance.com/`),rf()()(),Ra(131,`tr`)(132,`td`)(133,`a`,68),gT(134,`https://votercircle.com`),rf()()(),Ra(135,`tr`)(136,`td`)(137,`a`,69),gT(138,`https://erento.com`),rf()()(),Ra(139,`tr`)(140,`td`)(141,`a`,70),gT(142,`https://ideas.manticore-labs.com/`),rf()()(),Ra(143,`tr`)(144,`td`)(145,`a`,71),gT(146,`https://smartexlab.com/`),rf()()(),Ra(147,`tr`)(148,`td`)(149,`a`,72),gT(150,`https://automama.ru/`),rf()()(),Ra(151,`tr`)(152,`td`)(153,`a`,73),gT(154,`https://iflix.com/`),rf()()(),Ra(155,`tr`)(156,`td`)(157,`a`,74),gT(158,`https://frontendwatch.com/`),rf()()(),Ra(159,`tr`)(160,`td`)(161,`a`,75),gT(162,`https://mobilejazz.com/`),rf()()(),Ra(163,`tr`)(164,`td`)(165,`a`,76),gT(166,`https://cgiandi.com/`),rf()()(),Ra(167,`tr`)(168,`td`)(169,`a`,77),gT(170,`https://www.titlex.com.au/`),rf()()(),Ra(171,`tr`)(172,`td`)(173,`a`,78),gT(174,`https://codengage.com/`),rf()()(),Ra(175,`tr`)(176,`td`)(177,`a`,79),gT(178,`https://budacode.com/`),rf()()(),Ra(179,`tr`)(180,`td`)(181,`a`,80),gT(182,`https://blueanchor.io/`),rf()()(),Ra(183,`tr`)(184,`td`)(185,`a`,81),gT(186,`https://www.easymetrics.com/`),rf()()(),Ra(187,`tr`)(188,`td`)(189,`a`,82),gT(190,`https://getapollo.io/`),rf()()(),Ra(191,`tr`)(192,`td`)(193,`a`,83),gT(194,`https://big-bench.com/`),rf()()(),Ra(195,`tr`)(196,`td`)(197,`a`,84),gT(198,`https://www.qingtui.cn/`),rf()()(),Ra(199,`tr`)(200,`td`)(201,`a`,85),gT(202,`https://www.rosebayconsult.com/`),rf()()(),Ra(203,`tr`)(204,`td`)(205,`a`,86),gT(206,`https://www.patrocinium.com/`),rf()()(),Ra(207,`tr`)(208,`td`)(209,`a`,87),gT(210,`https://creatorsdaily.com`),rf()()(),Ra(211,`tr`)(212,`td`)(213,`a`,88),gT(214,`https://autoscar.com.br`),rf()()(),Ra(215,`tr`)(216,`td`)(217,`a`,89),gT(218,`https://www.mediktiv.com`),rf()()(),Ra(219,`tr`)(220,`td`)(221,`a`,90),gT(222,`https://harmonize.health`),rf()()(),Ra(223,`tr`)(224,`td`)(225,`a`,91),gT(226,`https://accerlery.be`),rf()()(),Ra(227,`tr`)(228,`td`)(229,`a`,92),gT(230,`https://www.facile.it`),rf()()(),Ra(231,`tr`)(232,`td`)(233,`a`,93),gT(234,`https://shopback.com`),rf()()(),Ra(235,`tr`)(236,`td`)(237,`a`,94),gT(238,`https://www.ottonova.de`),rf()()(),Ra(239,`tr`)(240,`td`)(241,`a`,95),gT(242,`https://www.radity.com`),rf()()(),Ra(243,`tr`)(244,`td`)(245,`a`,96),gT(246,`https://globalctoforum.org`),rf()()(),Ra(247,`tr`)(248,`td`)(249,`a`,97),gT(250,`https://halojasa.com`),rf()()(),Ra(251,`tr`)(252,`td`)(253,`a`,98),gT(254,`https://hexito.com`),rf()()(),Ra(255,`tr`)(256,`td`)(257,`a`,99),gT(258,`https://rivvy.app`),rf()()(),Ra(259,`tr`)(260,`td`)(261,`a`,100),gT(262,`https://padfever.com/`),rf()()(),Ra(263,`tr`)(264,`td`)(265,`a`,101),gT(266,`https://datenlotse.org`),rf()()(),Ra(267,`tr`)(268,`td`)(269,`a`,102),gT(270,`https://bemum.co`),rf()()(),Ra(271,`tr`)(272,`td`)(273,`a`,103),gT(274,`https://weoptimeye.ai`),rf()()(),Ra(275,`tr`)(276,`td`)(277,`a`,104),gT(278,`https://nemovote.com`),rf()()(),Ra(279,`tr`)(280,`td`)(281,`a`,105),gT(282,`https://selleo.com`),rf()()(),Ra(283,`tr`)(284,`td`)(285,`a`,106),gT(286,`https://pchas.ir`),rf()()(),Ra(287,`tr`)(288,`td`)(289,`a`,107),gT(290,`https://tayeh.ir`),rf()()(),Ra(291,`tr`)(292,`td`)(293,`a`,108),gT(294,`https://forwardigital.co.uk`),rf()()(),Ra(295,`tr`)(296,`td`)(297,`a`,109),gT(298,`https://rozetka.com.ua`),rf()()(),Ra(299,`tr`)(300,`td`)(301,`a`,110),gT(302,`https://www.itrio.net`),rf()()(),Ra(303,`tr`)(304,`td`)(305,`a`,111),gT(306,`https://alexishr.com`),rf()()(),Ra(307,`tr`)(308,`td`)(309,`a`,112),gT(310,`https://dyrector.io`),rf()()(),Ra(311,`tr`)(312,`td`)(313,`a`,113),gT(314,`https://stijlbreuk.nl`),rf()()(),Ra(315,`tr`)(316,`td`)(317,`a`,114),gT(318,`https://polygon-software.ch`),rf()()(),Ra(319,`tr`)(320,`td`)(321,`a`,115),gT(322,`https://bewith.io`),rf()()(),Ra(323,`tr`)(324,`td`)(325,`a`,116),gT(326,`https://swetrix.com`),rf()()(),Ra(327,`tr`)(328,`td`)(329,`a`,117),gT(330,`https://swyftlogistics.com`),rf()()(),Ra(331,`tr`)(332,`td`)(333,`a`,118),gT(334,`https://evershop.io`),rf()()(),Ra(335,`tr`)(336,`td`)(337,`a`,119),gT(338,`https://e-design.ca`),rf()()(),Ra(339,`tr`)(340,`td`)(341,`a`,120),gT(342,`https://growthm
723ill.com`),rf()()(),Ra(343,`tr`)(344,`td`)(345,`a`,121),gT(346,`https://tarken.com.br`),rf()()(),Ra(347,`tr`)(348,`td`)(349,`a`,122),gT(350,`https://remato.com`),rf()()(),Ra(351,`tr`)(352,`td`)(353,`a`,123),gT(354,`https://remberg.de/en`),rf()()(),Ra(355,`tr`)(356,`td`)(357,`a`,124),gT(358,`https://uninterrupted.tech`),rf()()(),Ra(359,`tr`)(360,`td`)(361,`a`,125),gT(362,`https://www.digando.com`),rf()()(),Ra(363,`tr`)(364,`td`)(365,`a`,126),gT(366,`https://novu.co`),rf()()(),Ra(367,`tr`)(368,`td`)(369,`a`,127),gT(370,`https://aqreach.com`),rf()()(),Ra(371,`tr`)(372,`td`)(373,`a`,128),gT(374,`https://phalco.de`),rf()()(),Ra(375,`tr`)(376,`td`)(377,`a`,129),gT(378,`https://www.tesseractpro.io`),rf()()(),Ra(379,`tr`)(380,`td`)(381,`a`,130),gT(382,`https://www.kwanso.com`),rf()()(),Ra(383,`tr`)(384,`td`)(385,`a`,131),gT(386,`https://cmdn.io`),rf()()(),Ra(387,`tr`)(388,`td`)(389,`a`,132),gT(390,`https://ayo.so`),rf()()(),Ra(391,`tr`)(392,`td`)(393,`a`,133),gT(394,`https://devitjobs.com`),rf()()(),Ra(395,`tr`)(396,`td`)(397,`a`,134),gT(398,`https://formation.tech`),rf()()(),Ra(399,`tr`)(400,`td`)(401,`a`,135),gT(402,`https://gofirmex.com`),rf()()(),Ra(403,`tr`)(404,`td`)(405,`a`,136),gT(406,`https://vbdhub.org`),rf()()(),Ra(407,`tr`)(408,`td`)(409,`a`,137),gT(410,`https://www.arven-tech.com`),rf()()(),Ra(411,`tr`)(412,`td`)(413,`a`,138),gT(414,`https://runsystem.net`),rf()()(),Ra(415,`tr`)(416,`td`)(417,`a`,139),gT(418,`https://zenobank.io`),rf()()()(),Ra(419,`p`),gT(420,` and a lot more but we don't have enough time to update above list. Feel free to create a `),Ra(421,`a`,140),gT(422,`pull request`),rf(),gT(423,` though! 724`),rf())},dependencies:[wt$1],styles:[`@media(max-width:480px){.company-logo[_ngcontent-%COMP%]{width:360px;max-width:100%;display:block;text-align:center;margin:40px auto}.company-logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:180px!important;max-width:100%;max-height:none}}`]})}return o})();var Nn=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-enterprise`]],features:[Iv],decls:76,vars:0,consts:[[`contentReference`,``],[1,`content`],[1,`content-inner`],[`id`,`official-nestjs-consulting`],[`id`,`official-support`],[1,`row`],[1,`thumbnail`,`p-l-30`],[`src`,`/assets/enterprise/help.svg`],[1,`thumbnail`,`p-r-30`],[`src`,`/assets/enterprise/contact.svg`],[`appAnchor`,``,`id`,`first-hand-access`],[`appAnchor`,``,`id`,`nestjs-workshops-and-trainings`],[1,`contact-us`],[1,`column`,`column-text`],[1,`column`,`column-action`],[`href`,`mailto:[email protected]`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/enterprise.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Ra(0,`div`,1,0)(2,`div`,2)(3,`h3`,3),gT(4,`Official NestJS Consulting`),rf(),Ra(5,`p`),gT(6,`Our goal is to make your developers successful and productive with NestJS, as well as with other modern technologies in today's ever-changing tech landscape.`),rf(),Ra(7,`h3`,4),gT(8,`Official Support`),rf(),Ra(9,`p`),gT(10,`With official support, you get expert help directly from the NestJS core team. We tackle your toughest challenges and collaborate with your team on many levels, such as:`),rf(),Ra(11,`ul`)(12,`li`),gT(13,`Providing technical guidance and architectural reviews`),rf(),Ra(14,`li`)(15,`strong`),gT(16,`Mentoring`),rf(),gT(17,` team members`),rf(),Ra(18,`li`),gT(19,`Advising on best practices`),rf(),Ra(20,`li`),gT(21,`Resolving design decisions`),rf(),Ra(22,`li`),gT(23,`Addressing security and performance concerns`),rf(),Ra(24,`li`),gT(25,`Performing `),Ra(26,`strong`),gT(27,`in-depth`),rf(),gT(28,` code reviews`),rf()(),Ra(29,`div`,5)(30,`div`,1)(31,`h4`),gT(32,`Team Augmentation & Development`),rf(),Ra(33,`p`),gT(34,` With team augmentation, NestJS core team members work directly with your team on a daily basis to help take your project to the next level. Consider us part of your team, tackling the most ambitious projects right by your side. `),rf()(),Ra(35,`div`,6),qa$1(36,`img`,7),rf()(),Ra(37,`div`,5)(38,`div`,8),qa$1(39,`img`,9),rf(),Ra(40,`div`,1)(41,`h4`),gT(42,`NestJS Be
724st Practices`),rf(),Ra(43,`p`),gT(44,` Frequent code reviews catch potentially hazardous bugs and issues at an early stage and help enforce best practices. We perform PR reviews and audits to ensure the quality, performance, and security of your code. `),rf()()(),Ra(45,`h4`,10)(46,`span`),gT(47,`First-hand access`),rf()(),Ra(48,`p`),gT(49,`A direct communication channel boosts team velocity by giving you quick access to the core team to discuss and solve problems.`),rf(),Ra(50,`h4`,11)(51,`span`),gT(52,`NestJS Workshops and Trainings`),rf()(),Ra(53,`p`),gT(54,`We provide solid kick-off training as well as advanced sessions that give teams an in-depth understanding of NestJS. We offer on-site workshops and intensive remote sessions that get you up and running `),Ra(55,`em`),gT(56,`quickly`),rf(),gT(57,` in the NestJS ecosystem.`),rf(),Ra(58,`div`,12)(59,`div`,13)(60,`h5`),gT(61,`Contact us`),rf(),Ra(62,`p`),gT(63,` Let's talk about how we can help you succeed with NestJS. `),rf()(),Ra(64,`div`,14)(65,`a`,15),gT(66,`CONTACT US`),rf()()(),Ra(67,`p`),gT(68,`Reach out to us at `),Ra(69,`a`,15),gT(70,`[email protected]`),rf(),gT(71,` to talk about your project and your team's needs.`),rf()(),Ra(72,`a`,16),qa$1(73,`i`,17),Ra(74,`span`),gT(75,`Edit on GitHub`),rf()()())},dependencies:[wt$1],encapsulation:2})}return o})();var Yr=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-exception-filters`]],features:[Iv],decls:859,vars:60,consts:[[`contentReference`,``],[`app3fdcccb0cdeb31b21e35690ea3b5e5f00bc5ca88`,``],[`appcfd15ccb86986a8b3b7f63e563a00e3765eb3905`,``],[`appc6367199d6ac636b62990fd9f4e3290af1bdecc1`,``],[`app95c432dbbcdc8eca4b45d96bd88d5d86404ce35b`,``],[`app2ffd6ccfe29b890d19ec18e2c17da9920b99b937`,``],[`app82d7798ad50c059a7d5ff4795c8ba2446375ae80`,``],[`app99ee2ecca56670aeefb1b18650682b56b1a193d7`,``],[`app8ac1628cb844418ff8fcd2c1d81b8e34774b6837`,``],[`app2c06bdd90ddbbc5066c8e6f01e16290426300340`,``],[`app6174e0365a9774c3cd2245afacc841e8975103f0`,``],[`app85306016e7e3c409b4ea37303cd4c2a4c6779fcd`,``],[1,`content`],[1,`content-inner`],[`id`,`exception-filters`],[`src`,`/assets/Filter_1.png`,1,`illustrative-image`],[1,`language-json`],[1,`info`],[`appAnchor`,``,`id`,`throwing-standard-exceptions`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://nodejs.org/en/blog/release/v16.9.0/#error-cause`],[`appAnchor`,``,`id`,`exceptions-logging`],[`href`,`#exception-filters`],[`appAnchor`,``,`id`,`tracking-errors-in-production`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.observe.nestjs.com/`,`title`,`NestJS Observe`],[`src`,`https://www.observe.nestjs.com/docs/telemetry/error-with-source.webp`,`alt`,`Error card with source context`],[`routerLink`,`/observability/error-monitoring`],[`routerLink`,`/observability/overview`],[`href`,`/observability/dashboard#issues`],[`appAnchor`,``,`id`,`custom-exceptions`],[`appAnchor`,``,`id`,`built-in-http-exceptions`],[`appAnchor`,``,`id`,`machine-readable-error-codes`],[`appAnchor`,``,`id`,`exception-filters-1`],[1,`warning`],[`appAnchor`,``,`id`,`arguments-host`],[`routerLink`,`/fundamentals/execution-context`],[`href`,`/fundamentals/execution-context#host-handler-arguments`],[`appAnchor`,``,`id`,`binding-filters`],[`routerLink`,`/fundamentals/custom-providers`],[`href`,`/middleware#error-handling`],[`appAnchor`,``,`id`,`catch-everything`],[`routerLink`,`./faq/http-adapter`],[`appAnchor`,``,`id`,`inheritance`],[`href`,`exception-filters#binding-filters`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/exception-filters.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Ra(0,`div`,12,0)(2,`div`,13)(3,`h3`,14),gT(4,`Exception filters`),rf(),Ra(5,`p`),gT(6,`Nest comes with a built-in `),Ra(7,`strong`),gT(8,`exceptions layer`),rf(),gT(9,` that processes all unhandled exceptions across an application. When your application code does not handle an exception, this layer catches it and automatically sends an appropriate, user-friendly response.`),rf(),Ra(10,`figure`),qa$1(11,`img`,15),rf(),Ra(12,`p`),gT(13,`Out of the box, this is done by a built-in `),Ra(14,`strong`),gT(15,`global exception filter`),rf(),gT(16,`, which handles exceptions of type `),Ra(17,`code`),gT(18,`HttpException`),rf(),gT(19,` (and its subclasses). When an exception is `),Ra(20,`strong`),gT(21,`unrecognized`),rf(),gT(22,` (it is neither an `),Ra(23,`code`),gT(24,`HttpException`),rf(),gT(25,` nor a class that inherits from `),Ra(26,`code`),gT(27,`HttpException`),rf(),gT(28,`), the built-in exception filter generates the following default JSON response:`),rf(),Ra(29,`pre`)(30,`code`,16),gT(31,` 725{ 726 "statusCode": 500, 727 "message": "Internal server error" 728} 729`),rf()(),Ra(32,`blockquote`,17)(33,`strong`),gT(34,`Hint`),rf(),gT(35,` The global exception filter partially supports the `),Ra(36,`code`),gT(37,`http-errors`),rf(),gT(38,` library. A thrown error that carries `),Ra(39,`code`),gT(40,`statusCode`),rf(),gT(41,` and `),Ra(42,`code`),gT(43,`message`),rf(),gT(44,` properties in the shape that library produces is sent back with those values, instead of the default `),Ra(45,`code`),gT(46,`InternalServerErrorException`),rf(),gT(47,` response for unrecognized exceptions. 730`),rf(),Ra(48,`h4`,18)(49,`span`),gT(50,`Throwing standard exceptions`),rf()(),Ra(51,`p`),gT(52,`Nest provides a built-in `),Ra(53,`
730code`),gT(54,`HttpException`),rf(),gT(55,` class, exposed from the `),Ra(56,`code`),gT(57,`@nestjs/common`),rf(),gT(58,` package. For typical HTTP-based REST and GraphQL APIs, it's best practice to send standard HTTP response objects when certain error conditions occur.`),rf(),Ra(59,`p`),gT(60,`For example, the `),Ra(61,`code`),gT(62,`CatsController`),rf(),gT(63,` has a `),Ra(64,`code`),gT(65,`findAll()`),rf(),gT(66,` method (a `),Ra(67,`code`),gT(68,`GET`),rf(),gT(69,` route handler). Let's assume that this route handler throws an exception. To demonstrate this, we'll hard-code it as follows:`),rf(),Ra(70,`app-copy-button`,19)(71,`span`,20),gT(72),TT(73,`extension`),qa$1(74,`app-tabs`,null,1),rf(),Ra(76,`pre`)(77,`code`,21),gT(78,` 731@Get() 732async findAll() { 733 throw new HttpException('Forbidden', HttpStatus.FORBIDDEN); 734} 735`),rf()()(),Ra(79,`blockquote`,17)(80,`strong`),gT(81,`Hint`),rf(),Ra(82,`code`),gT(83,`HttpStatus`),rf(),gT(84,` is a helper enum imported from the `),Ra(85,`code`),gT(86,`@nestjs/common`),rf(),gT(87,` package. 736`),rf(),Ra(88,`p`),gT(89,`When the client calls this endpoint, the response looks like this:`),rf(),Ra(90,`pre`)(91,`code`,16),gT(92,` 737{ 738 "statusCode": 403, 739 "message": "Forbidden" 740} 741`),rf()(),Ra(93,`p`),gT(94,`The `),Ra(95,`code`),gT(96,`HttpException`),rf(),gT(97,` constructor takes two required arguments that determine the response:`),rf(),Ra(98,`ul`)(99,`li`),gT(100,`The `),Ra(101,`code`),gT(102,`response`),rf(),gT(103,` argument defines the JSON response body. It can be a `),Ra(104,`code`),gT(105,`string`),rf(),gT(106,` or an `),Ra(107,`code`),gT(108,`object`),rf(),gT(109,`, as described below.`),rf(),Ra(110,`li`),gT(111,`The `),Ra(112,`code`),gT(113,`status`),rf(),gT(114,` argument defines the `),Ra(115,`a`,22),gT(116,`HTTP status code`),rf(),gT(117,`.`),rf()(),Ra(118,`p`),gT(119,`By default, the JSON response body contains two properties:`),rf(),Ra(120,`ul`)(121,`li`)(122,`code`),gT(123,`statusCode`),rf(),gT(124,`: defaults to the HTTP status code provided in the `),Ra(125,`code`),gT(126,`status`),rf(),gT(127,` argument`),rf(),Ra(128,`li`)(129,`code`),gT(130,`message`),rf(),gT(131,`: a short description of the HTTP error based on the `),Ra(132,`code`),gT(133,`status`),rf()()(),Ra(134,`p`),gT(135,`To override only the message portion of the JSON response body, supply a string in the `),Ra(136,`code`),gT(137,`response`),rf(),gT(138,` argument. To override the entire JSON response body, pass an object in the `),Ra(139,`code`),gT(140,`response`),rf(),gT(141,` argument. Nest serializes the object and returns it as the JSON response body.`),rf(),Ra(142,`p`),gT(143,`The second constructor argument, `),Ra(144,`code`),gT(145,`status`),rf(),gT(146,`, should be a valid HTTP status code. Best practice is to use the `),Ra(147,`code`),gT(148,`HttpStatus`),rf(),gT(149,` enum imported from `),Ra(150,`code`),gT(151,`@nestjs/common`),rf(),gT(152,`.`),rf(),Ra(153,`p`),gT(154,`An optional `),Ra(155,`strong`),gT(156,`third`),rf(),gT(157,` constructor argument, `),Ra(158,`code`),gT(159,`options`),rf(),gT(160,`, can be used to provide an error `),Ra(161,`a`,23),gT(162,`cause`),rf(),gT(163,`. The `),Ra(164,`code`),gT(165,`cause`),rf(),gT(166,` object is not serialized into the response object, but it is useful for logging, as it provides information about the inner error that caused the `),Ra(167,`code`),gT(168,`HttpException`),rf(),gT(169,` to be thrown.`),rf(),Ra(170,`p`),gT(171,`Here's an example that overrides the entire response body and provides an error cause:`),rf(),Ra(172,`app-copy-button`,19)(173,`span`,20),gT(174),TT(175,`extension`),qa$1(176,`app-tabs`,null,2),rf(),Ra(178,`pre`)(179,`code`,21),gT(180,` 742@Get() 743async findAll() { 744 try {
745 await this.service.findAll(); 746 } catch (error) { 747 throw new HttpException({ 748 status: HttpStatus.FORBIDDEN, 749 error: 'This is a custom message', 750 }, HttpStatus.FORBIDDEN, { 751 cause: error 752 }); 753 } 754} 755`),rf()()(),Ra(181,`p`),gT(182,`The response then looks like this:`),rf(),Ra(183,`pre`)(184,`code`,16),gT(185,` 756{ 757 "status": 403, 758 "error": "This is a custom message" 759} 760`),rf()(),Ra(186,`h4`,24)(187,`span`),gT(188,`Exceptions logging`),rf()(),Ra(189,`p`),gT(190,`By default, the exception filter does not log built-in exceptions such as `),Ra(191,`code`),gT(192,`HttpException`),rf(),gT(193,` (and any exceptions that inherit from it). These exceptions are treated as part of the normal application flow, so they don't appear in the console. The same applies to `),Ra(194,`code`),gT(195,`WsException`),rf(),gT(196,` and `),Ra(197,`code`),gT(198,`RpcException`),rf(),gT(199,` in their respective contexts.`),rf(),Ra(200,`p`)(201,`code`),gT(202,`HttpException`),rf(),gT(203,` inherits from the `),Ra(204,`code`),gT(205,`IntrinsicException`),rf(),gT(2
76006,` class, which is exported from the `),Ra(207,`code`),gT(208,`@nestjs/common`),rf(),gT(209,` package. The built-in exception filters never log instances of `),Ra(210,`code`),gT(211,`IntrinsicException`),rf(),gT(212,`, which is how they distinguish exceptions that are part of normal operation from those that are not.`),rf(),Ra(213,`p`),gT(214,`To log these exceptions, create a custom exception filter, as described in the `),Ra(215,`a`,25),gT(216,`Exception filters`),rf(),gT(217,` section below.`),rf(),Ra(218,`h4`,26)(219,`span`),gT(220,`Tracking errors in production`),rf()(),Ra(221,`p`),gT(222,`An exception filter decides what the `),Ra(223,`em`),gT(224,`client`),rf(),gT(225,` sees. On its own, it does not tell you that a `),Ra(226,`code`),gT(227,`TypeError`),rf(),gT(228,` started firing in `),Ra(229,`code`),gT(230,`OrdersService`),rf(),gT(231,` twelve minutes ago, on 4% of checkouts, only for customers whose cart contains a discounted item. Nor does it tell you which line threw.`),rf(),Ra(232,`p`),gT(233,`The usual approach is to log the stack trace and search for it later, which falls short: a stack trace in a log file points at compiled output (`),Ra(234,`code`),gT(235,`/var/app/current/dist/orders/orders.service.js:35`),rf(),gT(236,`), carries no source context, and does not tell you whether this is the first occurrence or the ten-thousandth.`),rf(),Ra(237,`p`)(238,`a`,27),gT(239,`NestJS Observe`),rf(),gT(240,` treats an unhandled error as a first-class object rather than a log line. Every error that reaches the exceptions layer is captured along with the request that caused it, and:`),rf(),Ra(241,`ul`)(242,`li`)(243,`strong`),gT(244,`The stack trace comes with source code.`),rf(),gT(245,` The frame is resolved through your source maps back to `),Ra(246,`code`),gT(247,`src/orders/orders.service.ts:35`),rf(),gT(248,`, and the surrounding lines are shown inline, so you can read the failing code in the error card without cloning anything.`),rf(),Ra(249,`li`)(250,`strong`),gT(251,`Occurrences are grouped into defects.`),rf(),gT(252,` Errors with the same class and stack shape collapse into one fingerprinted group with a count, first-seen and last-seen timestamps, and the release that introduced it. "New since v2.4.1" is a fact you read off the page rather than infer.`),rf(),Ra(253,`li`)(254,`strong`),gT(255,`The failure keeps its context.`),rf(),gT(256,` The trace it belonged to, the user who hit it, the logs written during that request, and the spans that ran before the throw are all attached, so you can see what the request was doing when it failed.`),rf()(),Ra(257,`figure`),qa$1(258,`img`,28),rf(),Ra(259,`p`),gT(260,`Because the error already carries its own code, you can hand it to a coding agent in one click: `),Ra(261,`strong`),gT(262,`Copy agent prompt`),rf(),gT(263,` packages the error, the trimmed stack trace with source lines, the slow spans, and the surrounding logs into a self-contained prompt for Claude Code, Cursor, or any other tool that has your repository open.`),rf(),Ra(264,`p`),gT(265,`This complements the filters described in this chapter rather than replacing them: filters shape the response, while instrumentation records what happened on the way there. See `),Ra(266,`a`,29),gT(267,`Error monitoring`),rf(),gT(268,` for everything the SDK captures about a failure, the `),Ra(269,`a`,30),gT(270,`Observability`),rf(),gT(271,` chapter for setup, and `),Ra(272,`a`,31),gT(273,`Dashboard`),rf(),gT(274,` for turning a recurring error into a tracked issue that verifies its own fix.`),rf(),Ra(275,`h4`,32)(276,`span`),gT(277,`Custom exceptions`),rf()(),Ra(278,`p`),gT(279,`In most cases, you won't need to write custom exceptions and can use the built-in Nest HTTP exceptions described in the next section. If you do need custom exceptions, it's good practice to create your own `),Ra(280,`strong`),gT(281,`exception hierarchy`),rf(),gT(282,`, in which your custom exceptions inherit from the base `),Ra(283,`code`),gT(284,`HttpException`),rf(),gT(285,` class. Nest then recognizes your exceptions and automatically takes care of the error responses. Let's implement such a custom exception:`),rf(),Ra(286,`app-copy-button`,19)(287,`span`,20),gT
760(288),TT(289,`extension`),qa$1(290,`app-tabs`,null,3),rf(),Ra(292,`pre`)(293,`code`,21),gT(294,` 761export class ForbiddenException extends HttpException { 762 constructor() { 763 super('Forbidden', HttpStatus.FORBIDDEN); 764 } 765} 766`),rf()()(),Ra(295,`p`),gT(296,`Since `),Ra(297,`code`),gT(298,`ForbiddenException`),rf(),gT(299,` extends the base `),Ra(300,`code`),gT(301,`HttpException`),rf(),gT(302,`, it works with the built-in exception handler, so we can use it inside the `),Ra(303,`code`),gT(304,`findAll()`),rf(),gT(305,` method.`),rf(),Ra(306,`app-copy-button`,19)(307,`span`,20),gT(308),TT(309,`extension`),qa$1(310,`app-tabs`,null,4),rf(),Ra(312,`pre`)(313,`code`,21),gT(314,` 767@Get() 768async findAll() { 769 throw new ForbiddenException(); 770} 771`),rf()()(),Ra(315,`h4`,33)(316,`span`),gT(317,`Built-in HTTP exceptions`),rf()(),Ra(318,`p`),gT(319,`Nest provides a set of standard exceptions that inherit from the base `),Ra(320,`code`),gT(321,`HttpException`),rf(),gT(322,`. They are exposed from the `),Ra(323,`code`),gT(324,`@nestjs/common`),rf(),gT(325,` package and represent many of the most common HTTP exceptions:`),rf(),Ra(326,`ul`)(327,`li`)(328,`code`),gT(329,`BadRequestException`),rf()(),Ra(330,`li`)(331,`code`),gT(332,`UnauthorizedException`),rf()(),Ra(333,`li`)(334,`code`),gT(335,`NotFoundException`),rf()(),Ra(336,`li`)(337,`code`),gT(338,`ForbiddenException`),rf()(),Ra(339,`li`)(340,`code`),gT(341,`NotAcceptableException`),rf()(),Ra(342,`li`)(343,`code`),gT(344,`RequestTimeoutException`),rf()(),Ra(345,`li`)(346,`code`),gT(347,`ConflictException`),rf()(),Ra(348,`li`)(349,`code`),gT(350,`GoneException`),rf()(),Ra(351,`li`)(352,`code`),gT(353,`HttpVersionNotSupportedException`),rf()(),Ra(354,`li`)(355,`code`),gT(356,`PayloadTooLargeException`),rf()(),Ra(357,`li`)(358,`code`),gT(359,`UnsupportedMediaTypeException`),rf()(),Ra(360,`li`)(361,`code`),gT(362,`UnprocessableEntityException`),rf()(),Ra(363,`li`)(364,`code`),gT(365,`InternalServerErrorException`),rf()(),Ra(366,`li`)(367,`code`),gT(368,`NotImplementedException`),rf()(),Ra(369,`li`)(370,`code`),gT(371,`ImATeapotException`),rf()(),Ra(372,`li`)(373,`code`),gT(374,`MethodNotAllowedException`),rf()(),Ra(375,`li`)(376,`code`),gT(377,`MisdirectedException`),rf()(),Ra(378,`li`)(379,`code`),gT(380,`BadGatewayException`),rf()(),Ra(381,`li`)(382,`code`),gT(383,`ServiceUnavailableException`),rf()(),Ra(384,`li`)(385,`code`),gT(386,`GatewayTimeoutException`),rf()(),Ra(387,`li`)(388,`code`),gT(389,`PreconditionFailedException`),rf()()(),Ra(390,`p`),gT(391,`All the built-in exceptions can also provide an error `),Ra(392,`code`),gT(393,`cause`),rf(),gT(394,` and an error description through the `),Ra(395,`code`),gT(396,`options`),rf(),gT(397,` parameter:`),rf(),Ra(398,`app-copy-button`)(399,`pre`)(400,`code`,21),gT(401,` 772throw new BadRequestException('Something bad happened', { 773 cause: new Error(), 774 description: 'Some error description', 775}); 776`),rf()()(),Ra(402,`p`),gT(403,`The response then looks like this:`),rf(),Ra(404,`pre`)(405,`code`,16),gT(406,` 777{ 778 "message": "Something bad happened", 779 "error": "Some error description", 780 "statusCode": 400 781} 782`),rf()(),Ra(407,`h4`,34)(408,`span`),gT(409,`Machine-readable error codes`),rf()(),Ra(410,`p`),gT(411,`The `),Ra(412,`code`),gT(413,`status`),rf(),gT(414,` and `),Ra(415,`code`),gT(416,`message`),rf(),gT(417,` of an exception describe an error well enough for humans, but they are awkward for clients to branch on. Several distinct failures, such as an invalid email and a weak password, can all surface as `),Ra(418,`code`),gT(419,`400 Bad Request`),rf(),gT(420,`, which forces the client to parse the human-readable message string to tell them apart.`),rf(),Ra(421,`p`),gT(422,`To avoid that, pass an `),Ra(423,`code`),gT(424,`errorCode`),rf(),gT(425,` through the `),Ra(426,`code`),gT(427,`options`),rf(),gT(428,` parameter. It is a stable, machine-readable identifier that is serialized into the response body:`),rf(),Ra(429,`app-copy-button`)(430,`pre`)(431,`code`,21),gT(432,` 783throw new BadRequestException('Password is too weak', { 784 errorCode: 'WEAK_PASSWORD', 785}); 786`),rf()()(),Ra(433,`p`),gT(434,`The response then carries the code alongside the usual fields:`),rf(),Ra(435,`pre`)(436,`code`,16),gT(437,` 787{ 788 "message": "Password is too weak", 789 "errorCode": "WEAK_PASSWORD", 790 "statusCode": 400 791} 792`),rf()(),Ra(438,`p`)(439,`code`),gT(440,`errorCode`),rf(),gT(441,` is optional and can be combined with `),Ra(442,`code`),gT(443,`cause`),rf(),gT(444,` and `),Ra(445,`code`),gT(446,`description`),rf(),gT(447,`. It is also available on `),Ra(448,`code`),gT(449,`HttpException`),rf(),gT(450,` itself, so custom exceptions can set it too:`),rf(),Ra(451,`app-copy-button`)(452,`pre`)(453,`code`,21),gT(454,` 793throw new HttpException( 794 'Forbidden', 795 HttpStatus.FORBIDDEN, 796 { errorCode: 'ACCOUNT_SUSPENDED' }, 797); 798`),rf()()(),Ra(455,`blockquote`,17)(456,`strong`),gT(457,`Hint`),rf(),gT(458,` Unlike `),Ra(459,`code`),gT(460,`cause`),rf(),gT(461,`, which is intended for logging and is never seri
798alized, `),Ra(462,`code`),gT(463,`errorCode`),rf(),gT(464,` is part of the response body and is meant to be consumed by clients. 799`),rf(),Ra(465,`h4`,35)(466,`span`),gT(467,`Exception filters`),rf()(),Ra(468,`p`),gT(469,`The built-in exception filter handles many cases automatically, but you may want `),Ra(470,`strong`),gT(471,`full control`),rf(),gT(472,` over the exceptions layer, e.g., to add logging or to use a different JSON schema based on dynamic factors. `),Ra(473,`strong`),gT(474,`Exception filters`),rf(),gT(475,` are designed for exactly this purpose. They let you control the exact flow of execution and the content of the response sent back to the client.`),rf(),Ra(476,`p`),gT(477,`Let's create an exception filter that catches exceptions that are instances of the `),Ra(478,`code`),gT(479,`HttpException`),rf(),gT(480,` class and implements custom response logic for them. To do this, we need access to the underlying platform `),Ra(481,`code`),gT(482,`Request`),rf(),gT(483,` and `),Ra(484,`code`),gT(485,`Response`),rf(),gT(486,` objects. We'll use the `),Ra(487,`code`),gT(488,`Request`),rf(),gT(489,` object to extract the original `),Ra(490,`code`),gT(491,`url`),rf(),gT(492,` and include it in the response, and the `),Ra(493,`code`),gT(494,`Response`),rf(),gT(495,` object to take direct control of the response that is sent, using the `),Ra(496,`code`),gT(497,`response.json()`),rf(),gT(498,` method.`),rf(),Ra(499,`app-copy-button`,19)(500,`span`,20),gT(501),TT(502,`extension`),qa$1(503,`app-tabs`,null,5),rf(),Ra(505,`pre`)(506,`code`,21),gT(507,` 800import { ExceptionFilter, Catch, ArgumentsHost, HttpException } from '@nestjs/common'; 801import { Request, Response } from 'express'; 802 803@Catch(HttpException) 804export class HttpExceptionFilter implements ExceptionFilter { 805 catch(exception: HttpException, host: ArgumentsHost) { 806 const ctx = host.switchToHttp(); 807 const response = ctx.getResponse<Response>(); 808 const request = ctx.getRequest<Request>(); 809 const status = exception.getStatus(); 810 811 response 812 .status(status) 813 .json({ 814 statusCode: status, 815 timestamp: new Date().toISOString(), 816 path: request.url, 817 }); 818 } 819} 820`),rf()(),Ra(508,`pre`)(509,`code`,21),gT(510,` 821import { Catch, HttpException } from '@nestjs/common'; 822 823@Catch(HttpException) 824export class HttpExceptionFilter { 825 catch(exception, host) { 826 const ctx = host.switchToHttp(); 827 const response = ctx.getResponse(); 828 const request = ctx.getRequest(); 829 const status = exception.getStatus(); 830 831 response 832 .status(status) 833 .json({ 834 statusCode: status, 835 timestamp: new Date().toISOString(), 836 path: request.url, 837 }); 838 } 839} 840`),rf()()(),Ra(511,`blockquote`,17)(512,`strong`),gT(513,`Hint`),rf(),gT(514,` All exception filters should implement the generic `),Ra(515,`code`),gT(516,`ExceptionFilter<T>`),rf(),gT(517,` interface. This requires you to provide the `),Ra(518,`code`),gT(519,`catch(exception: T, host: ArgumentsHost)`),rf(),gT(520,` method with its indicated signature. `),Ra(521,`code`),gT(522,`T`),rf(),gT(523,` indicates the type of the exception. 841`),rf(),Ra(524,`blockquote`,36)(525,`strong`),gT(526,`Warning`),rf(),gT(527,` If you are using `),Ra(528,`code`),gT(529,`@nestjs/platform-fastify`),rf(),gT(530,`, use `),Ra(531,`code`),gT(532,`response.send()`),rf(),gT(533,` instead of `),Ra(534,`code`),gT(535,`response.json()`),rf(),gT(536,`, and import the corresponding types from `),Ra(537,`code`),gT(538,`fastify`),rf(),gT(539,`. 842`),rf(),Ra(540,`p`),gT(541,`The `),Ra(542,`code`),gT(543,`@Catch(HttpException)`),rf(),gT(544,` decorator binds the required metadata to the exception filter, telling Nest that this particular filter is looking for exceptions of type `),Ra(545,`code`),gT(546,`HttpException`),rf(),gT(547,` and nothing else. The `),Ra(548,`code`),gT(549,`@Catch()`),rf(),gT(550,` decorator accepts a single parameter or a comma-separated list, which lets you set up the filter for several types of exceptions at once.`),rf(),Ra(551,`h4`,37)(552,`span`),gT(553,`Arguments host`),rf()(),Ra(554,`p`),gT(555,`Let's look at the parameters of the `),Ra(556,`code`),gT(557,`catch()`),rf(),gT(558,` method. The `),Ra(559,`code`),gT(560,`exception`),rf(),gT(561,` parameter is the exception object currently being processed. The `),Ra(562,`code`),gT(563,`host`),rf(),gT(564,` parameter is an `),Ra(565,`code`),gT(566,`ArgumentsHost`),rf(),gT(567,` object, a utility that gives you access to the arguments passed to the original handler, whatever context it was invoked in. In the code sample above, we use its helper methods to obtain the `),Ra(568,`code`),gT(569,`Request`),rf(),gT(570,` and `),Ra(571,`code`),gT(572,`Response`),rf(),gT(573,` objects of the request in which the exception originated. `),Ra(574,`code`),gT(575,`ArgumentsHost`),rf(),gT(576,` is covered in full in the `),Ra(577,`a`,38),gT(578,`execution context chapter`),rf(),gT(579,`.`),rf(),Ra(580,`p`),gT(581,`The reason for this level of abstraction is that `),Ra(582,`code`),gT(583,`ArgumentsHost`),rf(),gT(584,` works in every context: the HTTP server context used here, but also microservices and WebSockets. The execution context chapter shows how to reach the `),Ra(585,`a`,39),gT(586,`underlying arguments`),rf(),gT(587,` for `),Ra(588,`strong`),gT(589,`any`),rf(),gT(590,` context through the same object, which lets you write a single exception filter that operates across all of them.`),rf(),Ra(591,`p`),qa$1(592,`app-banner-courses`),rf(),Ra(593,`h4`,40)(594,`span`),gT(595,`Binding filters`),rf()(),Ra(596,`p`),gT(597,`Let's bind our new `),Ra(598,`code`),gT(599,`HttpExceptionFilter`),rf(),gT(600,` to the `),Ra(601,`code`),gT(602,`create()`),rf(),gT(603,` method of the `),Ra(604,`code`),gT(605,`CatsController`),rf(),gT(606,`.`),rf(),Ra(607,`app-copy-button`,19)(608,`span`,20),gT
842(609),TT(610,`extension`),qa$1(611,`app-tabs`,null,6),rf(),Ra(613,`pre`)(614,`code`,21),gT(615,` 843@Post() 844@UseFilters(new HttpExceptionFilter()) 845async create(@Body() createCatDto: CreateCatDto) { 846 throw new ForbiddenException(); 847} 848`),rf()(),Ra(616,`pre`)(617,`code`,21),gT(618,` 849@Post() 850@UseFilters(new HttpExceptionFilter()) 851@Bind(Body()) 852async create(createCatDto) { 853 throw new ForbiddenException(); 854} 855`),rf()()(),Ra(619,`blockquote`,17)(620,`strong`),gT(621,`Hint`),rf(),gT(622,` The `),Ra(623,`code`),gT(624,`@UseFilters()`),rf(),gT(625,` decorator is imported from the `),Ra(626,`code`),gT(627,`@nestjs/common`),rf(),gT(628,` package. 856`),rf(),Ra(629,`p`),gT(630,`Like the `),Ra(631,`code`),gT(632,`@Catch()`),rf(),gT(633,` decorator, `),Ra(634,`code`),gT(635,`@UseFilters()`),rf(),gT(636,` accepts a single filter instance or a comma-separated list of filter instances. Here, we created the `),Ra(637,`code`),gT(638,`HttpExceptionFilter`),rf(),gT(639,` instance in place. Alternatively, you can pass the class (instead of an instance), which leaves instantiation to the framework and enables `),Ra(640,`strong`),gT(641,`dependency injection`),rf(),gT(642,`.`),rf(),Ra(643,`app-copy-button`,19)(644,`span`,20),gT(645),TT(646,`extension`),qa$1(647,`app-tabs`,null,7),rf(),Ra(649,`pre`)(650,`code`,21),gT(651,` 857@Post() 858@UseFilters(HttpExceptionFilter) 859async create(@Body() createCatDto: CreateCatDto) { 860 throw new ForbiddenException(); 861} 862`),rf()(),Ra(652,`pre`)(653,`code`,21),gT(654,` 863@Post() 864@UseFilters(HttpExceptionFilter) 865@Bind(Body()) 866async create(createCatDto) { 867 throw new ForbiddenException(); 868} 869`),rf()()(),Ra(655,`blockquote`,17)(656,`strong`),gT(657,`Hint`),rf(),gT(658,` Prefer binding filters by class instead of by instance when possible. This reduces `),Ra(659,`strong`),gT(660,`memory usage`),rf(),gT(661,`, since Nest can reuse instances of the same class across your entire module. 870`),rf(),Ra(662,`p`),gT(663,`In the example above, the `),Ra(664,`code`),gT(665,`HttpExceptionFilter`),rf(),gT(666,` is applied only to the `),Ra(667,`code`),gT(668,`create()`),rf(),gT(669,` route handler, which makes it method-scoped. Exception filters can be scoped at different levels: method-scoped (a method of a controller, resolver, or gateway), controller-scoped, or global-scoped. For example, to set up a controller-scoped filter, do the following:`),rf(),Ra(670,`app-copy-button`,19)(671,`span`,20),gT(672),TT(673,`extension`),qa$1(674,`app-tabs`,null,8),rf(),Ra(676,`pre`)(677,`code`,21),gT(678,` 871@Controller() 872@UseFilters(new HttpExceptionFilter()) 873export class CatsController {} 874`),rf()()(),Ra(679,`p`),gT(680,`This sets up the `),Ra(681,`code`),gT(682,`HttpExceptionFilter`),rf(),gT(683,` for every route handler defined inside the `),Ra(684,`code`),gT(685,`CatsController`),rf(),gT(686,`.`),rf(),Ra(687,`p`),gT(688,`To create a global-scoped filter, do the following:`),rf(),Ra(689,`app-copy-button`,19)(690,`span`,20),gT(691),TT(692,`extension`),qa$1(693,`app-tabs`,null,9),rf(),Ra(695,`pre`)(696,`code`,21),gT(697,` 875async function bootstrap() { 876 const app = await NestFactory.create(AppModule); 877 app.useGlobalFilters(new HttpExceptionFilter()); 878 await app.listen(process.env.PORT ?? 3000); 879} 880await bootstrap(); 881`),rf()()(),Ra(698,`blockquote`,36)(699,`strong`),gT(700,`Warning`),rf(),gT(701,` The `),Ra(702,`code`),gT(703,`useGlobalFilters()`),rf(),gT(704,` method does not set up filters for gateways or hybrid applications. 882`),rf(),Ra(705,`p`),gT(706,`Global-scoped filters are used across the whole application, for every controller and every route handler. In terms of dependency injection, global filters registered from outside of any module (with `),Ra(707,`code`),gT(708,`useGlobalFilters()`),rf(),gT(709,`, as in the example above) cannot inject dependencies, since this happens outside the context of any module. To solve this, you can register a global-scoped filter `),Ra(710,`strong`),gT(711,`directly from any module`),rf(),gT(712,` using the following construction:`),rf(),Ra(713,`app-copy-button`,19)(714,`span`,20),gT(715),TT(716,`extension`),qa$1(717,`app-tabs`,null,10),rf(),Ra(719,`pre`)(720,`code`,21),gT(721,` 883import { Module } from '@nestjs/common'; 884import { APP_FILTER } from '@nestjs/core'; 885 886@Module({ 887 providers: [ 888 { 889 provide: APP_FILTER, 890 useClass: HttpExceptionFilter, 891 }, 892 ], 893}) 894export class AppModule {} 895`),rf()()(),Ra(722,`blockquote`,17)(723,`strong`),gT(724,`Hint`),rf(),gT(725,` When you use this approach to perform dependency injection for the filter, the filter is global regardless of the module in which this construction is employed. Register it in the module where the filter (`),Ra(726,`code`),gT(727,`HttpExceptionFilter`),rf(),gT(728,` in the example above) is defined. Also, `),Ra(729,`code`),gT(730,`useClass`),rf(),gT(731,` is not the only way to register a custom provider. Learn more about `),Ra(732,`a`,41),gT(733,`custom providers`),rf(),gT(734,`. 896`),rf(),Ra(735,`blockquote`,17)(736,`strong`),gT(737,`Hint`),rf(),gT(738,` Exceptions thrown from `),Ra(739,`a`,42),gT(740,`middleware`),rf(),gT(741,` are also processed by the exceptions layer. Because middleware runs before a route handler is selected, only `),Ra(742,`strong`),gT(743,`global`),rf(),gT(744,` exception filters apply (`),Ra(745,`code`),gT(746,`app.useGlobalFilters()`),rf(),gT(747,` or `),Ra(748,`code`),gT(749,`APP_FILTER`),rf(),gT(750,`). Method-scoped and controller-scoped `),Ra(751,`code`),gT(752,`@UseFilters()`),rf(),gT(753,` bindings are not invoked. 897`),rf(),Ra(754,`p`),gT(755,`You can register as many filters as needed with this technique by adding each one to the `),Ra(756,`code`),gT(757,`providers`),rf(),gT(758,` array.`),rf(),Ra(759,`h4`,43)(760,`span`),gT(761,`Catch everything`),rf()(),Ra(762,`p`),gT(763,`To catch `),Ra(764,`strong`),gT(765,`every`),rf(),gT(766,` unhandled exception, regardless of its type, leave the `),Ra(767,`code`),gT(768,`@Catch()`),rf(),gT(769,` decorator's parameter list empty, i.e., `),Ra(770,`code`),gT(771,`@Catch()`),rf(),gT(772,`.`),rf(),Ra(773,`p`),gT(774,`The example below is platform-agnostic: it delivers the response through the `),Ra(775,`a`,44),gT(776,`HTTP adapter`),rf(),gT(777,` rather than using the platform-specific `),Ra(778,`code`),gT(779,`Request`),rf(),gT(780,` and `),Ra(781,`code`),gT(782,`Response`),rf(),gT(783,` objects directly, so the same filter works with both Express and Fastify.`),rf(),Ra(784,`app-copy-button`)(785,`pre`)(786,`code`,21),gT(787,` 898import { 899 ExceptionFilter, 900 Catch, 901 ArgumentsHost, 902 HttpException, 903 HttpStatus, 904} from '@nestjs/common'; 905import { HttpAdapterHost } from '@nestjs/core'; 906 907@Catch() 908export class CatchEverythingFilter implements ExceptionFilter {
909 constructor(private readonly httpAdapterHost: HttpAdapterHost) {} 910 911 catch(exception: unknown, host: ArgumentsHost): void { 912 // In certain situations \`httpAdapter\` might not be available in the 913 // constructor, so resolve it here. 914 const { httpAdapter } = this.httpAdapterHost; 915 916 const ctx = host.switchToHttp(); 917 918 const httpStatus = 919 exception instanceof HttpException 920 ? exception.getStatus() 921 : HttpStatus.INTERNAL_SERVER_ERROR; 922 923 const responseBody = { 924 statusCode: httpStatus, 925 timestamp: new Date().toISOString(), 926 path: httpAdapter.getRequestUrl(ctx.getRequest()), 927 }; 928 929 httpAdapter.reply(ctx.getResponse(), responseBody, httpStatus); 930 } 931} 932`),rf()()(),Ra(788,`blockquote`,36)(789,`strong`),gT(790,`Warning`),rf(),gT(791,` When combining a catch-everything filter with one bound to a specific exception type, declare the catch-everything filter `),Ra(792,`strong`),gT(793,`first`),rf(),gT(794,`, so the more specific filter can still handle the type it is bound to. 933`),rf(),Ra(795,`h4`,45)(796,`span`),gT(797,`Inheritance`),rf()(),Ra(798,`p`),gT(799,`Typically, you'll create fully customized exception filters tailored to your application's requirements. However, in some cases you may want to extend the built-in `),Ra(800,`strong`),gT(801,`global exception filter`),rf(),gT(802,` and override its behavior only under certain conditions.`),rf(),Ra(803,`p`),gT(804,`To delegate exception processing to the base filter, extend `),Ra(805,`code`),gT(806,`BaseExceptionFilter`),rf(),gT(807,` and call the inherited `),Ra(808,`code`),gT(809,`catch()`),rf(),gT(810,` method.`),rf(),Ra(811,`app-copy-button`,19)(812,`span`,20),gT(813),TT(814,`extension`),qa$1(815,`app-tabs`,null,11),rf(),Ra(817,`pre`)(818,`code`,21),gT(819,` 934import { Catch, ArgumentsHost } from '@nestjs/common'; 935import { BaseExceptionFilter } from '@nestjs/core'; 936 937@Catch() 938export class AllExceptionsFilter extends BaseExceptionFilter { 939 catch(exception: unknown, host: ArgumentsHost) { 940 super.catch(exception, host); 941 } 942} 943`),rf()(),Ra(820,`pre`)(821,`code`,21),gT(822,` 944import { Catch } from '@nestjs/common'; 945import { BaseExceptionFilter } from '@nestjs/core'; 946 947@Catch() 948export class AllExceptionsFilter extends BaseExceptionFilter { 949 catch(exception, host) { 950 super.catch(exception, host); 951 } 952} 953`),rf()()(),Ra(823,`blockquote`,36)(824,`strong`),gT(825,`Warning`),rf(),gT(826,` Method-scoped and controller-scoped filters that extend the `),Ra(827,`code`),gT(828,`BaseExceptionFilter`),rf(),gT(829,` should not be instantiated with `),Ra(830,`code`),gT(831,`new`),rf(),gT(832,`. Instead, let the framework instantiate them automatically. 954`),rf(),Ra(833,`p`),gT(834,`Global filters `),Ra(835,`strong`),gT(836,`can`),rf(),gT(837,` extend the base filter, in one of two ways.`),rf(),Ra(838,`p`),gT(839,`The first is to pass the `),Ra(840,`code`),gT(841,`HttpAdapter`),rf(),gT(842,` reference to the constructor when instantiating the custom global filter:`),rf(),Ra(843,`app-copy-button`)(844,`pre`)(845,`code`,21),gT(846,` 955async function bootstrap() { 956 const app = await NestFactory.create(AppModule); 957 958 const { httpAdapter } = app.get(HttpAdapterHost); 959 app.useGlobalFilters(new AllExceptionsFilter(httpAdapter)); 960 961 await app.listen(process.env.PORT ?? 3000); 962} 963await bootstrap(); 964`),rf()()(),Ra(847,`p`),gT(848,`The second is to register the filter with the `),Ra(849,`code`),gT(850,`APP_FILTER`),rf(),gT(851,` token, `),Ra(852,`a`,46),gT(853,`as shown earlier`),rf(),gT(854,`.`),rf()(),Ra(855,`a`,47),qa$1(856,`i`,48),Ra(857,`span`),gT(858,`Edit on GitHub`),rf()()()),a&2){let l=qS(75),d=qS(177),m=qS(291),h=qS(311),u=qS(504),b=qS(612),S=qS(648),k=qS(675),C=qS(694),w=qS(718),P=qS(816);LC(72),uf(` `,MT(73,27,`cats.controller`,l.isJsActive),` 965`),LC(102),uf(` `,MT(175,30,`cats.controller`,d.isJsActive),` 966`),LC(114),uf(` `,MT(289,33,`forbidden.exception`,m.isJsActive),` 967`),LC(20),uf(` `,MT(309,36,`cats.controller`,h.isJsActive),` 968`),LC(193),uf(` `,MT(502,39,`http-exception.filter`,u.isJsActive),` 969`),LC(4),kv(`hide`,u.isJsActive),LC(3),kv(`hide`,!u.isJsActive),LC(101),uf(` `,MT(610,42,`cats.c
969ontroller`,b.isJsActive),` 970`),LC(4),kv(`hide`,b.isJsActive),LC(3),kv(`hide`,!b.isJsActive),LC(29),uf(` `,MT(646,45,`cats.controller`,S.isJsActive),` 971`),LC(4),kv(`hide`,S.isJsActive),LC(3),kv(`hide`,!S.isJsActive),LC(20),uf(` `,MT(673,48,`cats.controller`,k.isJsActive),` 972`),LC(19),uf(` `,MT(692,51,`main`,C.isJsActive),` 973`),LC(24),uf(` `,MT(716,54,`app.module`,w.isJsActive),` 974`),LC(98),uf(` `,MT(814,57,`all-exceptions.filter`,P.isJsActive),` 975`),LC(4),kv(`hide`,P.isJsActive),LC(3),kv(`hide`,!P.isJsActive)}},dependencies:[wt$1,en$1,u,Kc,l$1,g],encapsulation:2})}return o})();var Vr=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-first-steps`]],features:[Iv],decls:375,vars:10,consts:[[`contentReference`,``],[`appcb394df66eaed61de6c9b22583f1c41611284662`,``],[1,`content`],[1,`content-inner`],[`id`,`first-steps`],[`appAnchor`,``,`id`,`language`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.typescriptlang.org/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://nodejs.org/en/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://babeljs.io/`],[`appAnchor`,``,`id`,`prerequisites`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://nodejs.org`],[`appAnchor`,``,`id`,`setup`],[`routerLink`,`/cli/overview`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.npmjs.com/`],[1,`language-bash`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.observe.nestjs.com/`,`title`,`NestJS Observe`],[`routerLink`,`/observability/overview`],[1,`info`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.typescriptlang.org/tsconfig#strict`],[1,`file-tree`],[1,`item`],[1,`children`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`appAnchor`,``,`id`,`platform`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.fastify.io`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.fastify.io/`],[`routerLink`,`/http/performance`],[`appAnchor`,``,`id`,`running-the-application`],[`routerLink`,`/recipes/swc`],[`appAnchor`,``,`id`,`linting-and-formatting`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://oxc.rs/docs/guide/usage/linter.html`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://prettier.io/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://prettier.io/docs/en/comparison.html`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.npmjs.com/package/oxlint`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.npmjs.com/package/prettier`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/first-steps.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Ra(0,`div`,2,0)(2,`div`,3)(3,`h3`,4),gT(4,`First steps`),rf(),Ra(5,`p`),gT(6,`This set of articles covers the `),Ra(7,`strong`),gT(8,`core fundamentals`),rf(),gT(9,` of Nest. To introduce the essential building blocks of a Nest application, we'll build a basic CRUD application whose features cover a lot of ground at an introductory level.`),rf(),Ra(10,`h4`,5)(11,`span`),gT(12,`Language`),rf()(),Ra(13,`p`),gT(14,`Nest is written in `),Ra(15,`a`,6),gT(16,`TypeScript`),rf(),gT(17,` and runs on `),Ra(18,`a`,7),gT(19,`Node.js`),rf(),gT(2
9750,`, and it supports both TypeScript and plain JavaScript. Because Nest relies on the latest language features, using it with plain JavaScript requires `),Ra(21,`a`,8),gT(22,`Babel`),rf(),gT(23,`.`),rf(),Ra(24,`p`),gT(25,`Most examples in this documentation use TypeScript, but you can `),Ra(26,`strong`),gT(27,`switch any code snippet`),rf(),gT(28,` to plain JavaScript syntax with the language toggle in the upper-right corner of the snippet.`),rf(),Ra(29,`h4`,9)(30,`span`),gT(31,`Prerequisites`),rf()(),Ra(32,`p`),gT(33,`Make sure that `),Ra(34,`a`,10),gT(35,`Node.js`),rf(),gT(36,` is installed on your operating system. Running a Nest application requires `),Ra(37,`strong`),gT(38,`v20.19 or later`),rf(),gT(39,` (or `),Ra(40,`strong`),gT(41,`v22.12+`),rf(),gT(42,` on the 22.x line). The Nest CLI's generators (such as `),Ra(43,`code`),gT(44,`nest new`),rf(),gT(45,` and `),Ra(46,`code`),gT(47,`nest generate`),rf(),gT(48,`) require `),Ra(49,`strong`),gT(50,`v22.22.3+, v24.15+, or v26+`),rf(),gT(51,`. We recommend the latest active LTS release, which satisfies both requirements.`),rf(),Ra(52,`h4`,11)(53,`span`),gT(54,`Setup`),rf()(),Ra(55,`p`),gT(56,`The quickest way to set up a new project is
975with the `),Ra(57,`a`,12),gT(58,`Nest CLI`),rf(),gT(59,`. With `),Ra(60,`a`,13),gT(61,`npm`),rf(),gT(62,` installed, run the following commands in your terminal:`),rf(),Ra(63,`pre`)(64,`code`,14),gT(65,` 976$ npm i -g @nestjs/cli 977$ nest new project-name 978`),rf()(),Ra(66,`p`),gT(67,`The CLI asks which module system to use: ESM (the default), which uses Vitest as the test runner, or CommonJS, which uses Jest.`),rf(),Ra(68,`p`),gT(69,`It also asks whether to set up `),Ra(70,`a`,15),gT(71,`NestJS Observe`),rf(),gT(72,`, the official observability platform for Nest. If you answer yes, the generated project includes the `),Ra(73,`code`),gT(74,`@nestjs/observe`),rf(),gT(75,` SDK, already wired into `),Ra(76,`code`),gT(77,`AppModule`),rf(),gT(78,` and `),Ra(79,`code`),gT(80,`NestFactory.create()`),rf(),gT(81,`. Requests, background jobs, errors, and distributed traces start reporting as soon as you supply your app key and secret, and the free plan needs no payment details. In an interactive terminal, the prompt defaults to yes; in non-interactive environments, such as CI, it is skipped and Observe is not added. Pass `),Ra(82,`code`),gT(83,`--observe`),rf(),gT(84,` or `),Ra(85,`code`),gT(86,`--no-observe`),rf(),gT(87,` to skip the prompt either way. See the `),Ra(88,`a`,16),gT(89,`Observability`),rf(),gT(90,` chapter for what Observe covers.`),rf(),Ra(91,`blockquote`,17)(92,`strong`),gT(93,`Hint`),rf(),gT(94,` New projects are generated with TypeScript's `),Ra(95,`a`,18),gT(96,`strict`),rf(),gT(97,` mode enabled. To opt out, set `),Ra(98,`code`),gT(99,`"strict": false`),rf(),gT(100,` in the generated `),Ra(101,`code`),gT(102,`tsconfig.json`),rf(),gT(103,`. 979`),rf(),Ra(104,`p`),gT(105,`The CLI creates a `),Ra(106,`code`),gT(107,`project-name`),rf(),gT(108,` directory, installs the dependencies, generates a few boilerplate files, and populates a `),Ra(109,`code`),gT(110,`src/`),rf(),gT(111,` directory with several core files.`),rf(),Ra(112,`div`,19)(113,`div`,20),gT(114,`src`),rf(),Ra(115,`div`,21)(116,`div`,20),gT(117,`app.controller.spec.ts`),rf(),Ra(118,`div`,20),gT(119,`app.controller.ts`),rf(),Ra(120,`div`,20),gT(121,`app.module.ts`),rf(),Ra(122,`div`,20),gT(123,`app.service.ts`),rf(),Ra(124,`div`,20),gT(125,`main.ts`),rf()()(),Ra(126,`p`),gT(127,`The following table describes these core files:`),rf(),Ra(128,`table`),qa$1(129,`thead`),Ra(130,`tbody`)(131,`tr`)(132,`td`)(133,`code`),gT(134,`app.controller.ts`),rf()(),Ra(135,`td`),gT(136,`A basic controller with a single route.`),rf()(),Ra(137,`tr`)(138,`td`)(139,`code`),gT(140,`app.controller.spec.ts`),rf()(),Ra(141,`td`),gT(142,`The unit tests for the controller.`),rf()(),Ra(143,`tr`)(144,`td`)(145,`code`),gT(146,`app.module.ts`),rf()(),Ra(147,`td`),gT(148,`The root module of the application.`),rf()(),Ra(149,`tr`)(150,`td`)(151,`code`),gT(152,`app.service.ts`),rf()(),Ra(153,`td`),gT(154,`A basic service with a single method.`),rf()(),Ra(155,`tr`)(156,`td`)(157,`code`),gT(158,`main.ts`),rf()(),Ra(159,`td`),gT(160,`The entry file of the application. It uses `),Ra(161,`code`),gT(162,`NestFactory`),rf(),gT(163,` to create a Nest application instance.`),rf()()()(),Ra(164,`p`),gT(165,`The `),Ra(166,`code`),gT(167,`main.ts`),rf(),gT(168,` file contains an async function that `),Ra(169,`strong`),gT(170,`bootstraps`),rf(),gT(171,` the application:`),rf(),Ra(172,`app-copy-button`,22)(173,`span`,23),gT(174),TT(175,`extension`),qa$1(176,`app-tabs`,null,1),rf(),Ra(178,`pre`)(179,`code`,24),gT(180,` 980import { NestFactory } from '@nestjs/core'; 981import { AppModule } from './app.module.js'; 982 983async function bootstrap() { 984 const app = await NestFactory.create(AppModule); 985 await app.listen(process.env.PORT ?? 3000); 986} 987await bootstrap(); 988`),rf()(),Ra(181,`pre`)(182,`code`,24),gT(183,` 989import { NestFactory } from '@nestjs/core'; 990import { AppModule } from './app.module.js'; 991 992async function bootstrap() { 993 const app = await NestFactory.create(AppModule); 994 await app.listen(process.env.PORT ?? 3000); 995} 996await bootstrap(); 997`),rf()()(),Ra(184,`p`),gT(185,`To create a Nest application instance, use `),Ra(186,`code`),gT(187,`NestFactory`),rf(),gT(188,` from `),Ra(189,`code`),gT(190,`@nestjs/core`),rf(),gT(191,`, which exposes a few methods for this purpose. The `),Ra(192,`code`),gT(193,`create()`),rf(),gT(194,` method returns an application object that implements the `),Ra(195,`code`),gT(196,`INestApplication`),rf(),gT(197,` interface. The methods of this object are described
997in the following chapters. In the `),Ra(198,`code`),gT(199,`main.ts`),rf(),gT(200,` example above, the application starts an HTTP listener and waits for inbound HTTP requests.`),rf(),Ra(201,`p`),gT(202,`The project structure generated by the Nest CLI encourages the convention of keeping each module in its own dedicated directory.`),rf(),Ra(203,`blockquote`,17)(204,`strong`),gT(205,`Hint`),rf(),gT(206,` By default, if an error occurs while the application is being created, the process exits with code `),Ra(207,`code`),gT(208,`1`),rf(),gT(209,`. To have the error thrown instead, disable the `),Ra(210,`code`),gT(211,`abortOnError`),rf(),gT(212,` option (e.g., `),Ra(213,`code`),gT(214),rf(),gT(215,`). 998`),rf(),Ra(216,`p`),qa$1(217,`app-banner-courses`),rf(),Ra(218,`h4`,25)(219,`span`),gT(220,`Platform`),rf()(),Ra(221,`p`),gT(222,`Nest is designed to be platform-agnostic. Platform independence lets you create reusable logical parts that can be used across several different types of applications. Nest can work with any Node.js HTTP framework once an adapter is created for it. Two HTTP platforms are supported out of the box: `),Ra(223,`a`,26),gT(224,`Express`),rf(),gT(225,` and `),Ra(226,`a`,27),gT(227,`Fastify`),rf(),gT(228,`. Choose the one that best suits your needs.`),rf(),Ra(229,`table`),qa$1(230,`thead`),Ra(231,`tbody`)(232,`tr`)(233,`td`)(234,`code`),gT(235,`platform-express`),rf()(),Ra(236,`td`)(237,`a`,26),gT(238,`Express`),rf(),gT(239,` is a well-known, minimalist web framework for Node.js. It is a battle-tested, production-ready library with extensive community resources. Nest uses the `),Ra(240,`code`),gT(241,`@nestjs/platform-express`),rf(),gT(242,` package by default, so no setup is required.`),rf()(),Ra(243,`tr`)(244,`td`)(245,`code`),gT(246,`platform-fastify`),rf()(),Ra(247,`td`)(248,`a`,28),gT(249,`Fastify`),rf(),gT(250,` is a high-performance, low-overhead framework focused on efficiency and speed. To learn how to use it, see `),Ra(251,`a`,29),gT(252,`Performance (Fastify)`),rf(),gT(253,`.`),rf()()()(),Ra(254,`p`),gT(255,`Each platform exposes its own application interface: `),Ra(256,`code`),gT(257,`NestExpressApplication`),rf(),gT(258,` and `),Ra(259,`code`),gT(260,`NestFastifyApplication`),rf(),gT(261,`, respectively.`),rf(),Ra(262,`p`),gT(263,`When you pass a type to the `),Ra(264,`code`),gT(265,`NestFactory.create()`),rf(),gT(266,` method, as in the example below, the `),Ra(267,`code`),gT(268,`app`),rf(),gT(269,` object exposes methods that are available only on that platform. You don't `),Ra(270,`strong`),gT(271,`need`),rf(),gT(272,` to specify a type `),Ra(273,`strong`),gT(274,`unless`),rf(),gT(275,` you want to access the underlying platform API.`),rf(),Ra(276,`app-copy-button`)(277,`pre`)(278,`code`,24),gT(279,` 999const app = await NestFactory.create<NestExpressApplication>(AppModule); 1000`),rf()()(),Ra(280,`h4`,30)(281,`span`),gT(282,`Running the application`),rf()(),Ra(283,`p`),gT(284,`Once the installation is complete, run the following command to start the application and listen for inbound HTTP requests:`),rf(),Ra(285,`pre`)(286,`code`,14),gT(287,` 1001$ npm run start 1002`),rf()(),Ra(288,`blockquote`,17)(289,`strong`),gT(290,`Hint`),rf(),gT(291,` To speed up development builds, use the `),Ra(292,`a`,31),gT(293,`SWC builder`),rf(),gT(294,` by passing the `),Ra(295,`code`),gT(296,`-b swc`),rf(),gT(297,` flag to the `),Ra(298,`code`),gT(299,`start`),rf(),gT(300,` script: `),Ra(301,`code`),gT(302,`npm run start -- -b swc`),rf(),gT(303,`. 1003`),rf(),Ra(304,`p`),gT(305,`This command starts the HTTP server on the port defined in the `),Ra(306,`code`),gT(307,`src/main.ts`),rf(),gT(308,` file (`),Ra(309,`code`),gT(310,`3000`),rf(),gT(311,`, unless the `),Ra(312,`code`),gT(313,`PORT`),rf(),gT(314,` environment variable is set). Once the application is running, open your browser and navigate to `),Ra(315,`code`),gT(316,`http://localhost:3000/`),rf(),gT(317,`. You should see the `),Ra(318,`code`),gT(319,`Hello World!`),rf(),gT(320,` message.`),rf(),Ra(321,`p`),gT(322,`To watch your files for changes, start the application with the following command instead:`),rf(),Ra(323,`pre`)(324,`code`,14),gT(325,` 1004$ npm run start:dev 1005`),rf()(),Ra(326,`p`),gT(327,`This command watches your files and, whenever they change, recompiles and restarts the server.`),rf(),Ra(328,`h4`,32)(329,`span`),gT(330,`Linting and formatting`),rf()(),Ra(331,`p`),gT(332,`The `),Ra(333,`a`,12),gT(334,`Nest
1005CLI`),rf(),gT(335,` aims to scaffold a reliable development workflow that scales. For a fast default workflow, generated TypeScript projects come with a code `),Ra(336,`strong`),gT(337,`linter`),rf(),gT(338,` and a `),Ra(339,`strong`),gT(340,`formatter`),rf(),gT(341,` preinstalled: `),Ra(342,`a`,33),gT(343,`oxlint`),rf(),gT(344,` and `),Ra(345,`a`,34),gT(346,`Prettier`),rf(),gT(347,`, respectively.`),rf(),Ra(348,`blockquote`,17)(349,`strong`),gT(350,`Hint`),rf(),gT(351,` Not sure how formatters and linters differ? See Prettier's `),Ra(352,`a`,35),gT(353,`comparison`),rf(),gT(354,`. 1006`),rf(),Ra(355,`p`),gT(356,`For headless environments where an IDE is not involved (continuous integration, Git hooks, etc.), the project includes ready-to-use `),Ra(357,`code`),gT(358,`npm`),rf(),gT(359,` scripts that run `),Ra(360,`a`,36)(361,`code`),gT(362,`oxlint`),rf()(),gT(363,` and `),Ra(364,`a`,37)(365,`code`),gT(366,`prettier`),rf()(),gT(367,`:`),rf(),Ra(368,`pre`)(369,`code`,14),gT(370,` 1007# Lint with oxlint 1008$ npm run lint 1009 1010# Format with prettier 1011$ npm run format 1012`),rf()()(),Ra(371,`a`,38),qa$1(372,`i`,39),Ra(373,`span`),gT(374,`Edit on GitHub`),rf()()()),a&2){let l=qS(177);LC(174),uf(` `,MT(175,7,`main`,l.isJsActive),` 1013`),LC(4),kv(`hide`,l.isJsActive),LC(3),kv(`hide`,!l.isJsActive),LC(33),Vv(`NestFactory.create(AppModule, `,`{`,` abortOnError: false `,`}`,`)`)}},dependencies:[wt$1,Kc,en$1,u,l$1,g],encapsulation:2})}return o})();var Kr=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-guards`]],features:[Iv],decls:482,vars:40,consts:[[`contentReference`,``],[`appe01808bf27e56439241b73af7ee28e48291a030a`,``],[`appbbf27eb0fe99c1f40eb03de67a663cda28099654`,``],[`appbf1fc2736e0526dd22c1a53131146359049c6cc9`,``],[`appd350045713bad4a3edd82417ede777ae394dcbd3`,``],[`app1ad330d9e235ed88880c8c0cd5e9b93b15390ba0`,``],[`appfd7577b231286b04e1ed565e30c53e556c84346f`,``],[`app860fda2692af42c6aa53bc9b34d2522d8f3f5eea`,``],[`app26cd9d09b43eee4e8d594a687244bb2eacfca7b0`,``],[`app9713b3e3f02d48fe6db511f48258266d5bb32dc9`,``],[1,`content`],[1,`content-inner`],[`id`,`guards`],[`src`,`/assets/Guards_1.png`,1,`illustrative-image`],[`routerLink`,`/middleware`],[1,`info`],[`appAnchor`,``,`id`,`authorization-guard`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`routerLink`,`/security/authentication`],[`routerLink`,`/security/authorization`],[`appAnchor`,``,`id`,`execution-context`],[`href`,`/exception-filters#arguments-host`],[`routerLink`,`/fundamentals/execution-context`],[`appAnchor`,``,`id`,`role-based-authentication`],[`appAnchor`,``,`id`,`binding-guards`],[1,`warning`],[`routerLink`,`/faq/hybrid-application`],[`routerLink`,`/fundamentals/custom-providers`],[`appAnchor`,``,`id`,`setting-roles-per-handler`],[`href`,`/fundamentals/execution-context#reflection-and-metadata`],[1,`language-ts`],[`href`,`/fundamentals/execution-context#low-level-approach`],[`appAnchor`,``,`id`,`putting-it-all-together`],[1,`language-json`],[`routerLink`,`/exception-filters`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/guards.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Ra(0,`div`,10,0)(2,`div`,11)(3,`h3`,12),gT(4,`Guards`),rf(),Ra(5,`p`),gT(6,`A guard is a class annotated with the `),Ra(7,`code`),gT(8,`@Injectable()`),rf(),gT(9,` decorator that implements the `),Ra(10,`code`),gT(11,`CanActivate`),rf(),gT(12,` interface.`),rf(),Ra(13,`figure`),qa$1(14,`img`,13),rf(),Ra(15,`p`),gT(16,`Guards have a `),Ra(17,`strong`),gT(18,`single responsibility`),rf(),gT(19,`: they determine whether a given request will be handled by the route handler, based on conditions present at runtime (such as permissions, roles, or ACLs). This is often referred to as `),Ra(20,`strong`),gT(21,`authorization`),rf(),gT(22,`. In traditional Express applications, authorization (and its close relative, `),Ra(23,`strong`),gT(24,`authentication`),rf(),gT(25,`, with which it usually collaborates) has typically been handled by `),Ra(26,`a`,14),gT(27,`middleware`),rf(),gT(28,`. Middleware is a good fit for authentication, because tasks such as validating a token and attaching properties to the `),Ra(29,`code`),gT(30,`request`),rf(),gT(31,` object are not tied to a particular route context (and its metadata).`),rf(),Ra(32,`p`),gT(33,`Middleware, however, is context-blind by nature: it doesn't know
1013which handler will be executed after it calls `),Ra(34,`code`),gT(35,`next()`),rf(),gT(36,`. `),Ra(37,`strong`),gT(38,`Guards`),rf(),gT(39,`, on the other hand, have access to the `),Ra(40,`code`),gT(41,`ExecutionContext`),rf(),gT(42,` instance, so they know exactly what will be executed next. Like exception filters, pipes, and interceptors, guards let you interpose processing logic at exactly the right point in the request/response cycle, and do so declaratively. This helps keep your code DRY.`),rf(),Ra(43,`blockquote`,15)(44,`strong`),gT(45,`Hint`),rf(),gT(46,` Guards are executed `),Ra(47,`strong`),gT(48,`after`),rf(),gT(49,` all middleware, but `),Ra(50,`strong`),gT(51,`before`),rf(),gT(52,` any interceptor or pipe. 1014`),rf(),Ra(53,`h4`,16)(54,`span`),gT(55,`Authorization guard`),rf()(),Ra(56,`p`),gT(57,`As mentioned, `),Ra(58,`strong`),gT(59,`authorization`),rf(),gT(60,` is a common use case for guards, because specific routes should be available only when the caller (usually a specific authenticated user) has sufficient permissions. The `),Ra(61,`code`),gT(62,`AuthGuard`),rf(),gT(63,` we'll build now assumes an authenticated user, and therefore a token attached to the request headers. It extracts and validates the token, and uses the extracted information to determine whether the request can proceed.`),rf(),Ra(64,`app-copy-button`,17)(65,`span`,18),gT(66),TT(67,`extension`),qa$1(68,`app-tabs`,null,1),rf(),Ra(70,`pre`)(71,`code`,19),gT(72,` 1015import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common'; 1016import { Observable } from 'rxjs'; 1017 1018@Injectable() 1019export class AuthGuard implements CanActivate { 1020 canActivate( 1021 context: ExecutionContext, 1022 ): boolean | Promise<boolean> | Observable<boolean> { 1023 const request = context.switchToHttp().getRequest(); 1024 return validateRequest(request); 1025 } 1026} 1027`),rf()(),Ra(73,`pre`)(74,`code`,19),gT(75,` 1028import { Injectable } from '@nestjs/common'; 1029 1030@Injectable() 1031export class AuthGuard { 1032 async canActivate(context) { 1033 const request = context.switchToHttp().getRequest(); 1034 return validateRequest(request); 1035 } 1036} 1037`),rf()()(),Ra(76,`blockquote`,15)(77,`strong`),gT(78,`Hint`),rf(),gT(79,` For a real-world example of an authentication mechanism, see the `),Ra(80,`a`,20),gT(81,`authentication`),rf(),gT(82,` chapter. For a more sophisticated authorization example, see the `),Ra(83,`a`,21),gT(84,`authorization`),rf(),gT(85,` chapter. 1038`),rf(),Ra(86,`p`),gT(87,`The logic inside the `),Ra(88,`code`),gT(89,`validateRequest()`),rf(),gT(90,` function can be as simple or as sophisticated as needed. The point of this example is to show how guards fit into the request/response cycle.`),rf(),Ra(91,`p`),gT(92,`Every guard must implement a `),Ra(93,`code`),gT(94,`canActivate()`),rf(),gT(95,` method. It returns a boolean indicating whether the current request is allowed, either synchronously or asynchronously (via a `),Ra(96,`code`),gT(97,`Promise`),rf(),gT(98,` or an `),Ra(99,`code`),gT(100,`Observable`),rf(),gT(101,`). Nest uses the return value to decide what happens next:`),rf(),Ra(102,`ul`)(103,`li`),gT(104,`if it returns `),Ra(105,`code`),gT(106,`true`),rf(),gT(107,`, the request is processed.`),rf(),Ra(108,`li`),gT(109,`if it returns `),Ra(110,`code`),gT(111,`false`),rf(),gT(112,`, Nest denies the request.`),rf()(),Ra(113,`p`),qa$1(114,`app-banner-enterprise`),rf(),Ra(115,`h4`,22)(116,`span`),gT(117,`Execution context`),rf()(),Ra(118,`p`),gT(119,`The `),Ra(120,`code`),gT(121,`canActivate()`),rf(),gT(122,` method takes a single argument, the `),Ra(123,`code`),gT(124,`ExecutionContext`),rf(),gT(125,` instance. `),Ra(126,`code`),gT(127,`ExecutionContext`),rf(),gT(128,` extends `),Ra(129,`code`),gT(130,`ArgumentsHost`),rf(),gT(131,`, which we covered in the exception filters chapter. The sample above uses the same helper methods defined on `),Ra(132,`code`),gT(133,`ArgumentsHost`),rf(),gT(134,` to get a reference to the `),Ra(135,`code`),gT(136,`Request`),rf(),gT(137,` object. See the `),Ra(138,`strong`),gT(139,`Arguments host`),rf(),gT(140,` section of the `),Ra(141,`a`,23),gT(142,`exception filters`),rf(),gT(143,` chapter for more on this topic.`),rf(),Ra(144,`p`),gT(145,`By extending `),Ra(146,`code`),gT(147,`ArgumentsHost`),rf(),gT(148,`, `),Ra(149,`code`),gT(150,`ExecutionContext`),rf(),gT(151,` adds several helper methods that provide additional details about the current execution process. These details help you build more generic guards that work across a broad set of controllers, methods, and execution contexts. See the `),Ra(152,`a`,24),gT(153,`execution context`),rf(),gT(154,` chapter to learn more about `),Ra(155,`code`),gT(156,`ExecutionContext`),rf(),gT(157,`.`),rf(),Ra(1
103858,`h4`,25)(159,`span`),gT(160,`Role-based authentication`),rf()(),Ra(161,`p`),gT(162,`Let's build a more functional guard that permits access only to users with a specific role. We'll start with a basic guard template and build on it in the following sections. For now, it allows all requests to proceed:`),rf(),Ra(163,`app-copy-button`,17)(164,`span`,18),gT(165),TT(166,`extension`),qa$1(167,`app-tabs`,null,2),rf(),Ra(169,`pre`)(170,`code`,19),gT(171,` 1039import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common'; 1040import { Observable } from 'rxjs'; 1041 1042@Injectable() 1043export class RolesGuard implements CanActivate { 1044 canActivate( 1045 context: ExecutionContext, 1046 ): boolean | Promise<boolean> | Observable<boolean> { 1047 return true; 1048 } 1049} 1050`),rf()(),Ra(172,`pre`)(173,`code`,19),gT(174,` 1051import { Injectable } from '@nestjs/common'; 1052 1053@Injectable() 1054export class RolesGuard { 1055 canActivate(context) { 1056 return true; 1057 } 1058} 1059`),rf()()(),Ra(175,`h4`,26)(176,`span`),gT(177,`Binding guards`),rf()(),Ra(178,`p`),gT(179,`Like pipes and exception filters, guards can be controller-scoped, method-scoped, or global-scoped. Below, we set up a controller-scoped guard using the `),Ra(180,`code`),gT(181,`@UseGuards()`),rf(),gT(182,` decorator. The decorator accepts a single guard or a comma-separated list of guards, so you can apply a whole set of guards with one declaration.`),rf(),Ra(183,`app-copy-button`,17)(184,`span`,18),qa$1(185,`app-tabs`,null,3),rf(),Ra(187,`pre`)(188,`code`,19),gT(189,` 1060@Controller('cats') 1061@UseGuards(RolesGuard) 1062export class CatsController {} 1063`),rf()()(),Ra(190,`blockquote`,15)(191,`strong`),gT(192,`Hint`),rf(),gT(193,` The `),Ra(194,`code`),gT(195,`@UseGuards()`),rf(),gT(196,` decorator is imported from the `),Ra(197,`code`),gT(198,`@nestjs/common`),rf(),gT(199,` package. 1064`),rf(),Ra(200,`p`),gT(201,`Above, we passed the `),Ra(202,`code`),gT(203,`RolesGuard`),rf(),gT(2
106404,` class (instead of an instance), leaving responsibility for instantiation to the framework and enabling dependency injection. As with pipes and exception filters, you can also pass an in-place instance:`),rf(),Ra(205,`app-copy-button`,17)(206,`span`,18),qa$1(207,`app-tabs`,null,4),rf(),Ra(209,`pre`)(210,`code`,19),gT(211,` 1065@Controller('cats') 1066@UseGuards(new RolesGuard()) 1067export class CatsController {} 1068`),rf()()(),Ra(212,`p`),gT(213,`The construction above attaches the guard to every handler declared by this controller. To apply the guard to a single method only, use the `),Ra(214,`code`),gT(215,`@UseGuards()`),rf(),gT(216,` decorator at the `),Ra(217,`strong`),gT(218,`method level`),rf(),gT(219,`.`),rf(),Ra(220,`p`),gT(221,`To set up a global guard, use the `),Ra(222,`code`),gT(223,`useGlobalGuards()`),rf(),gT(224,` method of the Nest application instance:`),rf(),Ra(225,`app-copy-button`,17)(226,`span`,18),qa$1(227,`app-tabs`,null,5),rf(),Ra(229,`pre`)(230,`code`,19),gT(231,` 1069const app = await NestFactory.create(AppModule); 1070app.useGlobalGuards(new RolesGuard()); 1071`),rf()()(),Ra(232,`blockquote`,27)(233,`strong`),gT(234,`Notice`),rf(),gT(235,` In a hybrid application, `),Ra(236,`code`),gT(237,`useGlobalGuards()`),rf(),gT(238,` doesn't set up guards for connected microservices by default (see `),Ra(239,`a`,28),gT(240,`Hybrid application`),rf(),gT(241,` to change this behavior). In a standard (non-hybrid) microservice application, `),Ra(242,`code`),gT(243,`useGlobalGuards()`),rf(),gT(244,` does mount the guards globally. 1072`),rf(),Ra(245,`p`),gT(246,`Global guards apply to every controller and every route handler in the application. However, a global guard registered outside of any module (with `),Ra(247,`code`),gT(248,`useGlobalGuards()`),rf(),gT(249,`, as in the example above) cannot inject dependencies, because the registration happens outside the context of any module. To solve this, register the guard directly from any module using the following construction:`),rf(),Ra(250,`app-copy-button`,17)(251,`span`,18),gT(252),TT(253,`extension`),qa$1(254,`app-tabs`,null,6),rf(),Ra(256,`pre`)(257,`code`,19),gT(258,` 1073import { Module } from '@nestjs/common'; 1074import { APP_GUARD } from '@nestjs/core'; 1075 1076@Module({ 1077 providers: [ 1078 { 1079 provide: APP_GUARD, 1080 useClass: RolesGuard, 1081 }, 1082 ], 1083}) 1084export class AppModule {} 1085`),rf()()(),Ra(259,`blockquote`,15)(260,`strong`),gT(261,`Hint`),rf(),gT(262,` When you use this approach to perform dependency injection for the guard, the guard is global regardless of the module in which you register it. We recommend registering it in the module where the guard (`),Ra(263,`code`),gT(264,`RolesGuard`),rf(),gT(265,` in the example above) is defined. Also, `),Ra(266,`code`),gT(267,`useClass`),rf(),gT(268,` is not the only way to register a custom provider. See `),Ra(269,`a`,29),gT(270,`Custom providers`),rf(),gT(271,` to learn more. 1086`),rf(),Ra(272,`blockquote`,15)(273,`strong`),gT(274,`Hint`),rf(),gT(275,` You can register the `),Ra(276,`code`),gT(277,`APP_GUARD`),rf(),gT(278,` token multiple times (in the same or different modules); every registered guard runs for each request, in registration order. `),Ra(279,`code`),gT(280,`APP_GUARD`),rf(),gT(281,` (like the other `),Ra(282,`code`),gT(283,`APP_*`),rf(),gT(284,` tokens) is a pseudo-provider that the framework consumes during bootstrap: it cannot be retrieved later with `),Ra(285,`code`),gT(286,`app.get()`),rf(),gT(287,` or injected elsewhere. 1087`),rf(),Ra(288,`h4`,30)(289,`span`),gT(290,`Setting roles per handler`),rf()(),Ra(291,`p`),gT(292,`Our `),Ra(293,`code`),gT(294,`RolesGuard`),rf(),gT(295,` works, but it isn't very smart yet: it doesn't take advantage of the most important guard feature, the `),Ra(296,`a`,24),gT(297,`execution context`),rf(),gT(298,`. It doesn't know about roles, or which roles are allowed for each handler. The `),Ra(299,`code`),gT(300,`CatsController`),rf(),gT(301,`, for example, could have different permission schemes for different routes. Some routes might be available only to admin users, while others are open to everyone. How can we match roles to routes in a flexible and reusable way?`),rf(),Ra(302,`p`),gT(303,`This is where `),Ra(304,`strong`),gT(305,`custom metadata`),rf(),gT(306,` comes into play (see `),Ra(307,`a`,31),gT(308,`Reflection and metadata`),rf(),gT(309,`). Nest lets you attach custom `),Ra(310,`strong`),gT(311,`metadata`),rf(),gT(312,` to route handlers, either through decorators created with the static `),Ra(313,`code`),gT(314,`Reflector.createDecorator()`),rf(),gT(315,` method or through the built-in `),Ra(316,`code`),gT(317,`@SetMetadata()`),rf(),gT(318,` decorator.`),rf(),Ra(319,`p`),gT(320,`For example, let's create a `),Ra(321,`code`),gT(322,`@Roles()`),rf(),gT(323,` decorator with the `),Ra(324,`code`),gT(325,`Reflector.createDecorator()`),rf(),gT(326,` method that attaches the metadata to the handler. `),Ra(327,`code`),gT(328,`Reflector`),rf(),gT(329,` is provided by the framework out of the box and exported from the `),Ra(330,`code`),gT(331,`@nestjs/core`),rf(),gT(332,` package.`),rf(),Ra(333,`app-copy-button`,17)(334,`span`,18),gT(335),TT(336,`extension`),qa$1(337,`app-tabs`,null,7),rf(),Ra(339,`pre`)(340,`code`,32),gT(341,` 1088import { Reflector } from '@nestjs/core'; 1089 1090export const Roles = Reflector.createDecorator<string[]>(); 1091`),rf()()(),Ra(342,`p`),gT(343,`The `),Ra(344,`code`),gT(345,`Roles`),rf(),gT(346,` decorator is a function that takes a single argument of type `),Ra(347,`c
1091ode`),gT(348,`string[]`),rf(),gT(349,`.`),rf(),Ra(350,`p`),gT(351,`To use this decorator, annotate the handler with it:`),rf(),Ra(352,`app-copy-button`,17)(353,`span`,18),gT(354),TT(355,`extension`),qa$1(356,`app-tabs`,null,8),rf(),Ra(358,`pre`)(359,`code`,19),gT(360,` 1092@Post() 1093@Roles(['admin']) 1094async create(@Body() createCatDto: CreateCatDto) { 1095 this.catsService.create(createCatDto); 1096} 1097`),rf()(),Ra(361,`pre`)(362,`code`,19),gT(363,` 1098@Post() 1099@Roles(['admin']) 1100@Bind(Body()) 1101async create(createCatDto) { 1102 this.catsService.create(createCatDto); 1103} 1104`),rf()()(),Ra(364,`p`),gT(365,`Here we've attached the `),Ra(366,`code`),gT(367,`Roles`),rf(),gT(368,` decorator metadata to the `),Ra(369,`code`),gT(370,`create()`),rf(),gT(371,` method, indicating that only users with the `),Ra(372,`code`),gT(373,`admin`),rf(),gT(374,` role should be allowed to access this route.`),rf(),Ra(375,`p`),gT(376,`Alternatively, instead of using the `),Ra(377,`code`),gT(378,`Reflector.createDecorator()`),rf(),gT(379,` method, you can use the built-in `),Ra(380,`code`),gT(381,`@SetMetadata()`),rf(),gT(382,` decorator. See the `),Ra(383,`a`,33),gT(384,`low-level approach`),rf(),gT(385,` to learn more.`),rf(),Ra(386,`h4`,34)(387,`span`),gT(388,`Putting it all together`),rf()(),Ra(389,`p`),gT(390,`Let's now tie this together with our `),Ra(391,`code`),gT(392,`RolesGuard`),rf(),gT(393,`. Currently, it returns `),Ra(394,`code`),gT(395,`true`),rf(),gT(396,` in all cases, allowing every request to proceed. We want to make the return value conditional, based on comparing the `),Ra(397,`strong`),gT(398,`roles assigned to the current user`),rf(),gT(399,` with the roles required by the route being processed. To access the route's role(s) (custom metadata), we use the `),Ra(400,`code`),gT(401,`Reflector`),rf(),gT(402,` class again, as follows:`),rf(),Ra(403,`app-copy-button`,17)(404,`span`,18),gT(405),TT(406,`extension`),qa$1(407,`app-tabs`,null,9),rf(),Ra(409,`pre`)(410,`code`,19),gT(411,` 1105import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common'; 1106import { Reflector } from '@nestjs/core'; 1107import { Roles } from './roles.decorator.js'; 1108 1109@Injectable() 1110export class RolesGuard implements CanActivate { 1111 constructor(private reflector: Reflector) {} 1112 1113 canActivate(context: ExecutionContext): boolean { 1114 const roles = this.reflector.get(Roles, context.getHandler()); 1115 if (!roles) { 1116 return true; 1117 } 1118 const request = context.switchToHttp().getRequest(); 1119 const user = request.user; 1120 return matchRoles(roles, user.roles); 1121 } 1122} 1123`),rf()(),Ra(412,`pre`)(413,`code`,19),gT(414,` 1124import { Injectable, Dependencies } from '@nestjs/common'; 1125import { Reflector } from '@nestjs/core'; 1126import { Roles } from './roles.decorator.js'; 1127 1128@Injectable() 1129@Dependencies(Reflector) 1130export class RolesGuard { 1131 constructor(reflector) { 1132 this.reflector = reflector; 1133 } 1134 1135 canActivate(context) { 1136 const roles = this.reflector.get(Roles, context.getHandler()); 1137 if (!roles) { 1138 return true; 1139 } 1140 const request = context.switchToHttp().getRequest(); 1141 const user = request.user; 1142 return matchRoles(roles, user.roles); 1143 } 1144} 1145`),rf()()(),Ra(415,`blockquote`,15)(416,`strong`),gT(417,`Hint`),rf(),gT(418,` In Node.js applications, it's common practice to attach the authorized user to the `),Ra(419,`code`),gT(420,`request`),rf(),gT(421,` object. The sample above therefore assumes that `),Ra(422,`code`),gT(423,`request.user`),rf(),gT(424,` contains the user instance and its roles. In your app, you will probably make that association in a custom `),Ra(425,`strong`),gT(426,`authentication guard`),rf(),gT(427,` (or middleware). See the `),Ra(428,`a`,20),gT(429,`authentication`),rf(),gT(430,` chapter for more information on this topic. 1146`),rf(),Ra(431,`blockquote`,27)(432,`strong`),gT(433,`Warning`),rf(),gT(434,` The `),Ra(435,`code`),gT(436,`matchRoles()`),rf(),gT(437,` function is not provided by Nest. Its logic can be as simple or as sophisticated as your application requires; the point of this example is to show how guards fit into the request/response cycle. 1147`),rf(),Ra(438,`p`),gT(439,`See the `),Ra(440,`a`,31),gT(441,`Reflection and metadata`),rf(),gT(442,` section of the `),Ra(443,`strong`),gT(444,`Execution context`),rf(),gT(445,` chapter for more details on using `),Ra(446,`code`),gT(447,`Reflector`),rf(),gT(448,` in a context-sensitive way.`),rf(),Ra(449,`p`),gT(450,`When a user with insufficient privileges requests an endpoint, Nest automatically returns the following response:`),rf(),Ra(451,`pre`)(452,`code`,35),gT(453,` 1148{ 1149 "statusCode": 403, 1150 "message": "Forbidden resource", 1151 "error": "Forbidden" 1152} 1153`),rf()(),Ra(454,`p`),gT(455,`Behind the scenes, when a guard returns `),Ra(456,`c
1153ode`),gT(457,`false`),rf(),gT(458,`, the framework throws a `),Ra(459,`code`),gT(460,`ForbiddenException`),rf(),gT(461,`. To return a different error response, throw your own exception instead. For example:`),rf(),Ra(462,`app-copy-button`)(463,`pre`)(464,`code`,19),gT(465,` 1154throw new UnauthorizedException(); 1155`),rf()()(),Ra(466,`p`),gT(467,`Any exception thrown by a guard is handled by the `),Ra(468,`a`,36),gT(469,`exceptions layer`),rf(),gT(470,` (the global exception filter and any exception filters applied to the current context).`),rf(),Ra(471,`blockquote`,15)(472,`strong`),gT(473,`Hint`),rf(),gT(474,` For a real-world example of how to implement authorization, see the `),Ra(475,`a`,21),gT(476,`authorization`),rf(),gT(477,` chapter. 1156`),rf()(),Ra(478,`a`,37),qa$1(479,`i`,38),Ra(480,`span`),gT(481,`Edit on GitHub`),rf()()()),a&2){let l=qS(69),d=qS(168),m=qS(255),h=qS(338),u=qS(357),b=qS(408);LC(66),uf(` `,MT(67,22,`auth.guard`,l.isJsActive),` 1157`),LC(4),kv(`hide`,l.isJsActive),LC(3),kv(`hide`,!l.isJsActive),LC(92),uf(` `,MT(166,25,`roles.guard`,d.isJsActive),` 1158`),LC(4),kv(`hide`,d.isJsActive),LC(3),kv(`hide`,!d.isJsActive),LC(80),uf(` `,MT(253,28,`app.module`,m.isJsActive),` 1159`),LC(83),uf(` `,MT(336,31,`roles.decorator`,h.isJsActive),` 1160`),LC(19),uf(` `,MT(355,34,`cats.controller`,u.isJsActive),` 1161`),LC(4),kv(`hide`,u.isJsActive),LC(3),kv(`hide`,!u.isJsActive),LC(44),uf(` `,MT(406,37,`roles.guard`,b.isJsActive),` 1162`),LC(4),kv(`hide`,b.isJsActive),LC(3),kv(`hide`,!b.isJsActive)}},dependencies:[Kc,wt$1,en$1,u,l,g],encapsulation:2})}return o})();var Qr=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-interceptors`]],features:[Iv],decls:537,vars:56,consts:[[`contentReference`,``],[`app7b3e6af074d15dec37daf9f6509ed0ab6e8a70d2`,``],[`app51a2f86360a31f95f9b0b708921904f62e4761d8`,``],[`appc61bee2a10fd72882211c994f43624d5bfaa24ec`,``],[`app9a2c996d1212d88367f906935580710aa225372e`,``],[`appeecef201ccbab4709674a519f1cc8c98472ceb78`,``],[`appdd37755321bfd482210c1b0affae9b00a0b921ed`,``],[`appdf6493b69988cca4845a693a112967fd45fa3f4e`,``],[`appe3e507469045abb590c7e149d89a93cb416ca9b0`,``],[`appc4e9775ab8e4e8213335f010e26fe54a712e82fd`,``],[1,`content`],[1,`content-inner`],[`id`,`interceptors`],[`src`,`/assets/Interceptors_1.png`,1,`illustrative-image`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/Aspect-oriented_programming`],[`appAnchor`,``,`id`,`basics`],[`routerLink`,`/guards`],[`href`,`/exception-filters#arguments-host`],[`appAnchor`,``,`id`,`execution-context`],[`routerLink`,`/fundamentals/execution-context`],[`appAnchor`,``,`id`,`call-handler`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/ReactiveX/rxjs`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/Pointcut`],[`appAnchor`,``,`id`,`aspect-interception`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[1,`info`],[1,`warning`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.observe.nestjs.com/`,`title`,`NestJS Observe`],[`routerLink`,`/observability/overview`],[`appAnchor`,``,`id`,`binding-interceptors`],[`routerLink`,`/pipes`],[`routerLink`,`/fundamentals/custom-providers`],[`appAnchor`,``,`id`,`response-mapping`],[`href`,`/controllers#library-specific-approach`],[1,`language-json`],[`appAnchor`,``,`id`,`exception-mapping`],[`appAnchor`,``,`id`,`stream-overriding`],[`appAnchor`,``,`id`,`more-operators`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/interceptors.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Ra(0,`div`,10,0)(2,`div`,11)(3,`h3`,12),gT(4,`Interceptors`),rf(),Ra(5,`p`),gT(6,`An interceptor is a class annotated with the `),Ra(7,`code`),gT(8,`@Injectable()`),rf(),gT(9,` decorator that implements the `),Ra(10,`code`),gT(11,`NestInterceptor`),rf(),gT(12,` interface.`),rf(),Ra(13,`figure`),qa$1(14,`img`,13),rf(),Ra(15,`p`),gT(16,`Interceptors offer a set of capabilities inspired by the `),Ra(17,`a`,14),gT(18,`Aspect Oriented Programming`),rf(),gT(19,` (AOP) technique. They make it possible to:`),rf(),Ra(20,`ul`)(21,`li`),gT(22,`bind extra logic before or after method execution`),rf(),Ra(23,`li`),gT(24,`transform the result returned from a function`),rf(),Ra(25,`li`),gT(26,`transform the exception thrown from a function`),rf(),Ra(27,`li`),gT(28,`extend the basic function behavior`),rf(),Ra(29,`li`),gT(30,`completely override a function depending on specific conditions (e.g., for caching purposes)`),rf()(),Ra(31,`h4`,15)(32,`span`),gT(33,`Basics`),rf()(),Ra(34,`p`),gT(35,`Each interceptor implements the `),Ra(36,`code`),gT(37,`intercept()`),rf(),gT(38,` method, which takes two arguments. The first is the `),Ra(39,`code`),gT(40,`ExecutionContext`),rf(),gT(41,` instance (exactly the same object as for `),Ra(42,`a`,16),gT(43,`guards`),rf(),gT(44,`). `),Ra(45,`code`),gT(46,`ExecutionContext`),rf(),gT(47,` extends `),Ra(48,`code`),gT(49,`ArgumentsHost`),rf(),gT(50,`, which we covered in the exception filters chapter. There, we saw that it's a wrapper around the arguments passed to the original handler, and that it contains different argument arrays depending on the type of application. See the `),Ra(51,`a`,17),gT
1162(52,`exception filters`),rf(),gT(53,` chapter for more on this topic.`),rf(),Ra(54,`h4`,18)(55,`span`),gT(56,`Execution context`),rf()(),Ra(57,`p`),gT(58,`By extending `),Ra(59,`code`),gT(60,`ArgumentsHost`),rf(),gT(61,`, `),Ra(62,`code`),gT(63,`ExecutionContext`),rf(),gT(64,` adds several helper methods that provide additional details about the current execution process. These details help you build more generic interceptors that work across a broad set of controllers, methods, and execution contexts. See the `),Ra(65,`a`,19),gT(66,`execution context`),rf(),gT(67,` chapter to learn more about `),Ra(68,`code`),gT(69,`ExecutionContext`),rf(),gT(70,`.`),rf(),Ra(71,`h4`,20)(72,`span`),gT(73,`Call handler`),rf()(),Ra(74,`p`),gT(75,`The second argument is a `),Ra(76,`code`),gT(77,`CallHandler`),rf(),gT(78,`. The `),Ra(79,`code`),gT(80,`CallHandler`),rf(),gT(81,` interface exposes a `),Ra(82,`code`),gT(83,`handle()`),rf(),gT(84,` method, which you use to invoke the route handler method at some point in your interceptor. If you don't call `),Ra(85,`code`),gT(86,`handle()`),rf(),gT(87,` in your implementation of the `),Ra(88,`code`),gT(89,`intercept()`),rf(),gT(90,` method, the route handler method won't be executed at all.`),rf(),Ra(91,`p`),gT(92,`This means that the `),Ra(93,`code`),gT(94,`intercept()`),rf(),gT(95,` method effectively `),Ra(96,`strong`),gT(97,`wraps`),rf(),gT(98,` the request/response stream. As a result, you can implement custom logic `),Ra(99,`strong`),gT(100,`both before and after`),rf(),gT(101,` the execution of the final route handler. Running code `),Ra(102,`strong`),gT(103,`before`),rf(),gT(104,` the handler is straightforward: place it before the `),Ra(105,`code`),gT(106,`handle()`),rf(),gT(107,` call. To act on what happens afterward, use the `),Ra(108,`code`),gT(109,`Observable`),rf(),gT(110,` that `),Ra(111,`code`),gT(112,`handle()`),rf(),gT(113,` returns: you can apply `),Ra(114,`a`,21),gT(115,`RxJS`),rf(),gT(116,` operators to it to further manipulate the response. In Aspect Oriented Programming terminology, the invocation of the route handler (i.e., calling `),Ra(117,`code`),gT(118,`handle()`),rf(),gT(119,`) is called a `),Ra(120,`a`,22),gT(121,`Pointcut`),rf(),gT(122,`, indicating that it's the point at which our additional logic is inserted.`),rf(),Ra(123,`p`),gT(124,`Consider, for example, an incoming `),Ra(125,`code`),gT(126,`POST /cats`),rf(),gT(127,` request. This request is destined for the `),Ra(128,`code`),gT(129,`create()`),rf(),gT(130,` handler defined inside `),Ra(131,`code`),gT(132,`CatsController`),rf(),gT(133,`. If an interceptor that doesn't call `),Ra(134,`code`),gT(135,`handle()`),rf(),gT(136,` is invoked anywhere along the way, the `),Ra(137,`code`),gT(138,`create()`),rf(),gT(139,` method won't be executed. Once `),Ra(140,`code`),gT(141,`handle()`),rf(),gT(142,` is called and the `),Ra(143,`code`),gT(144,`Observable`),rf(),gT(145,` it returns is subscribed to (Nest subscribes to the stream your `),Ra(146,`code`),gT(147,`intercept()`),rf(),gT(148,` method returns), the `),Ra(149,`code`),gT(150,`create()`),rf(),gT(151,` handler is triggered. As the handler's result flows through the stream, you can apply additional operations to it before the final result is returned to the caller.`),rf(),Ra(152,`p`),qa$1(153,`app-banner-devtools`),rf(),Ra(154,`h4`,23)(155,`span`),gT(156,`Aspect interception`),rf()(),Ra(157,`p`),gT(158,`The first use case we'll look at is using an interceptor to log user interaction (e.g., storing user calls, asynchronously dispatching events, or calculating a timestamp). The following example shows a simple `),Ra(159,`code`),gT(160,`LoggingInterceptor`),rf(),gT(161,`:`),rf(),Ra(162,`app-copy-button`,24)(163,`span`,25),gT(164),TT(165,`extension`),qa$1(166,`app-tabs`,null,1),rf(),Ra(168,`pre`)(169,`code`,26),gT(170,` 1163import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common'; 1164import { Observable } from 'rxjs'; 1165import { tap } from 'rxjs/operators'; 1166 1167@Injectable() 1168export class LoggingInterceptor implements NestInterceptor { 1169 intercept(context: ExecutionContext, next: CallHandler): Observable<any> { 1170 console.log('Before...'); 1171 1172 const now = Date.now(); 1173 return next 1174 .handle() 1175 .pipe( 1176 tap(() => console.log(\`After... \${Date.now() - now}ms\`)), 1177 ); 1178 } 1179}
1180`),rf()(),Ra(171,`pre`)(172,`code`,26),gT(173,` 1181import { Injectable } from '@nestjs/common'; 1182import { tap } from 'rxjs/operators'; 1183 1184@Injectable() 1185export class LoggingInterceptor { 1186 intercept(context, next) { 1187 console.log('Before...'); 1188 1189 const now = Date.now(); 1190 return next 1191 .handle() 1192 .pipe( 1193 tap(() => console.log(\`After... \${Date.now() - now}ms\`)), 1194 ); 1195 } 1196} 1197`),rf()()(),Ra(174,`blockquote`,27)(175,`strong`),gT(176,`Hint`),rf(),Ra(177,`code`),gT(178,`NestInterceptor<T, R>`),rf(),gT(179,` is a generic interface in which `),Ra(180,`code`),gT(181,`T`),rf(),gT(182,` is the type of the values emitted by the `),Ra(183,`code`),gT(184,`Observable<T>`),rf(),gT(185,` that `),Ra(186,`code`),gT(187,`next.handle()`),rf(),gT(188,` returns (the response stream), and `),Ra(189,`code`),gT(190,`R`),rf(),gT(191,` is the type of the values emitted by the `),Ra(192,`code`),gT(193,`Observable<R>`),rf(),gT(194,` that `),Ra(195,`code`),gT(196,`intercept()`),rf(),gT(197,` returns. 1198`),rf(),Ra(198,`blockquote`,28)(199,`strong`),gT(200,`Notice`),rf(),gT(201,` Interceptors, like controllers, providers, guards, and so on, can `),Ra(202,`strong`),gT(203,`inject dependencies`),rf(),gT(2
119804,` through their `),Ra(205,`code`),gT(206,`constructor`),rf(),gT(207,`. 1199`),rf(),Ra(208,`p`),gT(209,`Since `),Ra(210,`code`),gT(211,`handle()`),rf(),gT(212,` returns an RxJS `),Ra(213,`code`),gT(214,`Observable`),rf(),gT(215,`, you can choose from a wide range of operators to manipulate the stream. The example above uses the `),Ra(216,`code`),gT(217,`tap()`),rf(),gT(218,` operator, which calls our logging function when the stream emits the route handler's result, without otherwise interfering with the response cycle. Note that this function is not called if the route handler throws; to run logic in that case as well, pass an observer object with an `),Ra(219,`code`),gT(220,`error`),rf(),gT(221,` callback to `),Ra(222,`code`),gT(223,`tap()`),rf(),gT(224,`, or use the `),Ra(225,`code`),gT(226,`finalize()`),rf(),gT(227,` operator.`),rf(),Ra(228,`blockquote`,27)(229,`strong`),gT(230,`Hint`),rf(),gT(231,` Timing a handler by hand, as above, is a minimal version of what an APM does. `),Ra(232,`a`,29),gT(233,`NestJS Observe`),rf(),gT(234,` records the same measurement for every controller, provider, and queue consumer, with no interceptor to write or bind. It also records the time each one spent on its own, with everything it awaited subtracted out. See the `),Ra(235,`a`,30),gT(236,`Observability`),rf(),gT(237,` chapter. 1200`),rf(),Ra(238,`h4`,31)(239,`span`),gT(240,`Binding interceptors`),rf()(),Ra(241,`p`),gT(242,`To set up the interceptor, use the `),Ra(243,`code`),gT(244,`@UseInterceptors()`),rf(),gT(245,` decorator. Like `),Ra(246,`a`,32),gT(247,`pipes`),rf(),gT(248,` and `),Ra(249,`a`,16),gT(250,`guards`),rf(),gT(251,`, interceptors can be controller-scoped, method-scoped, or global-scoped.`),rf(),Ra(252,`app-copy-button`,24)(253,`span`,25),gT(254),TT(255,`extension`),qa$1(256,`app-tabs`,null,2),rf(),Ra(258,`pre`)(259,`code`,26),gT(260,` 1201@UseInterceptors(LoggingInterceptor) 1202export class CatsController {} 1203`),rf()()(),Ra(261,`blockquote`,27)(262,`strong`),gT(263,`Hint`),rf(),gT(264,` The `),Ra(265,`code`),gT(266,`@UseInterceptors()`),rf(),gT(267,` decorator is imported from the `),Ra(268,`code`),gT(269,`@nestjs/common`),rf(),gT(270,` package. 1204`),rf(),Ra(271,`p`),gT(272,`With the construction above, each route handler defined in `),Ra(273,`code`),gT(274,`CatsController`),rf(),gT(275,` uses `),Ra(276,`code`),gT(277,`LoggingInterceptor`),rf(),gT(278,`. When a client calls the `),Ra(279,`code`),gT(280,`GET /cats`),rf(),gT(281,` endpoint, you'll see the following in standard output:`),rf(),Ra(282,`app-copy-button`)(283,`pre`)(284,`code`,26),gT(285,` 1205Before... 1206After... 1ms 1207`),rf()()(),Ra(286,`p`),gT(287,`Note that we passed the `),Ra(288,`code`),gT(289,`LoggingInterceptor`),rf(),gT(290,` class (instead of an instance), leaving responsibility for instantiation to the framework and enabling dependency injection. As with pipes, guards, and exception filters, you can also pass an in-place instance:`),rf(),Ra(291,`app-copy-button`,24)(292,`span`,25),gT(293),TT(294,`extension`),qa$1(295,`app-tabs`,null,3),rf(),Ra(297,`pre`)(298,`code`,26),gT(299,` 1208@UseInterceptors(new LoggingInterceptor()) 1209export class CatsController {} 1210`),rf()()(),Ra(300,`p`),gT(301,`The construction above attaches the interceptor to every handler declared by this controller. To restrict the interceptor to a single method, apply the decorator at the `),Ra(302,`strong`),gT(303,`method level`),rf(),gT(304,`.`),rf(),Ra(305,`p`),gT(306,`To set up a global interceptor, use the `),Ra(307,`code`),gT(308,`useGlobalInterceptors()`),rf(),gT(309,` method of the Nest application instance:`),rf(),Ra(310,`app-copy-button`)(311,`pre`)(312,`code`,26),gT(313,` 1211const app = await NestFactory.create(AppModule); 1212app.useGlobalInterceptors(new LoggingInterceptor()); 1213`),rf()()(),Ra(314,`p`),gT(315,`Global interceptors apply to every controller and every route handler in the application. However, a global interceptor registered outside of any module (with `),Ra(316,`code`),gT(317,`useGlobalInterceptors()`),rf(),gT(318,`, as in the example above) cannot inject dependencies, because the registration happens outside the context of any module. To solve this, register the interceptor `),Ra(319,`strong`),gT(320,`directly from any module`),rf(),gT(321,` using the following construction:`),rf(),Ra(322,`app-copy-button`,24)(323,`span`,25),gT(324),TT(325,`extension`),qa$1(326,`app-tabs`,null,4),rf(),Ra(328,`pre`)(329,`code`,26),gT
1213(330,` 1214import { Module } from '@nestjs/common'; 1215import { APP_INTERCEPTOR } from '@nestjs/core'; 1216 1217@Module({ 1218 providers: [ 1219 { 1220 provide: APP_INTERCEPTOR, 1221 useClass: LoggingInterceptor, 1222 }, 1223 ], 1224}) 1225export class AppModule {} 1226`),rf()()(),Ra(331,`blockquote`,27)(332,`strong`),gT(333,`Hint`),rf(),gT(334,` When you use this approach to perform dependency injection for the interceptor, the interceptor is global regardless of the module in which you register it. We recommend registering it in the module where the interceptor (`),Ra(335,`code`),gT(336,`LoggingInterceptor`),rf(),gT(337,` in the example above) is defined. Also, `),Ra(338,`code`),gT(339,`useClass`),rf(),gT(340,` is not the only way to register a custom provider. See `),Ra(341,`a`,33),gT(342,`Custom providers`),rf(),gT(343,` to learn more. 1227`),rf(),Ra(344,`h4`,34)(345,`span`),gT(346,`Response mapping`),rf()(),Ra(347,`p`),gT(348,`The stream returned by `),Ra(349,`code`),gT(350,`handle()`),rf(),gT(351,` contains the value `),Ra(352,`strong`),gT(353,`returned`),rf(),gT(354,` from the route handler, so you can transform it with RxJS's `),Ra(355,`code`),gT(356,`map()`),rf(),gT(357,` operator.`),rf(),Ra(358,`blockquote`,28)(359,`strong`),gT(360,`Warning`),rf(),gT(361,` Response mapping doesn't work with the library-specific response strategy, i.e., when a route handler injects the response object with `),Ra(362,`code`),gT(363,`@Res()`),rf(),gT(364,` and sends the response itself. To combine the two, enable the `),Ra(365,`code`),gT(366,`passthrough`),rf(),gT(367,` option (see `),Ra(368,`a`,35),gT(369,`Library-specific approach`),rf(),gT(370,`). 1228`),rf(),Ra(371,`p`),gT(372,`Let's create a `),Ra(373,`code`),gT(374,`TransformInterceptor`),rf(),gT(375,` that modifies each response in a trivial way to demonstrate the process. It uses RxJS's `),Ra(376,`code`),gT(377,`map()`),rf(),gT(378,` operator to assign the response object to the `),Ra(379,`code`),gT(380,`data`),rf(),gT(381,` property of a newly created object, and returns the new object to the client.`),rf(),Ra(382,`app-copy-button`,24)(383,`span`,25),gT(384),TT(385,`extension`),qa$1(386,`app-tabs`,null,5),rf(),Ra(388,`pre`)(389,`code`,26),gT(390,` 1229import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common'; 1230import { Observable } from 'rxjs'; 1231import { map } from 'rxjs/operators'; 1232 1233export interface Response<T> { 1234 data: T; 1235} 1236 1237@Injectable() 1238export class TransformInterceptor<T> implements NestInterceptor<T, Response<T>> { 1239 intercept(context: ExecutionContext, next: CallHandler): Observable<Response<T>> { 1240 return next.handle().pipe(map(data => ({ data }))); 1241 } 1242} 1243`),rf()(),Ra(391,`pre`)(392,`code`,26),gT(393,` 1244import { Injectable } from '@nestjs/common'; 1245import { map } from 'rxjs/operators'; 1246 1247@Injectable() 1248export class TransformInterceptor { 1249 intercept(context, next) { 1250 return next.handle().pipe(map(data => ({ data }))); 1251 } 1252} 1253`),rf()()(),Ra(394,`blockquote`,27)(395,`strong`),gT(396,`Hint`),rf(),gT(397,` The `),Ra(398,`code`),gT(399,`intercept()`),rf(),gT(400,` method can be synchronous or asynchronous. Declare it `),Ra(401,`code`),gT(402,`async`),rf(),gT(403,` if you need to await something before returning the stream. 1254`),rf(),Ra(404,`p`),gT(405,`With this interceptor bound, a `),Ra(406,`code`),gT(407,`GET /cats`),rf(),gT(408,` request whose route handler returns an empty array `),Ra(409,`code`),gT(410,`[]`),rf(),gT(411,` produces the following response:`),rf(),Ra(412,`pre`)(413,`code`,36),gT(414,` 1255{ 1256 "data": [] 1257} 1258`),rf()(),Ra(415,`p`),gT(416,`Interceptors are well suited to building reusable solutions for requirements that span the entire application. For example, imagine you need to replace every `),Ra(417,`code`),gT(418,`null`),rf(),gT(419,` response value with an empty string `),Ra(420,`code`),gT(421,`''`),rf(),gT(422,`. You can do this with one line of code, and bind the interceptor globally so that every registered handler uses it automatically.`),rf(),Ra(423,`app-copy-button`,24)(424,`span`,25),qa$1(425,`app-tabs`,null,6),rf(),Ra(427,`pre`)(428,`code`,26),gT(429,` 1259import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common'; 1260import { Observable } from 'rxjs'; 1261import { map } from 'rxjs/operators'; 1262 1263@Injectable() 1264export class ExcludeNullInterceptor implements NestInterceptor { 1265 intercept(context: ExecutionContext, next: CallHandler): Observable<any> { 1266 return next 1267 .handle() 1268 .pipe(map(value => value === null ? '' : value )); 1269 } 1270}
1271`),rf()(),Ra(430,`pre`)(431,`code`,26),gT(432,` 1272import { Injectable } from '@nestjs/common'; 1273import { map } from 'rxjs/operators'; 1274 1275@Injectable() 1276export class ExcludeNullInterceptor { 1277 intercept(context, next) { 1278 return next 1279 .handle() 1280 .pipe(map(value => value === null ? '' : value )); 1281 } 1282} 1283`),rf()()(),Ra(433,`h4`,37)(434,`span`),gT(435,`Exception mapping`),rf()(),Ra(436,`p`),gT(437,`Another use case is overriding thrown exceptions with RxJS's `),Ra(438,`code`),gT(439,`catchError()`),rf(),gT(440,` operator:`),rf(),Ra(441,`app-copy-button`,24)(442,`span`,25),gT(443),TT(444,`extension`),qa$1(445,`app-tabs`,null,7),rf(),Ra(447,`pre`)(448,`code`,26),gT(449,` 1284import { 1285 Injectable, 1286 NestInterceptor, 1287 ExecutionContext, 1288 BadGatewayException, 1289 CallHandler, 1290} from '@nestjs/common'; 1291import { Observable, throwError } from 'rxjs'; 1292import { catchError } from 'rxjs/operators'; 1293 1294@Injectable() 1295export class ErrorsInterceptor implements NestInterceptor { 1296 intercept(context: ExecutionContext, next: CallHandler): Observable<any> { 1297 return next 1298 .handle() 1299 .pipe( 1300 catchError(err => throwError(() => new BadGatewayException())), 1301 ); 1302 } 1303} 1304`),rf()(),Ra(450,`pre`)(451,`code`,26),gT(452,` 1305import { Injectable, BadGatewayException } from '@nestjs/common'; 1306import { throwError } from 'rxjs'; 1307import { catchError } from 'rxjs/operators'; 1308 1309@Injectable() 1310export class ErrorsInterceptor { 1311 intercept(context, next) { 1312 return next 1313 .handle() 1314 .pipe( 1315 catchError(err => throwError(() => new BadGatewayException())), 1316 ); 1317 } 1318} 1319`),rf()()(),Ra(453,`h4`,38)(454,`span`),gT(455,`Stream overriding`),rf()(),Ra(456,`p`),gT(457,`Sometimes you may want to skip calling the handler entirely and return a different value instead. A typical example is a cache that improves response time. Let's look at a simple `),Ra(458,`strong`),gT(459,`cache interceptor`),rf(),gT(460,` that returns its response from a cache. A realistic implementation would also need to consider factors such as TTL, cache invalidation, and cache size, which are beyond the scope of this discussion. The following basic example demonstrates the main concept.`),rf(),Ra(461,`app-copy-button`,24)(462,`span`,25),gT(463),TT(464,`extension`),qa$1(465,`app-tabs`,null,8),rf(),Ra(467,`pre`)(468,`code`,26),gT(469,` 1320import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common'; 1321import { Observable, of } from 'rxjs'; 1322 1323@Injectable() 1324export class CacheInterceptor implements NestInterceptor { 1325 intercept(context: ExecutionContext, next: CallHandler): Observable<any> { 1326 const isCached = true; 1327 if (isCached) { 1328 return of([]); 1329 } 1330 return next.handle(); 1331 } 1332} 1333`),rf()(),Ra(470,`pre`)(471,`code`,26),gT(472,` 1334import { Injectable } from '@nestjs/common'; 1335import { of } from 'rxjs'; 1336 1337@Injectable() 1338export class CacheInterceptor { 1339 intercept(context, next) { 1340 const isCached = true; 1341 if (isCached) { 1342 return of([]); 1343 } 1344 return next.handle(); 1345 } 1346} 1347`),rf()()(),Ra(473,`p`),gT(474,`Our `),Ra(475,`code`),gT(476,`CacheInterceptor`),rf(),gT(477,` has a hardcoded `),Ra(478,`code`),gT(479,`isCached`),rf(),gT(480,` variable and a hardcoded response `),Ra(481,`code`),gT(482,`[]`),rf(),gT(483,`. The key point is that it returns a new stream, created by RxJS's `),Ra(484,`code`),gT(485,`of()`),rf(),gT(486,` function, so the route handler `),Ra(487,`strong`),gT(488,`won't be called`),rf(),gT(489,` at all. When someone calls an endpoint that uses `),Ra(490,`code`),gT(491,`CacheInterceptor`),rf(),gT(492,`, the response (a hardcoded, empty array) is returned immediately. To build a generic solution, use `),Ra(493,`code`),gT(494,`Reflector`),rf(),gT(495,` together with a custom decorator, as described in the `),Ra(496,`a`,16),gT(497,`guards`),rf(),gT(498,` chapter.`),rf(),Ra(499,`h4`,39)(500,`span`),gT(501,`More operators`),rf()(),Ra(502,`p`),gT(503,`Manipulating the stream with RxJS operators opens up many possibilities. Consider another common use case: handling `),Ra(504,`strong`),gT(505,`timeouts`),rf(),gT(506,` on route requests. If an endpoint doesn't return anything within a given period, you want to terminate the request with an error response. The following construction enables this:`),rf(),Ra(507,`app-copy-button`,24)(508,`span`,25),gT(509),TT(510,`extension`),qa$1(511,`app-tabs`,null,9),rf(),Ra(513,`pre`)(514,`code`,26),gT
1347(515,` 1348import { Injectable, NestInterceptor, ExecutionContext, CallHandler, RequestTimeoutException } from '@nestjs/common'; 1349import { Observable, throwError, TimeoutError } from 'rxjs'; 1350import { catchError, timeout } from 'rxjs/operators'; 1351 1352@Injectable() 1353export class TimeoutInterceptor implements NestInterceptor { 1354 intercept(context: ExecutionContext, next: CallHandler): Observable<any> { 1355 return next.handle().pipe( 1356 timeout(5000), 1357 catchError(err => { 1358 if (err instanceof TimeoutError) { 1359 return throwError(() => new RequestTimeoutException()); 1360 } 1361 return throwError(() => err); 1362 }), 1363 ); 1364 } 1365} 1366`),rf()(),Ra(516,`pre`)(517,`code`,26),gT(518,` 1367import { Injectable, RequestTimeoutException } from '@nestjs/common'; 1368import { throwError, TimeoutError } from 'rxjs'; 1369import { catchError, timeout } from 'rxjs/operators'; 1370 1371@Injectable() 1372export class TimeoutInterceptor { 1373 intercept(context, next) { 1374 return next.handle().pipe( 1375 timeout(5000), 1376 catchError(err => { 1377 if (err instanceof TimeoutError) { 1378 return throwError(() => new RequestTimeoutException()); 1379 } 1380 return throwError(() => err); 1381 }), 1382 ); 1383 } 1384} 1385`),rf()()(),Ra(519,`p`),gT(520,`If the route handler doesn't emit a result within 5 seconds, `),Ra(521,`code`),gT(522,`timeout()`),rf(),gT(523,` fails the stream with a `),Ra(524,`code`),gT(525,`TimeoutError`),rf(),gT(526,`, which the interceptor maps to a `),Ra(527,`code`),gT(528,`RequestTimeoutException`),rf(),gT(529,`. Unsubscribing from the handler's stream doesn't abort work the handler has already started (such as a pending database query), so add custom logic before throwing `),Ra(530,`code`),gT(531,`RequestTimeoutException`),rf(),gT(532,` if you need to release resources.`),rf()(),Ra(533,`a`,40),qa$1(534,`i`,41),Ra(535,`span`),gT(536,`Edit on GitHub`),rf()()()),a&2){let l=qS(167),d=qS(257),m=qS(296),h=qS(327),u=qS(387),b=qS(426),S=qS(446),k=qS(466),C=qS(512);LC(164),uf(` `,MT(165,32,`logging.interceptor`,l.isJsActive),` 1386`),LC(4),kv(`hide`,l.isJsActive),LC(3),kv(`hide`,!l.isJsActive),LC(83),uf(` `,MT(255,35,`cats.controller`,d.isJsActive),` 1387`),LC(39),uf(` `,MT(294,38,`cats.controller`,m.isJsActive),` 1388`),LC(31),uf(` `,MT(325,41,`app.module`,h.isJsActive),` 1389`),LC(60),uf(` `,MT(385,44,`transform.interceptor`,u.isJsActive),` 1390`),LC(4),kv(`hide`,u.isJsActive),LC(3),kv(`hide`,!u.isJsActive),LC(36),kv(`hide`,b.isJsActive),LC(3),kv(`hide`,!b.isJsActive),LC(13),uf(` `,MT(444,47,`errors.interceptor`,S.isJsActive),` 1391`),LC(4),kv(`hide`,S.isJsActive),LC(3),kv(`hide`,!S.isJsActive),LC(13),uf(` `,MT(464,50,`cache.interceptor`,k.isJsActive),` 1392`),LC(4),kv(`hide`,k.isJsActive),LC(3),kv(`hide`,!k.isJsActive),LC(39),uf(` `,MT(510,53,`timeout.interceptor`,C.isJsActive),` 1393`),LC(4),kv(`hide`,C.isJsActive),LC(3),kv(`hide`,!C.isJsActive)}},dependencies:[wt$1,Kc,s,en$1,u,g],encapsulation:2})}return o})();var $r=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-introduction`]],features:[Iv],decls:114,vars:0,consts:[[`contentReference`,``],[1,`content`],[1,`content-inner`],[`id`,`introduction`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://nodejs.org/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.typescriptlang.org/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/fastify/fastify`],[`appAnchor`,``,`id`,`philosophy`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://angular.dev/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/facebook/react`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/vuejs/core`],[`appAnchor`,``,`id`,`installation`],[`routerLink`,`/cli/overview`],[`href`,`#alternatives`],[`routerLink`,`/first-steps`],[1,`language-bash`],[`appAnchor`,``,`id`,`alternatives`],[1,`info`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/Rich-Harris/degit`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`http://localhost:3000/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://dev.to/micalevisk/5-steps-to-create-a-bare-minimum-nestjs-app-from-scratch-5c3b`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/introduction.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Ra(0,`div`,1,0)(2,`div`,2)(3,`h3`,3),gT(4,`Introduction`),rf(),Ra(5,`p`),gT(6,`Nest (NestJS) is a framework for building efficient, scalable `),Ra(7,`a`,4),gT(8,`Node.js`),rf(),gT(9,` server-side applications. It uses progressive JavaScript, is built with and fully supports `),Ra(10,`a`,5),gT(11,`Type
1393Script`),rf(),gT(12,` (while still letting you write plain JavaScript), and combines elements of OOP (object-oriented programming), FP (functional programming), and FRP (functional reactive programming).`),rf(),Ra(13,`p`),gT(14,`Under the hood, Nest uses robust HTTP server frameworks such as `),Ra(15,`a`,6),gT(16,`Express`),rf(),gT(17,` (the default), and can optionally be configured to use `),Ra(18,`a`,7),gT(19,`Fastify`),rf(),gT(20,` instead.`),rf(),Ra(21,`p`),gT(22,`Nest provides a level of abstraction above these common Node.js frameworks (Express and Fastify), but also exposes their APIs directly to the developer. This gives you the freedom to use the myriad third-party modules available for the underlying platform.`),rf(),Ra(23,`h4`,8)(24,`span`),gT(25,`Philosophy`),rf()(),Ra(26,`p`),gT(27,`In recent years, thanks to Node.js, JavaScript has become the "lingua franca" of the web for both frontend and backend applications. This has given rise to projects like `),Ra(28,`a`,9),gT(29,`Angular`),rf(),gT(30,`, `),Ra(31,`a`,10),gT(32,`React`),rf(),gT(33,`, and `),Ra(34,`a`,11),gT(35,`Vue`),rf(),gT(36,`, which improve developer productivity and enable the creation of fast, testable, and extensible frontend applications. However, while plenty of excellent libraries, helpers, and tools exist for Node.js (and server-side JavaScript), none of them effectively solves the main problem of `),Ra(37,`strong`),gT(38,`architecture`),rf(),gT(39,`.`),rf(),Ra(40,`p`),gT(41,`Nest provides an out-of-the-box application architecture that lets developers and teams create highly testable, scalable, loosely coupled, and maintainable applications. The architecture is heavily inspired by Angular.`),rf(),Ra(42,`h4`,12)(43,`span`),gT(44,`Installation`),rf()(),Ra(45,`p`),gT(46,`To get started, you can either scaffold the project with the `),Ra(47,`a`,13),gT(48,`Nest CLI`),rf(),gT(49,` or `),Ra(50,`a`,14),gT(51,`clone a starter project`),rf(),gT(52,`. Both produce the same outcome.`),rf(),Ra(53,`p`),gT(54,`To scaffold the project with the Nest CLI, run the following commands. They create a new project directory and populate it with the initial core Nest files and supporting modules, giving your project a conventional base structure. We recommend the `),Ra(55,`strong`),gT(56,`Nest CLI`),rf(),gT(57,` for first-time users, and the `),Ra(58,`a`,15),gT(59,`First steps`),rf(),gT(60,` chapter continues with this approach.`),rf(),Ra(61,`pre`)(62,`code`,16),gT(63,` 1394$ npm i -g @nestjs/cli 1395$ nest new project-name 1396`),rf()(),Ra(64,`h4`,17)(65,`span`),gT(66,`Alternatives`),rf()(),Ra(67,`p`),gT(68,`Alternatively, you can install the TypeScript starter project with `),Ra(69,`strong`),gT(70,`Git`),rf(),gT(71,`:`),rf(),Ra(72,`pre`)(73,`code`,16),gT(74,` 1397$ git clone https://github.com/nestjs/typescript-starter.git project 1398$ cd project 1399$ npm install 1400$ npm run start 1401`),rf()(),Ra(75,`blockquote`,18)(76,`strong`),gT(77,`Hint`),rf(),gT(78,` To clone the repository without its Git history, use `),Ra(79,`a`,19),gT(80,`degit`),rf(),gT(81,`. 1402`),rf(),Ra(82,`p`),gT(83,`Open your browser and navigate to `),Ra(84,`a`,20)(85,`code`),gT(86,`http://localhost:3000/`),rf()(),gT(87,`.`),rf(),Ra(88,`p`),gT(89,`To install the JavaScript flavor of the starter project, use `),Ra(90,`code`),gT(91,`javascript-starter.git`),rf(),gT(92,` in the command sequence above.`),rf(),Ra(93,`p`),gT(94,`You can also start a new project from scratch by installing the core and supporting packages yourself. In that case, you need to set up the project boilerplate files on your own. At a minimum, you need these dependencies: `),Ra(95,`code`),gT(96,`@nestjs/core`),rf(),gT(97,`, `),Ra(98,`code`),gT(99,`@nestjs/common`),rf(),gT(100,`, `),Ra(101,`code`),gT(102,`rxjs`),rf(),gT(103,`, and `),Ra(104,`code`),gT(105,`reflect-metadata`),rf(),gT(106,`. For a walkthrough of creating a complete project this way, see `),Ra(107,`a`,21),gT(108,`5 steps to create a bare minimum NestJS app from scratch`),rf(),gT(109,`.`),rf()(),Ra(110,`a`,22),qa$1(111,`i`,23),Ra(112,`span`),gT(113,`Edit on GitHub`),rf()()())},dependencies:[wt$1,Kc],encapsulation:2})}return o}
1402)();var Xr=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-middlewares`]],features:[Iv],decls:514,vars:60,consts:[[`contentReference`,``],[`appf2a732062097169497d1a222b4643fa806b9deaa`,``],[`appfcfe734c35d61c77548a0aa11dc9701455a1d405`,``],[`appee41cde4601b81c579b87e347e217abb82b3ba7f`,``],[`app9a5d1ca241f4a7607080090c9fea0f5d02f24199`,``],[`app7271415bf42df184fa172b470e648aa21029d7f6`,``],[`appb0a3512de812b55c739bc7c28cb962f8aff29322`,``],[`app2c25bd681400063336408da8045557c839f2572f`,``],[`app837ca0967ed496039c8cf9d012a76fc1f66c18db`,``],[`appcb03a967e3ba2e2b365d4523eb27a4034296a2e7`,``],[1,`content`],[1,`content-inner`],[`id`,`middleware`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/en/4x/api.html#req`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/en/4x/api.html#res`],[`src`,`/assets/Middlewares_1.png`,1,`illustrative-image`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://expressjs.com/en/guide/using-middleware.html`],[1,`external`],[1,`warning`],[`href`,`/http/performance#middleware`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[`appAnchor`,``,`id`,`dependency-injection`],[`appAnchor`,``,`id`,`applying-middleware`],[1,`info`],[`appAnchor`,``,`id`,`route-wildcards`],[`appAnchor`,``,`id`,`middleware-consumer`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/Fluent_interface`],[`href`,`/middleware#multiple-middleware`],[`appAnchor`,``,`id`,`excluding-routes`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/pillarjs/path-to-regexp#parameters`],[`appAnchor`,``,`id`,`functional-middleware`],[`appAnchor`,``,`id`,`multiple-middleware`],[`appAnchor`,``,`id`,`global-middleware`],[`href`,`middleware#functional-middleware`],[`appAnchor`,``,`id`,`error-handling`],[`routerLink`,`/exception-filters`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/middlewares.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Ra(0,`div`,10,0)(2,`div`,11)(3,`h3`,12),gT(4,`Middleware`),rf(),Ra(5,`p`),gT(6,`Middleware is a function that is called `),Ra(7,`strong`),gT(8,`before`),rf(),gT(9,` the route handler. Middleware functions have access to the `),Ra(10,`a`,13),gT(11,`request`),rf(),gT(12,` and `),Ra(13,`a`,14),gT(14,`response`),rf(),gT(15,` objects, and to the `),Ra(16,`code`),gT(17,`next()`),rf(),gT(18,` middleware function in the application's request-response cycle. The `),Ra(19,`strong`),gT(20,`next`),rf(),gT(21,` middleware function is commonly denoted by a variable named `),Ra(22,`code`),gT(23,`next`),rf(),gT(24,`.`),rf(),Ra(25,`figure`),qa$1(26,`img`,15),rf(),Ra(27,`p`),gT(28,`By default, Nest middleware is equivalent to `),Ra(29,`a`,16),gT(30,`Express`),rf(),gT(31,` middleware. The official Express documentation describes the capabilities of middleware as follows:`),rf(),Ra(32,`blockquote`,17),gT(33,` Middleware functions can perform the following tasks: `),Ra(34,`ul`)(35,`li`),gT(36,`execute any code.`),rf(),Ra(37,`li`),gT(38,`make changes to the request and the response objects.`),rf(),Ra(39,`li`),gT(40,`end the request-response cycle.`),rf(),Ra(41,`li`),gT(42,`
1402call the next middleware function in the stack.`),rf(),Ra(43,`li`),gT(44,`if the current middleware function does not end the request-response cycle, it must call `),Ra(45,`code`),gT(46,`next()`),rf(),gT(47,` to pass control to the next middleware function. Otherwise, the request will be left hanging.`),rf()()(),Ra(48,`p`),gT(49,`You implement custom Nest middleware either as a function or as a class with the `),Ra(50,`code`),gT(51,`@Injectable()`),rf(),gT(52,` decorator. A class should implement the `),Ra(53,`code`),gT(54,`NestMiddleware`),rf(),gT(55,` interface, while a function has no special requirements. Let's start by implementing a simple middleware class.`),rf(),Ra(56,`blockquote`,18)(57,`strong`),gT(58,`Warning`),rf(),gT(59,` Express and Fastify handle middleware differently and provide different method signatures. See the `),Ra(60,`a`,19),gT(61,`Performance (Fastify)`),rf(),gT(62,` chapter for details. 1403`),rf(),Ra(63,`app-copy-button`,20)(64,`span`,21),gT(65),TT(66,`extension`),qa$1(67,`app-tabs`,null,1),rf(),Ra(69,`pre`)(70,`code`,22),gT(71,` 1404import { Injectable, NestMiddleware } from '@nestjs/common'; 1405import { Request, Response, NextFunction } from 'express'; 1406 1407@Injectable() 1408export class LoggerMiddleware implements NestMiddleware { 1409 use(req: Request, res: Response, next: NextFunction) { 1410 console.log('Request...'); 1411 next(); 1412 } 1413} 1414`),rf()(),Ra(72,`pre`)(73,`code`,22),gT(74,` 1415import { Injectable } from '@nestjs/common'; 1416 1417@Injectable() 1418export class LoggerMiddleware { 1419 use(req, res, next) { 1420 console.log('Request...'); 1421 next(); 1422 } 1423} 1424`),rf()()(),Ra(75,`h4`,23)(76,`span`),gT(77,`Dependency injection`),rf()(),Ra(78,`p`),gT(79,`Nest middleware fully supports dependency injection. Like providers and controllers, middleware classes can `),Ra(80,`strong`),gT(81,`inject dependencies`),rf(),gT(82,` that are available within the same module. As usual, dependencies are injected through the `),Ra(83,`code`),gT(84,`constructor`),rf(),gT(85,`.`),rf(),Ra(86,`h4`,24)(87,`span`),gT(88,`Applying middleware`),rf()(),Ra(89,`p`),gT(90,`Middleware is not registered in the `),Ra(91,`code`),gT(92,`@Module()`),rf(),gT(93,` decorator. Instead, you set it up in the `),Ra(94,`code`),gT(95,`configure()`),rf(),gT(96,` method of the module class. Modules that include middleware must implement the `),Ra(97,`code`),gT(98,`NestModule`),rf(),gT(99,` interface. Let's set up the `),Ra(100,`code`),gT(101,`LoggerMiddleware`),rf(),gT(102,` at the `),Ra(103,`code`),gT(104,`AppModule`),rf(),gT(105,` level.`),rf(),Ra(106,`app-copy-button`,20)(107,`span`,21),gT(108),TT(109,`extension`),qa$1(110,`app-tabs`,null,2),rf(),Ra(112,`pre`)(113,`code`,22),gT(114,` 1425import { Module, NestModule, MiddlewareConsumer } from '@nestjs/common'; 1426import { LoggerMiddleware } from './common/middleware/logger.middleware.js'; 1427import { CatsModule } from './cats/cats.module.js'; 1428 1429@Module({ 1430 imports: [CatsModule], 1431}) 1432export class AppModule implements NestModule { 1433 configure(consumer: MiddlewareConsumer) { 1434 consumer 1435 .apply(LoggerMiddleware) 1436 .forRoutes('cats'); 1437 } 1438} 1439`),rf()(),Ra(115,`pre`)(116,`code`,22),gT(117,` 1440import { Module } from '@nestjs/common'; 1441import { LoggerMiddleware } from './common/middleware/logger.middleware.js'; 1442import { CatsModule } from './cats/cats.module.js'; 1443 1444@Module({ 1445 imports: [CatsModule], 1446}) 1447export class AppModule { 1448 configure(consumer) { 1449 consumer 1450 .apply(LoggerMiddleware) 1451 .forRoutes('cats'); 1452 } 1453} 1454`),rf()()(),Ra(118,`p`),gT(119,`In the example above, the `),Ra(120,`code`),gT(121,`LoggerMiddleware`),rf(),gT(122,` is applied to the `),Ra(123,`code`),gT(124,`/cats`),rf(),gT(125,` route handlers defined in the `),Ra(126,`code`),gT(127,`CatsController`),rf(),gT(128,`. To restrict middleware to a particular request method, pass an object c
1454ontaining the route `),Ra(129,`code`),gT(130,`path`),rf(),gT(131,` and the request `),Ra(132,`code`),gT(133,`method`),rf(),gT(134,` to the `),Ra(135,`code`),gT(136,`forRoutes()`),rf(),gT(137,` method. The example below imports the `),Ra(138,`code`),gT(139,`RequestMethod`),rf(),gT(140,` enum to reference the desired request method.`),rf(),Ra(141,`app-copy-button`,20)(142,`span`,21),gT(143),TT(144,`extension`),qa$1(145,`app-tabs`,null,3),rf(),Ra(147,`pre`)(148,`code`,22),gT(149,` 1455import { Module, NestModule, RequestMethod, MiddlewareConsumer } from '@nestjs/common'; 1456import { LoggerMiddleware } from './common/middleware/logger.middleware.js'; 1457import { CatsModule } from './cats/cats.module.js'; 1458 1459@Module({ 1460 imports: [CatsModule], 1461}) 1462export class AppModule implements NestModule { 1463 configure(consumer: MiddlewareConsumer) { 1464 consumer 1465 .apply(LoggerMiddleware) 1466 .forRoutes({ path: 'cats', method: RequestMethod.GET }); 1467 } 1468} 1469`),rf()(),Ra(150,`pre`)(151,`code`,22),gT(152,` 1470import { Module, RequestMethod } from '@nestjs/common'; 1471import { LoggerMiddleware } from './common/middleware/logger.middleware.js'; 1472import { CatsModule } from './cats/cats.module.js'; 1473 1474@Module({ 1475 imports: [CatsModule], 1476}) 1477export class AppModule { 1478 configure(consumer) { 1479 consumer 1480 .apply(LoggerMiddleware) 1481 .forRoutes({ path: 'cats', method: RequestMethod.GET }); 1482 } 1483} 1484`),rf()()(),Ra(153,`blockquote`,25)(154,`strong`),gT(155,`Hint`),rf(),gT(156,` The `),Ra(157,`code`),gT(158,`configure()`),rf(),gT(159,` method can be asynchronous. Declare it with `),Ra(160,`code`),gT(161,`async`),rf(),gT(162,` to `),Ra(163,`code`),gT(164,`await`),rf(),gT(165,` the completion of an asynchronous operation inside the method body. 1485`),rf(),Ra(166,`blockquote`,18)(167,`strong`),gT(168,`Warning`),rf(),gT(169,` With the Express adapter, Nest registers the `),Ra(170,`code`),gT(171,`json`),rf(),gT(172,` and `),Ra(173,`code`),gT(174,`urlencoded`),rf(),gT(175,` body parsers (`),Ra(176,`code`),gT(177,`express.json()`),rf(),gT(178,` and `),Ra(179,`code`),gT(180,`express.urlencoded()`),rf(),gT(181,`) by default. To customize these parsers through the `),Ra(182,`code`),gT(183,`MiddlewareConsumer`),rf(),gT(184,`, disable the defaults by setting the `),Ra(185,`code`),gT(186,`bodyParser`),rf(),gT(187,` option to `),Ra(188,`code`),gT(189,`false`),rf(),gT(190,` when creating the application with `),Ra(191,`code`),gT(192,`NestFactory.create()`),rf(),gT(193,`. 1486`),rf(),Ra(194,`h4`,26)(195,`span`),gT(196,`Route wildcards`),rf()(),Ra(197,`p`),gT(198,`Middleware also supports pattern-based routes. For example, the named wildcard (`),Ra(199,`code`),gT(200,`*splat`),rf(),gT(201,`) matches any combination of characters in a route. In the following example, the middleware runs for any route that starts with `),Ra(202,`code`),gT(203,`abcd/`),rf(),gT(2
148604,`, regardless of how many characters follow.`),rf(),Ra(205,`app-copy-button`)(206,`pre`)(207,`code`,22),gT(208,` 1487forRoutes({ 1488 path: 'abcd/*splat', 1489 method: RequestMethod.ALL, 1490}); 1491`),rf()()(),Ra(209,`blockquote`,25)(210,`strong`),gT(211,`Hint`),rf(),Ra(212,`code`),gT(213,`splat`),rf(),gT(214,` is only the name of the wildcard parameter and has no special meaning. You can use any name, e.g., `),Ra(215,`code`),gT(216,`*wildcard`),rf(),gT(217,`. 1492`),rf(),Ra(218,`p`),gT(219,`The `),Ra(220,`code`),gT(221,`'abcd/*splat'`),rf(),gT(222,` route path matches `),Ra(223,`code`),gT(224,`abcd/1`),rf(),gT(225,`, `),Ra(226,`code`),gT(227,`abcd/123`),rf(),gT(228,`, `),Ra(229,`code`),gT(230,`abcd/abc`),rf(),gT(231,`, and so on. String-based paths interpret the hyphen (`),Ra(232,`code`),gT(233,`-`),rf(),gT(234,`) and the dot (`),Ra(235,`code`),gT(236,`.`),rf(),gT(237,`) literally. However, `),Ra(238,`code`),gT(239,`abcd/`),rf(),gT(240,` with no additional characters does not match. To match it as well, wrap the wildcard in braces to make it optional:`),rf(),Ra(241,`app-copy-button`)(242,`pre`)(243,`code`,22),gT(244,` 1493forRoutes({ 1494 path: 'abcd/{*splat}', 1495 method: RequestMethod.ALL, 1496}); 1497`),rf()()(),Ra(245,`h4`,27)(246,`span`),gT(247,`Middleware consumer`),rf()(),Ra(248,`p`),gT(249,`The `),Ra(250,`code`),gT(251,`MiddlewareConsumer`),rf(),gT(252,` is a helper class that provides several built-in methods to manage middleware. All of them can be `),Ra(253,`strong`),gT(254,`chained`),rf(),gT(255,` in the `),Ra(256,`a`,28),gT(257,`fluent style`),rf(),gT(258,`. The `),Ra(259,`code`),gT(260,`forRoutes()`),rf(),gT(261,` method accepts a single string, multiple strings, a `),Ra(262,`code`),gT(263,`RouteInfo`),rf(),gT(264,` object, a controller class, or multiple controller classes. In most cases, you'll pass a comma-separated list of `),Ra(265,`strong`),gT(266,`controllers`),rf(),gT(267,`. Below is an example with a single controller:`),rf(),Ra(268,`app-copy-button`,20)(269,`span`,21),gT(270),TT(271,`extension`),qa$1(272,`app-tabs`,null,4),rf(),Ra(274,`pre`)(275,`code`,22),gT(276,` 1498import { Module, NestModule, MiddlewareConsumer } from '@nestjs/common'; 1499import { LoggerMiddleware } from './common/middleware/logger.middleware.js'; 1500import { CatsModule } from './cats/cats.module.js'; 1501import { CatsController } from './cats/cats.controller.js'; 1502 1503@Module({ 1504 imports: [CatsModule], 1505}) 1506export class AppModule implements NestModule { 1507 configure(consumer: MiddlewareConsumer) { 1508 consumer 1509 .apply(LoggerMiddleware) 1510 .forRoutes(CatsController); 1511 } 1512} 1513`),rf()(),Ra(277,`pre`)(278,`code`,22),gT(279,` 1514import { Module } from '@nestjs/common'; 1515import { LoggerMiddleware } from './common/middleware/logger.middleware.js'; 1516import { CatsModule } from './cats/cats.module.js'; 1517import { CatsController } from './cats/cats.controller.js'; 1518 1519@Module({ 1520 imports: [CatsModule], 1521}) 1522export class AppModule { 1523 configure(consumer) { 1524 consumer 1525 .apply(LoggerMiddleware) 1526 .forRoutes(CatsController); 1527 } 1528} 1529`),rf()()(),Ra(280,`blockquote`,25)(281,`strong`),gT(282,`Hint`),rf(),gT(283,` The `),Ra(284,`code`),gT(285,`apply()`),rf(),gT(286,` method accepts either a single middleware or multiple arguments to specify `),Ra(287,`a`,29),gT(288,`multiple middleware`),rf(),gT(289,`. 1530`),rf(),Ra(290,`h4`,30)(291,`span`),gT(292,`Excluding routes`),rf()(),Ra(293,`p`),gT(294,`To `),Ra(295,`strong`),gT(296,`exclude`),rf(),gT(297,` certain routes from having middleware applied, use the `),Ra(298,`code`),gT(299,`exclude()`),rf(),gT(300,` method. It accepts a single string, multiple strings, or a `),Ra(301,`code`),gT(302,`RouteInfo`),rf(),gT(303,` object that identifies the routes to exclude:`),rf(),Ra(304,`app-copy-button`)(305,`pre`)(306,`code`,22),gT(307,` 1531consumer 1532 .apply(LoggerMiddleware) 1533 .exclude( 1534 { path: 'cats', method: RequestMethod.GET }, 1535 { path: 'cats', method: RequestMethod.POST }, 1536 'cats/{*splat}', 1537 ) 1538 .forRoutes(CatsController); 1539`),rf()()(),Ra(308,`p`),gT(309,`With the example above, `),Ra(310,`code`),gT(311,`LoggerMiddleware`),rf(),gT(312,` is bound to all routes defined inside `),Ra(313,`code`),gT(314,`CatsController`),rf(),Ra(315,`strong`),gT(316,`except`),rf(),gT(317,` those matching the three entr
1539ies passed to the `),Ra(318,`code`),gT(319,`exclude()`),rf(),gT(320,` method.`),rf(),Ra(321,`blockquote`,25)(322,`strong`),gT(323,`Hint`),rf(),gT(324,` The `),Ra(325,`code`),gT(326,`exclude()`),rf(),gT(327,` method supports wildcard parameters using the `),Ra(328,`a`,31),gT(329,`path-to-regexp`),rf(),gT(330,` package. 1540`),rf(),Ra(331,`h4`,32)(332,`span`),gT(333,`Functional middleware`),rf()(),Ra(334,`p`),gT(335,`The `),Ra(336,`code`),gT(337,`LoggerMiddleware`),rf(),gT(338,` class we've been using is minimal: it has no members, no additional methods, and no dependencies. Middleware like this can be defined as a plain function instead of a class. This type of middleware is called `),Ra(339,`strong`),gT(340,`functional middleware`),rf(),gT(341,`. Let's convert the logger middleware from a class into a function to illustrate the difference:`),rf(),Ra(342,`app-copy-button`,20)(343,`span`,21),gT(344),TT(345,`extension`),qa$1(346,`app-tabs`,null,5),rf(),Ra(348,`pre`)(349,`code`,22),gT(350,` 1541import { Request, Response, NextFunction } from 'express'; 1542 1543export function logger(req: Request, res: Response, next: NextFunction) { 1544 console.log('Request...'); 1545 next(); 1546} 1547`),rf()(),Ra(351,`pre`)(352,`code`,22),gT(353,` 1548export function logger(req, res, next) { 1549 console.log('Request...'); 1550 next(); 1551} 1552`),rf()()(),Ra(354,`p`),gT(355,`Then use it within the `),Ra(356,`code`),gT(357,`AppModule`),rf(),gT(358,`:`),rf(),Ra(359,`app-copy-button`,20)(360,`span`,21),gT(361),TT(362,`extension`),qa$1(363,`app-tabs`,null,6),rf(),Ra(365,`pre`)(366,`code`,22),gT(367,` 1553consumer 1554 .apply(logger) 1555 .forRoutes(CatsController); 1556`),rf()()(),Ra(368,`blockquote`,25)(369,`strong`),gT(370,`Hint`),rf(),gT(371,` Consider using `),Ra(372,`strong`),gT(373,`functional middleware`),rf(),gT(374,` whenever your middleware doesn't need any dependencies. 1557`),rf(),Ra(375,`h4`,33)(376,`span`),gT(377,`Multiple middleware`),rf()(),Ra(378,`p`),gT(379,`To bind multiple middleware that execute sequentially, pass a comma-separated list to the `),Ra(380,`code`),gT(381,`apply()`),rf(),gT(382,` method:`),rf(),Ra(383,`app-copy-button`)(384,`pre`)(385,`code`,22),gT(386,` 1558consumer.apply(cors(), helmet(), logger).forRoutes(CatsController); 1559`),rf()()(),Ra(387,`h4`,34)(388,`span`),gT(389,`Global middleware`),rf()(),Ra(390,`p`),gT(391,`To bind middleware to every registered route at once, use the `),Ra(392,`code`),gT(393,`use()`),rf(),gT(394,` method of the `),Ra(395,`code`),gT(396,`INestApplication`),rf(),gT(397,` instance:`),rf(),Ra(398,`app-copy-button`,20)(399,`span`,21),gT(400),TT(401,`extension`),qa$1(402,`app-tabs`,null,7),rf(),Ra(404,`pre`)(405,`code`,22),gT(406,` 1560const app = await NestFactory.create(AppModule); 1561app.use(logger); 1562await app.listen(process.env.PORT ?? 3000); 1563`),rf()()(),Ra(407,`blockquote`,25)(408,`strong`),gT(409,`Hint`),rf(),gT(410,` Global middleware registered with `),Ra(411,`code`),gT(412,`app.use()`),rf(),gT(413,` cannot access the DI container, so use `),Ra(414,`a`,35),gT(415,`functional middleware`),rf(),gT(416,` there. Alternatively, use a class middleware and bind it with `),Ra(417,`code`),gT(418,`.forRoutes('*')`),rf(),gT(419,` within the `),Ra(420,`code`),gT(421,`AppModule`),rf(),gT(422,` (or any other module). 1564`),rf(),Ra(423,`h4`,36)(424,`span`),gT(425,`Error handling`),rf()(),Ra(426,`p`),gT(427,`When middleware throws an exception, Nest's `),Ra(428,`a`,37),gT(429,`exceptions layer`),rf(),gT(430,` catches it and sends an appropriate response, just as it does for exceptions thrown from a route handler. The recommended approach is to throw an `),Ra(431,`code`),gT(432,`HttpException`),rf(),gT(433,` (or a built-in subclass such as `),Ra(434,`code`),gT(435,`UnauthorizedException`),rf(),gT(436,`):`),rf(),Ra(437,`app-copy-button`,20)(438,`span`,21),gT(439),TT(440,`extension`),qa$1(441,`app-tabs`,null,8),rf(),Ra(443,`pre`)(444,`code`,22),gT(445,` 1565import { 1566 Injectable, 1567 NestMiddleware, 1568 UnauthorizedException, 1569} from '@nestjs/common'; 1570import { Request, Response, NextFunction } from 'express'; 1571 1572@Injectable() 1573export class AuthMiddleware implements NestMiddleware { 1574 use(req: Request, res: Response, next: NextFunction) { 1575 if (!req.headers.authorization) { 1576 throw new UnauthorizedException(); 1577 } 1578 next(); 1579 } 1580} 1581`),rf()(),Ra(446,`pre`)(447,`code`,22),gT(448,` 1582import { Injectable, UnauthorizedException } from '@nestjs/common'; 1583 1584@Injectable() 1585export class AuthMiddleware { 1586 use(req, res, next) { 1587 if (!req.headers.authorization) { 1588 throw new UnauthorizedException(); 1589 } 1590 next(); 1591 } 1592} 1593`),rf()()(),Ra(449,`p`),gT(450,`If the middleware is asynchronous, declare `),Ra(451,`code`),gT(452,`use()`),rf(),gT(453,` as `),Ra(454,`code`),gT(455,`async`),rf(),gT(456,` (or return a `),Ra(457,`code`),gT(458,`Promise`),rf(),gT(459,`) so that a rejected promise is forwarded to the exceptions layer:`),rf(),Ra(460,`app-copy-button`,20)(461,`span`,21),gT
1593(462),TT(463,`extension`),qa$1(464,`app-tabs`,null,9),rf(),Ra(466,`pre`)(467,`code`,22),gT(468,` 1594@Injectable() 1595export class AuthMiddleware implements NestMiddleware { 1596 constructor(private readonly authService: AuthService) {} 1597 1598 async use(req: Request, res: Response, next: NextFunction) { 1599 const user = await this.authService.verify(req.headers.authorization); 1600 if (!user) { 1601 throw new UnauthorizedException(); 1602 } 1603 req['user'] = user; 1604 next(); 1605 } 1606} 1607`),rf()()(),Ra(469,`p`),gT(470,`You can also pass the error to `),Ra(471,`code`),gT(472,`next()`),rf(),gT(473,`. This is useful when wrapping existing Express-style middleware that reports failures through the callback:`),rf(),Ra(474,`app-copy-button`)(475,`pre`)(476,`code`,22),gT(477,` 1608use(req: Request, res: Response, next: NextFunction) { 1609 if (!req.headers.authorization) { 1610 return next(new UnauthorizedException()); 1611 } 1612 next(); 1613} 1614`),rf()()(),Ra(478,`blockquote`,18)(479,`strong`),gT(480,`Warning`),rf(),gT(481,` Because middleware runs before a route handler is selected, only `),Ra(482,`strong`),gT(483,`global`),rf(),gT(484,` exception filters (registered with `),Ra(485,`code`),gT(486,`app.useGlobalFilters()`),rf(),gT(487,` or the `),Ra(488,`code`),gT(489,`APP_FILTER`),rf(),gT(490,` token) catch exceptions thrown from middleware. Method-scoped and controller-scoped filters are not invoked, and binding filters to a middleware class with `),Ra(491,`code`),gT(492,`@UseFilters()`),rf(),gT(493,` is not supported. 1615`),rf(),Ra(494,`blockquote`,25)(495,`strong`),gT(496,`Hint`),rf(),gT(497,` Middleware registered with `),Ra(498,`code`),gT(499,`app.use()`),rf(),gT(500,` is handled by the underlying HTTP platform (Express or Fastify), not by Nest's `),Ra(501,`code`),gT(502,`MiddlewareModule`),rf(),gT(503,`. Prefer throwing errors (or calling `),Ra(504,`code`),gT(505,`next(err)`),rf(),gT(506,`) from middleware bound with the `),Ra(507,`code`),gT(508,`MiddlewareConsumer`),rf(),gT(509,`, so that the exceptions layer can process them. 1616`),rf()(),Ra(510,`a`,38),qa$1(511,`i`,39),Ra(512,`span`),gT(513,`Edit on GitHub`),rf()()()),a&2){let l=qS(68),d=qS(111),m=qS(146),h=qS(273),u=qS(347),b=qS(364),S=qS(403),k=qS(442),C=qS(465);LC(65),uf(` `,MT(66,33,`logger.middleware`,l.isJsActive),` 1617`),LC(4),kv(`hide`,l.isJsActive),LC(3),kv(`hide`,!l.isJsActive),LC(36),uf(` `,MT(109,36,`app.module`,d.isJsActive),` 1618`),LC(4),kv(`hide`,d.isJsActive),LC(3),kv(`hide`,!d.isJsActive),LC(28),uf(` `,MT(144,39,`app.module`,m.isJsActive),` 1619`),LC(4),kv(`hide`,m.isJsActive),LC(3),kv(`hide`,!m.isJsActive),LC(120),uf(` `,MT(271,42,`app.module`,h.isJsActive),` 1620`),LC(4),kv(`hide`,h.isJsActive),LC(3),kv(`hide`,!h.isJsActive),LC(67),uf(` `,MT(345,45,`logger.middleware`,u.isJsActive),` 1621`),LC(4),kv(`hide`,u.isJsActive),LC(3),kv(`hide`,!u.isJsActive),LC(10),uf(` `,MT(362,48,`app.module`,b.isJsActive),` 1622`),LC(39),uf(` `,MT(401,51,`main`,S.isJsActive),` 1623`),LC(39),uf(` `,MT(440,54,`auth.middleware`,k.isJsActive),` 1624`),LC(4),kv(`hide`,k.isJsActive),LC(3),kv(`hide`,!k.isJsActive),LC(16),uf(` `,MT(463,57,`auth.middleware`,C.isJsActive),` 1625`)}},dependencies:[Kc,en$1,u,wt$1,g],encapsulation:2,changeDetection:1})}return o})();var Zr=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-migration`]],features:[Iv],decls:1099,vars:2,consts:[[`contentReference`,``],[1,`content`],[1,`content-inner`],[`id`,`migration-guide`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://standardschema.dev/`],[`routerLink`,`/observability/overview`],[`appAnchor`,``,`id`,`upgrading-packages`],[1,`language-bash`],[`href`,`/cli/usages#nest-upgrade`],[1,`info`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://npmjs.com/package/npm-check-updates`],[`appAnchor`,``,`id`,`nodejs-requirements`],[1,`language-text`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://docs.aws.amazon.com/lambda/latest/dg/lambda-nodejs.html#nodejs-experimental`],[`appAnchor`,``,`id`,`esm-packages`],[`href`,`#switching-your-project-to-esm`],[`href`,`#moving-your-own-code-to-esm`],[`appAnchor`,``,`id`,`new-project-defaults`],[`appAnchor`,``,`id`,`testing-stack`],[1,`warning`],[`appAnchor`,``,`id`,`linting-defaults`],[`appAnchor`,``,`id`,`route-decorator-schemas`],[1,`language-typescript`],[`href`,`/openapi/introduction#standard-schema-zod-valibot`],[`appAnchor`,``,`id`,`standard-schema-serialization`],[`appAnchor`,``,`id`,`graphql-ide-configuration`],[`appAnchor`,``,`id`,`graphql-subscriptions-transport`],[`appAnchor`,``,`id`,`nats-v3`],[`appAnchor`,``,`id`,`lifecycle-hook-ordering`],[`appAnchor`,``,`id`,`optional-is-no-longer-inherited`],[`appAnchor`,``,`id`,`class-validator-and-class-transformer`],[`appAnchor`,``,`id`,`config-module`],[`href`,`/application/configuration#schema-validation`],[`appAnchor`,``,`id`,`terminus-module`],[`href`,`/recipes/terminus#timeouts-and-caching`],[`appAnchor`,``,`id`,`webpack-deprecation-in-cli-workflows`],[`appAnchor`,``,`id`,`new-cli-commands-and-flags`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://mau.nestjs.com/`],[`appAnchor`,``,`id`,`route-conflict-diagnostics`],[`href`,`/controllers#route-conflicts-and-resolution-order`],[`appAnchor`,``,`id`,`machine-readable-error-codes`],[`href`,`/exception-filters#machine-readable-error-codes`],[`appAnchor`,``,`id`,`structured-logging-params`],[`href`,`/application/logger#structured-logging-params`],[`appAnchor`,``,`id`,`native-observability-support`],[`href`,`/observability/overview`],[`routerLink`,`/observability/sdk`],[`appAnchor`,``,`id`,`other-notable-release-changes`],[`href`,`/microservices/grpc#exception-handling`],[`href`,`/microservices/kafka#regular-expression-patterns`],[`href`,`/websockets/gateways#request-scoped-gateways`],[`appAnchor`,``,`id`,`switching-your-project-to-e
1625sm`],[1,`language-json`],[`appAnchor`,``,`id`,`moving-your-own-code-to-esm`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/migration.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Ra(0,`div`,1,0)(2,`div`,2)(3,`h3`,3),gT(4,`Migration guide`),rf(),Ra(5,`p`),gT(6,`This article walks you through migrating from NestJS version 11 to version 12. Version 12 centers on ESM packages, updated CLI defaults, first-class support for `),Ra(7,`a`,4),gT(8,`Standard Schema`),rf(),gT(9,`-based validation and serialization, and native `),Ra(10,`a`,5),gT(11,`observability`),rf(),gT(12,` support.`),rf(),Ra(13,`h4`,6)(14,`span`),gT(15,`Upgrading packages`),rf()(),Ra(16,`p`),gT(17,`Start by upgrading the Nest CLI itself, because the upgrade command used below ships with it:`),rf(),Ra(18,`pre`)(19,`code`,7),gT(20,` 1626$ npm i -g @nestjs/cli@latest @nestjs/schematics@latest 1627`),rf()(),Ra(21,`p`),gT(22,`If your project keeps the CLI as a local dev dependency, update it there as well:`),rf(),Ra(23,`pre`)(24,`code`,7),gT(25,` 1628$ npm i -D @nestjs/cli@latest @nestjs/schematics@latest 1629`),rf()(),Ra(26,`p`),gT(27,`With the latest CLI in place, run `),Ra(28,`code`),gT(29,`nest upgrade`),rf(),gT(30,` from the root of your project:`),rf(),Ra(31,`pre`)(32,`code`,7),gT(33,` 1630$ nest upgrade 1631`),rf()(),Ra(34,`p`),gT(35,`The command moves every recognized `),Ra(36,`code`),gT(37,`@nestjs/*`),rf(),gT(38,` package to its v12-compatible major at once, so the framework, platform adapters, and companion packages stay in sync, and then installs them. It also bumps TypeScript to v6 and applies the mechanical parts of the migration described in this guide (`),Ra(39,`code`),gT(40,`nest-cli.json`),rf(),gT(41,` webpack options, the GraphQL `),Ra(42,`code`),gT(43,`playground`),rf(),gT(44,` and subscriptions transport changes, the NATS package swap, and `),Ra(45,`code`),gT(46,`@nestjs/config`),rf(),gT(47,` validation options). Finally, it prints a report of everything it changed, plus notes on the behavioral changes it can't migrate for you. To see that report without touching your files, run the command with `),Ra(48,`code`),gT(49,`--dry-run`),rf(),gT(50,` first. See `),Ra(51,`a`,8),gT(52,`nest upgrade`),rf(),gT(53,` for the full list of steps and options.`),rf(),Ra(54,`blockquote`,9)(55,`strong`),gT(56,`Hint`),rf(),Ra(57,`code`),gT(58,`nest upgrade`),rf(),gT(59,` replaces the manual `),Ra(60,`a`,10),gT(61,`npm-check-updates (ncu)`),rf(),gT(62,` flow previously recommended here. You can still upgrade packages manually if you prefer; what matters is that every Nest package moves to the same major at once. The command only bumps the CLI dependency inside your project, which is why you upgrade the global binary first. 1632`),rf(),Ra(63,`h4`,11)(64,`span`),gT(65,`Node.js requirements`),rf()(),Ra(66,`p`),gT(67,`The Node.js requirement differs depending on whether you are `),Ra(68,`strong`),gT(69,`running`),rf(),gT(70,` an application or `),Ra(71,`strong`),gT(72,`generating`),rf(),gT(73,` code with the CLI:`),rf(),Ra(74,`table`)(75,`thead`)(76,`tr`)(77,`th`),gT(78,`What you are doing`),rf(),Ra(79,`th`),gT(80,`Minimum Node.js`),rf()()(),Ra(81,`tbody`)(82,`tr`)(83,`td`),gT(84,`Running a Nest 12 application`),rf(),Ra(85,`td`)(86,`strong`),gT(87,`v20.19+`),rf(),gT(88,`, or `),Ra(89,`strong`),gT(90,`v22.12+`),rf(),gT(91,` on the 22.x line`),rf()(),Ra(92,`tr`)(93,`td`)(94,`code`),gT(95,`nest new`),rf(),gT(96,`, `),Ra(97,`code`),gT(98,`nest generate`),rf(),gT(99,`, `),Ra(100,`code`),gT(101,`nest upgrade`),rf(),gT(102,` (`),Ra(103,`code`),gT(104,`@nestjs/schematics`),rf(),gT(105,`)`),rf(),Ra(106,`td`)(107,`strong`),gT(108,`v22.22.3+`),rf(),gT(109,`, `),Ra(110,`strong`),gT(111,`v24.15+`),rf(),gT(112,`, or `),Ra(113,`strong`),gT(114,`v26+`),rf()()()()(),Ra(115,`p`)(116,`code`),gT(117,`@nestjs/core`),rf(),gT(118,` itself still declares `),Ra(119,`code`),gT(120,`>= 20`),rf(),gT(121,`, but the v12 packages are ESM-only, and consuming them from a CommonJS application relies on `),Ra(122,`code`),gT(123,`require(esm)`),rf(),gT(124,`, which is unflagged only from Node.js 20.19 and 22.12 onwards. The 21.x line never received it and is not supported. `),Ra(125,`code`),gT(126,`nest upgrade`),rf(),gT(127,` enforces exactly this and refuses to run on an older release.`),rf(),Ra(128,`p`),gT(129,`AWS Lambda disables `),Ra(130,`code`),gT(131,`require(esm)`),rf(),gT(132,` by default on its Node.js 20, 22, and 24 runtimes, even when the corresponding upstream Node.js release enables it. To run a CommonJS Nest 12 application on these Lambda runtimes, enable it through the function's `),Ra(133,`code`),gT(134,`NODE_OPTIONS`),rf(),gT(135,` environment variable:`),rf(),Ra(136,`pre`)(137,`code`,12),gT(138,` 1633NODE_OPTIONS=--experimental-require-module 1634`),rf()(),Ra(139,`p`),gT(140,`If `),Ra(141,`code`),gT(142,`NODE_OPTIONS`),rf(),gT(143,` already contains other flags, append this flag to the existing value. See the `),Ra(144,`a`,13),gT(145,`AWS Lambda documentation`),rf(),gT(146,` for details and for the support limitations of experimental features.`),rf(),Ra(147,`p`),gT(148,`The CLI's schematics have a higher floor of their own: `),Ra(149,`code`),gT(150,`@nestjs/schematics`),rf(),gT(151,` requires `),Ra(152,`strong`),gT(153,`Node.js v22.22.3+, v24.15+, or v26+`),rf(),gT(154,`, inherited from the Angular devkit it builds on. Scaffolding and upgrading therefore need a newer runtime than running the framework does. The 23.x and 25.x lines, as well as earlier 22.x and 24.x releases, are excluded.`),rf(),Ra(1
163455,`blockquote`,9)(156,`strong`),gT(157,`Hint`),rf(),gT(158,` The simplest way to satisfy every requirement is to run the latest active LTS release. Pick the bare minimum only if you have a specific reason to stay there. If you do, keep in mind that Node.js 20.19 is enough to run your application, but not to use the CLI's generators. 1635`),rf(),Ra(159,`h4`,14)(160,`span`),gT(161,`ESM packages`),rf()(),Ra(162,`p`),gT(163,`All core Nest packages now ship as ESM. For most existing applications, this is much less disruptive than it would have been a few years ago, because modern Node.js releases support `),Ra(164,`code`),gT(165,`require(esm)`),rf(),gT(166,`.`),rf(),Ra(167,`blockquote`,9)(168,`strong`),gT(169,`Hint`),rf(),gT(170,` Migrating `),Ra(171,`strong`),gT(172,`your own`),rf(),gT(173,` application to ESM is entirely optional and `),Ra(174,`strong`),gT(175,`not`),rf(),gT(176,` part of upgrading to v12. Because Nest's ESM packages can be consumed from CommonJS through `),Ra(177,`code`),gT(178,`require(esm)`),rf(),gT(179,`, a CommonJS application can upgrade to v12 and stay CommonJS for as long as you like; `),Ra(180,`code`),gT(181,`nest upgrade`),rf(),gT(182,` deliberately leaves your module format alone. Whether you switch is a matter of preference. If you decide to, the last two sections of this guide, `),Ra(183,`a`,15),gT(184,`Switching your project to ESM`),rf(),gT(185,` and `),Ra(186,`a`,16),gT(187,`Moving your own code to ESM`),rf(),gT(188,`, walk you through it. 1636`),rf(),Ra(189,`p`),gT(190,`In practice, this means:`),rf(),Ra(191,`ul`)(192,`li`),gT(193,`Many existing CommonJS applications continue to work without a full rewrite`),rf(),Ra(194,`li`),gT(195,`Review custom bootstrapping scripts, build tooling, and test runners if they make assumptions about CommonJS-only packages`),rf(),Ra(196,`li`),gT(197,`If you maintain a custom bundler or runtime configuration, make sure it matches the module format your project actually uses`),rf()(),Ra(198,`p`),gT(199,`For new projects, the CLI now lets you choose between a CommonJS and an ESM project layout.`),rf(),Ra(200,`h4`,17)(201,`span`),gT(202,`New project defaults`),rf()(),Ra(203,`p`)(204,`code`),gT(205,`nest new`),rf(),gT(2
163606,` now prompts you to choose whether to generate a CommonJS or an ESM project.`),rf(),Ra(207,`ul`)(208,`li`),gT(209,`ESM projects use Vitest by default (CommonJS projects use Jest)`),rf(),Ra(210,`li`),gT(211,`All generated projects use oxlint by default`),rf()(),Ra(212,`p`),gT(213,`This only changes what the CLI scaffolds for you. Existing projects can keep their current tooling and migrate on their own schedule.`),rf(),Ra(214,`h4`,18)(215,`span`),gT(216,`Testing stack`),rf()(),Ra(217,`p`),gT(218,`Nest's testing utilities remain the same. The main change is the default stack used by generated ESM projects and by the framework's own repositories and samples: Vitest is now the primary default for ESM workflows.`),rf(),Ra(219,`p`),gT(220,`If your application already uses a different test runner, you don't need to migrate immediately. `),Ra(221,`code`),gT(222,`@nestjs/testing`),rf(),gT(223,` remains test-runner agnostic.`),rf(),Ra(224,`blockquote`,19)(225,`strong`),gT(226,`Warning`),rf(),gT(227,` If you stay on Jest, note that it can load the ESM-only v12 packages only on Node.js v24.9 or later (older versions fail with `),Ra(228,`code`),gT(229,`ERR_REQUIRE_ASYNC_MODULE`),rf(),gT(230,`). Run your test suite on Node.js v24.9+, or consider migrating to Vitest. `),Ra(231,`code`),gT(232,`nest upgrade`),rf(),gT(233,` bumps Jest to v30 and warns about this. 1637`),rf(),Ra(234,`p`),gT(235,`When you do decide to migrate:`),rf(),Ra(236,`ul`)(237,`li`),gT(238,`Update your `),Ra(239,`code`),gT(240,`test`),rf(),gT(241,`, `),Ra(242,`code`),gT(243,`test:watch`),rf(),gT(244,`, `),Ra(245,`code`),gT(246,`test:cov`),rf(),gT(247,`, and `),Ra(248,`code`),gT(249,`test:e2e`),rf(),gT(250,` scripts`),rf(),Ra(251,`li`),gT(252,`Review any runner-specific globals and replace them with Vitest equivalents where needed`),rf(),Ra(253,`li`),gT(254,`Check your `),Ra(255,`code`),gT(256,`supertest`),rf(),gT(257,` imports in E2E tests if your Vitest setup expects default imports`),rf()(),Ra(258,`h4`,20)(259,`span`),gT(260,`Linting defaults`),rf()(),Ra(261,`p`),gT(262,`Newly generated projects use oxlint by default. You only need to migrate if you want your repository to match the new CLI scaffolding.`),rf(),Ra(263,`h4`,21)(264,`span`),gT(265,`Route decorator schemas`),rf()(),Ra(266,`p`),gT(267,`Nest adds a new `),Ra(268,`code`),gT(269,`schema`),rf(),gT(270,` option to route parameter decorators such as `),Ra(271,`code`),gT(272,`@Body()`),rf(),gT(273,`, `),Ra(274,`code`),gT(275,`@Query()`),rf(),gT(276,`, `),Ra(277,`code`),gT(278,`@Param()`),rf(),gT(279,`, and `),Ra(280,`code`),gT(281,`@RawBody()`),rf(),gT(282,`. The schema metadata is designed for `),Ra(283,`a`,4),gT(284,`Standard Schema`),rf(),gT(285,`-compatible libraries such as Zod, Valibot, and ArkType.`),rf(),Ra(286,`p`),gT(287,`For example:`),rf(),Ra(288,`app-copy-button`)(289,`pre`)(290,`code`,22),gT(291,` 1638@Post() 1639create(@Body({ schema: createUserSchema }) body: CreateUserDto) { 1640 return this.usersService.create(body); 1641} 1642 1643@Get(':id') 1644findOne(@Param('id', { schema: z.coerce.number().int().positive() }) id: number) { 1645 return this.usersService.findOne(id); 1646} 1647`),rf()()(),Ra(292,`p`),gT(293,`On its own, the decorator only attaches schema metadata. To validate against it, register the built-in `),Ra(294,`code`),gT(295,`StandardSchemaValidationPipe`),rf(),gT(296,`:`),rf(),Ra(297,`app-copy-button`)(298,`pre`)(299,`code`,22),gT(300,` 1648app.useGlobalPipes(new StandardSchemaValidationPipe()); 1649`),rf()()(),Ra(301,`p`),gT(302,`This is a schema-first alternative to the traditional `),Ra(303,`code`),gT(304,`ValidationPipe`),rf(),gT(305,` plus `),Ra(306,`code`),gT(307,`class-validator`),rf(),gT(308,` flow. The same schemas can also feed OpenAPI generation (see `),Ra(309,`a`,23),gT(310,`Standard Schema (Zod, Valibot)`),rf(),gT(311,`).`),rf(),Ra(312,`p`),gT(313,`The existing decorator-based approach remains fully supported, and there are no plans to remove it. The `),Ra(314,`code`),gT(315,`schema`),rf(),gT(316,` option is an additional choice for teams that prefer schema-first libraries such as Zod.`),rf(),Ra(317,`h4`,24)(318,`span`),gT(319,`Standard Schema serialization`),rf()(),Ra(320,`p`),gT(321,`Nest also introduces `),Ra(322,`co
1649de`),gT(323,`StandardSchemaSerializerInterceptor`),rf(),gT(324,`, which validates and transforms outgoing responses with the same Standard Schema ecosystem.`),rf(),Ra(325,`app-copy-button`)(326,`pre`)(327,`code`,22),gT(328,` 1650@UseInterceptors(StandardSchemaSerializerInterceptor) 1651@SerializeOptions({ schema: userResponseSchema }) 1652@Get(':id') 1653findOne(@Param('id') id: string) { 1654 return this.usersService.findOne(id); 1655} 1656`),rf()()(),Ra(329,`p`),gT(330,`Use it when you want a schema, instead of `),Ra(331,`code`),gT(332,`class-transformer`),rf(),gT(333,` decorators, to drive response shaping.`),rf(),Ra(334,`h4`,25)(335,`span`),gT(336,`GraphQL IDE configuration`),rf()(),Ra(337,`p`),gT(338,`GraphiQL is now the default GraphQL IDE. If you need to customize it, pass a `),Ra(339,`code`),gT(340,`graphiql`),rf(),gT(341,` options object instead of setting `),Ra(342,`code`),gT(343,`graphiql: true`),rf(),gT(344,`.`),rf(),Ra(345,`app-copy-button`)(346,`pre`)(347,`code`,22),gT(348,` 1657GraphQLModule.forRoot<ApolloDriverConfig>({ 1658 driver: ApolloDriver, 1659 graphiql: { 1660 url: '/graphql', 1661 headers: { 1662 authorization: 'Bearer <token>', 1663 }, 1664 shouldPersistHeaders: true, 1665 isHeadersEditorEnabled: true, 1666 }, 1667}); 1668`),rf()()(),Ra(349,`p`),gT(350,`This customizes the IDE endpoint and editor behavior while keeping GraphiQL enabled.`),rf(),Ra(351,`h4`,26)(352,`span`),gT(353,`GraphQL subscriptions transport`),rf()(),Ra(354,`p`),gT(355,`The latest `),Ra(356,`code`),gT(357,`@nestjs/graphql`),rf(),gT(358,` release removes support for `),Ra(359,`code`),gT(360,`subscriptions-transport-ws`),rf(),gT(361,`. Use `),Ra(362,`code`),gT(363,`graphql-ws`),rf(),gT(364,` for GraphQL subscriptions instead.`),rf(),Ra(365,`app-copy-button`)(366,`pre`)(367,`code`,22),gT(368,` 1669GraphQLModule.forRoot<ApolloDriverConfig>({ 1670 driver: ApolloDriver, 1671 subscriptions: { 1672 'graphql-ws': true, 1673 }, 1674}); 1675`),rf()()(),Ra(369,`p`),gT(370,`If your application still depends on `),Ra(371,`code`),gT(372,`subscriptions-transport-ws`),rf(),gT(373,`, plan that migration as part of your GraphQL package upgrade.`),rf(),Ra(374,`h4`,27)(375,`span`),gT(376,`NATS v3`),rf()(),Ra(377,`p`),gT(378,`The microservices package now targets NATS v3, which includes a breaking dependency change. If you use the NATS transport, replace the old `),Ra(379,`code`),gT(380,`nats`),rf(),gT(381,` package with `),Ra(382,`code`),gT(383,`@nats-io/transport-node`),rf(),gT(384,`:`),rf(),Ra(385,`pre`)(386,`code`,7),gT(387,` 1676$ npm uninstall nats 1677$ npm install @nats-io/transport-node 1678`),rf()(),Ra(388,`p`),gT(389,`If your application imports NATS helpers directly, install `),Ra(390,`code`),gT(391,`@nats-io/nats-core`),rf(),gT(392,` as well and update those imports. NATS v3 also dropped the `),Ra(393,`code`),gT(394,`StringCodec`),rf(),gT(395,` and `),Ra(396,`code`),gT(397,`JSONCodec`),rf(),gT(398,` helpers. For example, the `),Ra(399,`code`),gT(400,`headers()`),rf(),gT(401,` helper now comes from `),Ra(402,`code`),gT(403,`@nats-io/nats-core`),rf(),gT(404,`:`),rf(),Ra(405,`app-copy-button`)(406,`pre`)(407,`code`,22),gT(408,` 1679import * as nats from '@nats-io/nats-core'; 1680import { NatsRecordBuilder } from '@nestjs/microservices'; 1681 1682const headers = nats.headers(); 1683headers.set('x-version', '1.0.0'); 1684 1685const record = new NatsRecordBuilder(payload).setHeaders(headers).build(); 1686return this.client.send('record-builder-duplex', record); 1687`),rf()()(),Ra(409,`p`),gT(410,`Also review any custom serializers or deserializers. Nest now serializes NATS packets as JSON strings, and custom NATS deserializers receive the full NATS message object instead of a raw `),Ra(411,`code`),gT(412,`Uint8Array`),rf(),gT(413,`. In practice, custom deserializers should read the payload with `),Ra(414,`code`),gT(415,`msg.json()`),rf(),gT(416,` instead of decoding bytes manually.`),rf(),Ra(417,`h4`,28)(418,`span`),gT(419,`Lifecycle hook ordering`),rf()(),Ra(420,`p`),gT(421,`Lifecycle hooks are now called by component hierarchy level. This can change the execution order of hooks such as `),Ra(422,`code`),gT(423,`onModuleInit`),rf(),gT(424,`, `),Ra(425,`code`),gT(426,`onApplicationBootstrap`),rf(),gT(427,`, and the shutdown hooks when multiple providers or modules depend on one another.`),rf(),Ra(428,`p`),gT(429,`If your application relies on a
1687specific hook order between related providers, review that flow during the upgrade and update any assumptions in initialization logic, teardown logic, or tests.`),rf(),Ra(430,`h4`,29)(431,`span`)(432,`code`),gT(433,`@Optional()`),rf(),gT(434,` is no longer inherited`),rf()(),Ra(435,`p`),gT(436,`Nest now reads the optional markers of constructor parameters with `),Ra(437,`code`),gT(438,`Reflect.getOwnMetadata`),rf(),gT(439,`, so a subclass no longer inherits the markers its parent declared. Parameter types are still inherited. As a result, a subclass without its own constructor keeps its parent's parameters but loses their optional status, and Nest throws `),Ra(440,`code`),gT(441,`UnknownDependenciesException`),rf(),gT(442,` where v11 resolved the parameter as `),Ra(443,`code`),gT(444,`undefined`),rf(),gT(445,`.`),rf(),Ra(446,`p`),gT(447,`This is deliberate: a dependency that was genuinely missing used to resolve to `),Ra(448,`code`),gT(449,`undefined`),rf(),gT(450,` silently. Give the subclass its own constructor and declare the marker again:`),rf(),Ra(451,`app-copy-button`)(452,`pre`)(453,`code`,22),gT(454,` 1688@Injectable() 1689class Child extends Base { 1690 constructor(@Optional() options?: Options) { 1691 super(options); 1692 } 1693} 1694`),rf()()(),Ra(455,`h4`,30)(456,`span`),gT(457,`class-validator and class-transformer`),rf()(),Ra(458,`p`),gT(459,`The existing decorator-based workflow still works in v12. `),Ra(460,`code`),gT(461,`ValidationPipe`),rf(),gT(462,` and `),Ra(463,`code`),gT(464,`ClassSerializerInterceptor`),rf(),gT(465,` remain supported and are still a good fit for class-based DTO projects.`),rf(),Ra(466,`p`),gT(467,`Version 12 broadens the built-in options rather than replacing the existing ones:`),rf(),Ra(468,`ul`)(469,`li`),gT(470,`Use `),Ra(471,`code`),gT(472,`ValidationPipe`),rf(),gT(473,` when your DTOs are class-based and rely on decorators`),rf(),Ra(474,`li`),gT(475,`Use `),Ra(476,`code`),gT(477,`StandardSchemaValidationPipe`),rf(),gT(478,` when your validation library already exposes a Standard Schema-compatible schema`),rf(),Ra(479,`li`),gT(480,`Use `),Ra(481,`code`),gT(482,`ClassSerializerInterceptor`),rf(),gT(483,` when your response shaping is based on `),Ra(484,`code`),gT(485,`class-transformer`),rf()(),Ra(486,`li`),gT(487,`Use `),Ra(488,`code`),gT(489,`StandardSchemaSerializerInterceptor`),rf(),gT(490,` when your response shape should be derived from a schema`),rf()(),Ra(491,`h4`,31)(492,`span`),gT(493,`Config module`),rf()(),Ra(494,`p`)(495,`code`),gT(496,`@nestjs/config`),rf(),gT(497,` moves from Joi-specific validation to `),Ra(498,`a`,4),gT(499,`Standard Schema`),rf(),gT(500,`. The `),Ra(501,`code`),gT(502,`validationSchema`),rf(),gT(503,` option now accepts any Standard Schema-compatible schema, such as Zod, Valibot, or ArkType.`),rf(),Ra(504,`app-copy-button`)(505,`pre`)(506,`code`,22),gT(507,` 1695import { z } from 'zod'; 1696 1697ConfigModule.forRoot({ 1698 validationSchema: z.object({ 1699 NODE_ENV: z 1700 .enum(['development', 'production', 'test', 'provision']) 1701 .default('development'), 1702 PORT: z.coerce.number().default(3000), 1703 }), 1704}); 1705`),rf()()(),Ra(508,`p`),gT(509,`Because validation is no longer tied to a single library, we now recommend a modern Standard Schema library such as Zod for new projects, and the `),Ra(510,`a`,32),gT(511,`Configuration chapter`),rf(),gT(512,` has been rewritten around it.`),rf(),Ra(513,`p`),gT(514,`Your existing Joi schemas still work, with two caveats:`),rf(),Ra(515,`ul`)(516,`li`),gT(517,`You must upgrade to `),Ra(518,`strong`),gT(519,`Joi v18 or later`),rf(),gT(520,`, which implements the Standard Schema specification`),rf(),Ra(521,`li`),gT(522,`Library-specific settings previously passed directly under `),Ra(523,`code`),gT(524,`validationOptions`),rf(),gT(525,` now go under `),Ra(526,`code`),gT(527,`validationOptions.libraryOptions`),rf()()(),Ra(528,`app-copy-button`)(529,`pre`)(530,`code`,22),gT(531,` 1706// Before 1707validationOptions: { 1708 allowUnknown: false, 1709 abortEarly: true, 1710}, 1711 1712// After 1713validationOptions: { 1714 libraryOptions: { 1715 allowUnknown: false, 1716 abortEarly: true, 1717 }, 1718}, 1719`),rf()()(),Ra(532,`p`),gT(533,`For Joi schemas, `),Ra(534,`code`),gT(535,`@nestjs/config`),rf(),gT(536,` keeps its historical defaults of `),Ra(537,`code`),gT(538,`allowUnknown: true`),rf(),gT(539,` and `),Ra(540,`code`),gT(541,`abortEarly: false`),rf(),gT(542,`, and merges anything you pass on top of them.`),rf(),Ra(543,`h4`,33)(544,`span`),gT(545,`Terminus module`),rf()(),Ra(546,`p`),gT(547,`The legacy health indicator API, deprecated
1719in version 11, has been removed. If your custom health indicators still extend `),Ra(548,`code`),gT(549,`HealthIndicator`),rf(),gT(550,` or throw a `),Ra(551,`code`),gT(552,`HealthCheckError`),rf(),gT(553,`, migrate them to `),Ra(554,`code`),gT(555,`HealthIndicatorService`),rf(),gT(556,`.`),rf(),Ra(557,`p`)(558,`strong`),gT(559,`Previous Approach`),rf()(),Ra(560,`p`),gT(561,`Before version 12, a custom health indicator could report an unhealthy state by throwing a `),Ra(562,`code`),gT(563,`HealthCheckError`),rf(),gT(564,`:`),rf(),Ra(565,`app-copy-button`)(566,`pre`)(567,`code`,22),gT(568,` 1720@Injectable() 1721export class DogHealthIndicator extends HealthIndicator { 1722 constructor(private readonly dogService: DogService) { 1723 super(); 1724 } 1725 1726 async isHealthy(key: string) { 1727 const badboys = await this.dogService.getBadboys(); 1728 const isHealthy = badboys.length === 0; 1729 const result = this.getStatus(key, isHealthy, { badboys: badboys.length }); 1730 1731 if (!isHealthy) { 1732 throw new HealthCheckError('Dog check failed', result); 1733 } 1734 1735 return result; 1736 } 1737} 1738`),rf()()(),Ra(569,`p`)(570,`strong`),gT(571,`Updated Approach (NestJS Terminus v12)`),rf()(),Ra(572,`p`),gT(573,`In version 12, the health indicator returns its result in both cases. Throwing is no longer a way to report an unhealthy state. The indicator either returns `),Ra(574,`code`),gT(575,`up()`),rf(),gT(576,` / `),Ra(577,`code`),gT(578,`down()`),rf(),gT(579,` explicitly, or hands the operation to `),Ra(580,`code`),gT(581,`attempt()`),rf(),gT(582,`, which marks the indicator as `),Ra(583,`code`),gT(584,`'down'`),rf(),gT(585,` when the operation throws:`),rf(),Ra(586,`app-copy-button`)(587,`pre`)(588,`code`,22),gT(589,` 1739@Injectable() 1740export class DogHealthIndicator { 1741 constructor( 1742 private readonly dogService: DogService, 1743 // Inject the \`HealthIndicatorService\` provided by the \`TerminusModule\` 1744 private readonly healthIndicatorService: HealthIndicatorService, 1745 ) {} 1746 1747 async isHealthy(key: string) { 1748 const indicator = this.healthIndicatorService.check(key); 1749 const badboys = await this.dogService.getBadboys(); 1750 1751 if (badboys.length > 0) { 1752 // Mark the indicator as "down" and add additional info to the response 1753 return indicator.down({ badboys: badboys.length }); 1754 } 1755 1756 // Mark the health indicator as "up" 1757 return indicator.up(); 1758 } 1759} 1760`),rf()()(),Ra(590,`p`),gT(591,`If the indicator only needs to know whether an operation succeeded (e.g., that the dog service is reachable), `),Ra(592,`code`),gT(593,`attempt()`),rf(),gT(594,` is the shorter form:`),rf(),Ra(595,`app-copy-button`)(596,`pre`)(597,`code`,22),gT(598,` 1761isHealthy(key: string) { 1762 return this.healthIndicatorService 1763 .check(key) 1764 .attempt(() => this.dogService.ping()) 1765 .withTimeout(1000); 1766} 1767`),rf()()(),Ra(599,`p`),gT(600,`The `),Ra(601,`code`),gT(602,`timeout`),rf(),gT(603,` option of the built-in database, microservice, and gRPC indicators (e.g., `),Ra(604,`code`),gT(605),rf(),gT(606,`) is deprecated. Chain `),Ra(607,`code`),gT(608,`.withTimeout(1500)`),rf(),gT(609,` on the returned attempt instead. See the `),Ra(610,`a`,34),gT(611,`Terminus chapter`),rf(),gT(612,` for details.`),rf(),Ra(613,`h4`,35)(614,`span`),gT(615,`Webpack deprecation in CLI workflows`),rf()(),Ra(616,`p`),gT(617,`The v12 release also marks the shift away from webpack-centric CLI workflows. Rspack is now the default bundler for monorepos, and the `),Ra(618,`code`),gT(619,`--webpack`),rf(),gT(620,` / `),Ra(621,`code`),gT(622,`--webpackPath`),rf(),gT(623,` CLI flags (and their `),Ra(624,`code`),gT(625,`webpack`),rf(),gT(626,` / `),Ra(627,`code`),gT(628,`webpackConfigPath`),rf(),gT(629,` counterparts in `),Ra(630,`code`),gT(631,`nest-cli.json`),rf(),gT(632,`) are deprecated
1767in favor of `),Ra(633,`code`),gT(634,`--builder rspack`),rf(),gT(635,`. If your project generation or build setup relies on webpack, plan to migrate it over time.`),rf(),Ra(636,`p`),gT(637,`The CLI also adds `),Ra(638,`code`),gT(639,`bun`),rf(),gT(640,` as a supported package manager, and the `),Ra(641,`code`),gT(642,`decorator`),rf(),gT(643,` schematic now generates decorators in the `),Ra(644,`code`),gT(645,`Reflector.createDecorator()`),rf(),gT(646,` form. The `),Ra(647,`code`),gT(648,`angular`),rf(),gT(649,` schematic has been removed.`),rf(),Ra(650,`h4`,36)(651,`span`),gT(652,`New CLI commands and flags`),rf()(),Ra(653,`p`),gT(654,`The CLI gains a `),Ra(655,`code`),gT(656,`deploy`),rf(),gT(657,` command that forwards to `),Ra(658,`a`,37),gT(659,`Mau`),rf(),gT(660,`, installing `),Ra(661,`code`),gT(662,`@nestjs/mau`),rf(),gT(663,` as a dev dependency on first use:`),rf(),Ra(664,`pre`)(665,`code`,7),gT(666,` 1768$ nest deploy 1769`),rf()(),Ra(667,`p`)(668,`code`),gT(669,`nest build`),rf(),gT(670,` and `),Ra(671,`code`),gT(672,`nest start`),rf(),gT(673,` also pick up several new options:`),rf(),Ra(674,`ul`)(675,`li`)(676,`code`),gT(677,`--rspackPath [path]`),rf(),gT(678,`: path to a Rspack configuration file, the counterpart to the deprecated `),Ra(679,`code`),gT(680,`--webpackPath`),rf()(),Ra(681,`li`)(682,`code`),gT(683,`--emit-declarations`),rf(),gT(684,`: emit `),Ra(685,`code`),gT(686,`.d.ts`),rf(),gT(687,` files when using the SWC builder (also available as `),Ra(688,`code`),gT(689,`emitDeclarations`),rf(),gT(690,` in `),Ra(691,`code`),gT(692,`nest-cli.json`),rf(),gT(693,`)`),rf(),Ra(694,`li`)(695,`code`),gT(696,`--no-type-check`),rf(),gT(697,`: explicitly disable SWC type checking`),rf(),Ra(698,`li`)(699,`code`),gT(700,`--silent`),rf(),gT(701,`: suppress informational compiler logs`),rf()(),Ra(702,`p`)(703,`code`),gT(704,`nest build`),rf(),gT(705,` also supports `),Ra(706,`code`),gT(707,`--parallel [concurrency]`),rf(),gT(708,`, which builds monorepo projects in parallel when combined with `),Ra(709,`code`),gT(710,`--all`),rf(),gT(711,`. In addition, `),Ra(712,`code`),gT(713,`nest-cli.json`),rf(),gT(714,` gains an `),Ra(715,`code`),gT(716,`includeLibraryAssets`),rf(),gT(717,` property for copying library assets into an application build.`),rf(),Ra(718,`h4`,38)(719,`span`),gT(720,`Route conflict diagnostics`),rf()(),Ra(721,`p`),gT(722,`Nest registers routes in declaration order. On order-sensitive adapters such as Express, this means `),Ra(723,`code`),gT(724,`@Get(':id')`),rf(),gT(725,` can silently shadow a `),Ra(726,`code`),gT(727,`@Get('me')`),rf(),gT(728,` declared after it. v12 adds two `),Ra(729,`strong`),gT(730,`opt-in`),rf(),gT(731,` options to `),Ra(732,`code`),gT(733,`NestApplicationOptions`),rf(),gT(734,` to address this:`),rf(),Ra(735,`app-copy-button`)(736,`pre`)(737,`code`,22),gT(738,` 1770const app = await NestFactory.create(AppModule, { 1771 routeConflictPolicy: { duplicate: 'error', shadow: 'warn' }, 1772 routeResolutionStrategy: 'specificity', 1773}); 1774`),rf()()(),Ra(739,`p`),gT(740,`Both default to the previous behavior, so existing applications are unaffected unless you set them. See the `),Ra(741,`a`,39),gT(742,`Controllers chapter`),rf(),gT(743,` for the full description.`),rf(),Ra(744,`h4`,40)(745,`span`),gT(746,`Machine-readable error codes`),rf()(),Ra(747,`p`)(748,`code`),gT(749,`HttpExceptionOptions`),rf(),gT(750,` accepts a new `),Ra(751,`code`),gT(752,`errorCode`),rf(),gT(753,` property. It is serialized into the response body, so clients can branch on a stable identifier instead of parsing the message string:`),rf(),Ra(754,`app-copy-button`)(755,`pre`)(756,`code`,22),gT(757,` 1775throw new BadRequestException('Password is too weak', { 1776 errorCode: 'WEAK_PASSWORD', 1777}); 1778`),rf()()(),Ra(758,`p`),gT(759,`See `),Ra(760,`a`,41),gT(761,`Machine-readable error codes`),rf(),gT(762,` in the Exception filters chapter.`),rf(),Ra(763,`h4`,42)(764,`span`),gT(765,`Structured logging params`),rf()(),Ra(766,`p`)(767,`code`),gT(768,`ConsoleLogger`),rf(),gT(769,` now treats plain objects passed after the message as structured params attached to the same log entry, instead of emitting them as separate records:`),rf(),Ra(770,`app-copy-button`)(771,`pre`)(772,`code`,22),gT(773,` 1779logger.log('User created', { userId: 1, email: '[email protected]' }); 1780`),rf()()(),Ra(774,`p`),gT(775,`In JSON mode, they are nested under a `),Ra(776,`code`),gT(777,`params`),rf(),gT(778,` key, or spread into the root object if you enable `),Ra(779,`code`),gT(780,`flattenParams`),rf(),gT(781,`. This behavior is on by default in v12; set `),Ra(782,`code`),gT(783,`structuredParams: false`),rf(),gT(784,` to restore the previous behavior. See `),Ra(785,`a`,43),gT(786,`Structured logging params`),rf(),gT(787,` in the Logger chapter.`),rf(),Ra(788,`h4`,44)(789,`span`),gT(790,`Native observability support`),rf()(),Ra(791,`p`),gT(792,`Version 12 adds first-class observability support through the official `),Ra(793,`a`,45)(794,`code`),gT(795,`@nestjs/observe`),rf()(),gT(796,` SDK. Instead of attaching a generic Node.js APM agent to the HTTP server, the SDK plugs into Nest's own request lifecycle through the `),Ra(797,`code`),gT(798,`instrument`),rf(),gT(799,` application option. As a result, requests, jobs, errors, and traces are reported in terms of your controllers, providers, resolvers, and queue consumers.`),rf(),Ra(800,`app-copy-button`)(801,`pre`)(802,`code`,22),gT(803,` 1781// app.module.ts 1782import { Module } from '@nestjs/common'; 1783import { createObserveModule } from '@nestjs/observe'; 1784
1785export const { ObserveModule, ObserveInstrument } = createObserveModule(); 1786 1787@Module({ 1788 imports: [ObserveModule.forRoot({ serviceId: 'cats-app' })], 1789}) 1790export class AppModule {} 1791`),rf()()(),Ra(804,`app-copy-button`)(805,`pre`)(806,`code`,22),gT(807,` 1792// main.ts 1793import { NestFactory } from '@nestjs/core'; 1794import { AppModule, ObserveInstrument } from './app.module.js'; 1795 1796const app = await NestFactory.create(AppModule, { 1797 instrument: ObserveInstrument, 1798}); 1799`),rf()()(),Ra(808,`p`),gT(809,`There is nothing to migrate here: it is a new, opt-in capability. See the `),Ra(810,`a`,5),gT(811,`Observability chapter`),rf(),gT(812,` for what auto-instrumentation covers, and the `),Ra(813,`a`,46),gT(814,`SDK reference`),rf(),gT(815,` for configuration options.`),rf(),Ra(816,`h4`,47)(817,`span`),gT(818,`Other notable release changes`),rf()(),Ra(819,`p`),gT(820,`Depending on which Nest packages you use, you may also want to review the following changes:`),rf(),Ra(821,`ul`)(822,`li`)(823,`strong`),gT(824,`Pipe transform signatures`),rf(),gT(825,` have been refined for stronger type safety, and `),Ra(826,`code`),gT(827,`ArgumentMetadata`),rf(),gT(828,` now takes a generic parameter. Custom pipes with hand-written signatures may need their types adjusted.`),rf(),Ra(829,`li`)(830,`strong`)(831,`code`),gT(832,`ValidationPipe`),rf(),gT(833,` error format`),rf(),gT(834,`: the new `),Ra(835,`code`),gT(836,`errorFormat`),rf(),gT(837,` option (`),Ra(838,`code`),gT(839,`'list'`),rf(),gT(840,` or `),Ra(841,`code`),gT(842,`'grouped'`),rf(),gT(843,`) controls the shape of validation error responses.`),rf(),Ra(844,`li`)(845,`strong`),gT(846,`gRPC exception filter`),rf(),gT(847,`: `),Ra(848,`code`),gT(849,`GrpcExceptionFilter`),rf(),gT(850,`, plus a family of status-specific exceptions, maps errors to the proper gRPC status codes instead of `),Ra(851,`code`),gT(852,`UNKNOWN`),rf(),gT(853,`. See the `),Ra(854,`a`,48),gT(855,`gRPC chapter`),rf(),gT(856,`.`),rf(),Ra(857,`li`)(858,`strong`),gT(859,`Regex Kafka patterns`),rf(),gT(860,`: `),Ra(861,`code`),gT(862,`@MessagePattern()`),rf(),gT(863,` and `),Ra(864,`code`),gT(865,`@EventPattern()`),rf(),gT(866,` now accept a `),Ra(867,`code`),gT(868,`RegExp`),rf(),gT(869,` on the Kafka transport. See the `),Ra(870,`a`,49),gT(871,`Kafka chapter`),rf(),gT(872,`.`),rf(),Ra(873,`li`)(874,`strong`),gT(875,`Request-scoped WebSocket gateways`),rf(),gT(876,`: gateways now support request-scoped providers, with the socket injectable through the `),Ra(877,`code`),gT(878,`REQUEST`),rf(),gT(879,` token. See the `),Ra(880,`a`,50),gT(881,`Gateways chapter`),rf(),gT(882,`.`),rf(),Ra(883,`li`)(884,`strong`),gT(885,`WebSocket disconnect reason`),rf(),gT(886,`: `),Ra(887,`code`),gT(888,`handleDisconnect`),rf(),gT(889,` can now receive the reason for the disconnection.`),rf(),Ra(890,`li`)(891,`strong`),gT(892,`Microservices pre-request hook`),rf(),gT(893,`: a new hook runs before a message handler is invoked.`),rf(),Ra(894,`li`)(895,`strong`),gT(896,`Express graceful shutdown`),rf(),gT(897,`: the Express adapter now drains in-flight requests on shutdown.`),rf(),Ra(898,`li`)(899,`strong`),gT(900,`HTTP adapter error mapping`),rf(),gT(901,` has been reworked across the core, Express, and Fastify adapters.`),rf()(),Ra(902,`p`),gT(903,`If you depend on one of these areas, verify the corresponding behavior with your test suite after upgrading.`),rf(),Ra(904,`h4`,51)(905,`span`),gT(906,`Switching your project to ESM`),rf()(),Ra(907,`blockquote`,19)(908,`strong`),gT(909,`Optional`),rf(),gT(910,` This section and the next one are `),Ra(911,`strong`),gT(912,`not`),rf(),gT(913,` part of upgrading to v12, which is why they come last. A CommonJS application runs on v12 unchanged: `),Ra(914,`code`),gT(915,`nest upgrade`),rf(),gT(916,` doesn't touch your module format, and nothing in the framework requires you to switch. Read on only if you `),Ra(917,`em`),gT(918,`want`),rf(),gT(919,` to move your project to ESM, on whatever schedule suits you. 1800`),rf(),Ra(920,`p`),gT(921,`The switch itself happens in `),Ra(922,`code`),gT(923,`package.json`),rf(),gT(924,`, not in `),Ra(925,`code`),gT(926,`tsconfig.json`),rf(),gT(927,`. Add a `),Ra(928,`code`),gT(929,`type`),rf(),gT(930,` field set to `),Ra(931,`code`),gT(932,`module`),rf(),gT(933,`:`),rf(),Ra(934,`pre`)(935,`code`,52),gT(936,` 1801{ 1802 "name": "my-app", 1803 "type": "module" 1804} 1805`),rf()(),Ra(937,`p`),gT(938,`That single field tells Node.js (and, through `),Ra(939,`code`),gT(940,`"module": "nodenext"`),rf(),gT(941,`, TypeScript) to treat your `),Ra(942,`code`),gT(943,`.js`),rf(),gT(944,` output as ESM.`),rf(),Ra(945,`p`),gT(946,`Whether you also need to change `),Ra(947,`code`),gT(948,`tsconfig.json`),rf(),gT(949,` depends on how old your project is:`),rf(),Ra(950,`ul`)(951,`li`)(952,`strong`),gT(953,`Projects generated
1805with a recent v11 CLI`),rf(),gT(954,` (`),Ra(955,`code`),gT(956,`@nestjs/schematics`),rf(),gT(957,` 11.0.6 or later) already use `),Ra(958,`code`),gT(959,`"module": "nodenext"`),rf(),gT(960,` and `),Ra(961,`code`),gT(962,`"moduleResolution": "nodenext"`),rf(),gT(963,`. Nothing in `),Ra(964,`code`),gT(965,`tsconfig.json`),rf(),gT(966,` needs to change; adding `),Ra(967,`code`),gT(968,`"type": "module"`),rf(),gT(969,` is enough.`),rf(),Ra(970,`li`)(971,`strong`),gT(972,`Projects generated with earlier releases`),rf(),gT(973,` (v10, or early v11) typically still have `),Ra(974,`code`),gT(975,`"module": "commonjs"`),rf(),gT(976,` and no `),Ra(977,`code`),gT(978,`moduleResolution`),rf(),gT(979,` entry. Update both before adding `),Ra(980,`code`),gT(981,`"type": "module"`),rf(),gT(982,`:`),rf()(),Ra(983,`pre`)(984,`code`,52),gT(985,` 1806{ 1807 "compilerOptions": { 1808 "module": "nodenext", 1809 "moduleResolution": "nodenext", 1810 "resolvePackageJsonExports": true, 1811 "target": "ES2023" 1812 } 1813} 1814`),rf()(),Ra(986,`p`),gT(987,`For reference, this is the complete `),Ra(988,`code`),gT(989,`compilerOptions`),rf(),gT(990,` set used by the ESM project that `),Ra(991,`code`),gT(992,`nest new`),rf(),gT(993,` generates:`),rf(),Ra(994,`pre`)(995,`code`,52),gT(996,` 1815{ 1816 "compilerOptions": { 1817 "module": "nodenext", 1818 "moduleResolution": "nodenext", 1819 "resolvePackageJsonExports": true, 1820 "esModuleInterop": true, 1821 "isolatedModules": true, 1822 "declaration": true, 1823 "removeComments": true, 1824 "emitDecoratorMetadata": true, 1825 "experimentalDecorators": true, 1826 "allowSyntheticDefaultImports": true, 1827 "target": "ES2023", 1828 "sourceMap": true, 1829 "outDir": "./dist", 1830 "rootDir": ".", 1831 "incremental": true, 1832 "skipLibCheck": true, 1833 "strict": true, 1834 "strictPropertyInitialization": false, 1835 "types": ["vitest/globals", "node"] 1836 } 1837} 1838`),rf()(),Ra(997,`blockquote`,9)(998,`strong`),gT(999,`Hint`),rf(),Ra(1e3,`code`),gT(1001,`nest-cli.json`),rf(),gT(1002,` and `),Ra(1003,`code`),gT(1004,`tsconfig.build.json`),rf(),gT(1005,` are identical in the CommonJS and ESM project variants, so neither needs changes. The `),Ra(1006,`code`),gT(1007,`types`),rf(),gT(1008,` entry above differs only because ESM projects default to Vitest; a CommonJS project on Jest uses `),Ra(1009,`code`),gT(1010,`["node", "jest"]`),rf(),gT(1011,` instead. 1839`),rf(),Ra(1012,`blockquote`,19)(1013,`strong`),gT(1014,`Warning`),rf(),Ra(1015,`code`),gT(1016,`"module": "nodenext"`),rf(),gT(1017,` derives the module format of each file from the nearest `),Ra(1018,`code`),gT(1019,`package.json`),rf(),gT(1020,`. Adding `),Ra(1021,`code`),gT(1022,`"type": "module"`),rf(),gT(1023,` therefore changes how `),Ra(1024,`strong`),gT(1025,`every`),rf(),Ra(1026,`code`),gT(1027,`.ts`),rf(),gT(1028,` file in the project is emitted, and TypeScript starts reporting the missing import extensions described below. Expect to fix them in the same pass rather than incrementally. 1840`),rf(),Ra(1029,`h4`,53)(1030,`span`),gT(1031,`Moving your own code to ESM`),rf()(),Ra(1032,`p`),gT(1033,`With the configuration in place, the two things in your own code that most often need attention are relative imports and CommonJS-only globals.`),rf(),Ra(1034,`p`),gT(1035,`Relative imports must carry a file extension:`),rf(),Ra(1036,`app-copy-button`)(1037,`pre`)(1038,`code`,22),gT(1039,` 1841// Before 1842import { AppModule } from './app.module'; 1843 1844// After 1845import { AppModule } from './app.module.js'; 1846`),rf()()(),Ra(1040,`p`),gT(1041,`The extension is `),Ra(1042,`code`),gT(1043,`.js`),rf(),gT(1044,` even though the source file is `),Ra(1045,`code`),gT(1046,`.ts`),rf(),gT(1047,`, because the specifier refers to the emitted file.`),rf(),Ra(1048,`p`)(1049,`code`),gT(1050,`__dirname`),rf(),gT(1051,` and `),Ra(1052,`code`),gT(1053,`__filename`),rf(),gT(1054,` do not exist in ESM. Use `),Ra(1055,`code`),gT(1056,`import.meta.dirname`),rf(),gT(1057,` instead (or `),Ra(1058,`code`),gT(1059,`import.meta.url`),rf(),gT(1060,` with `),Ra(1061,`code`),gT(1062,`fileURLToPath`),rf(),gT(1063,` on older Node.js versions):`),rf(),Ra(1064,`app-copy-button`)(1065,`pre`)(1066,`code`,22),gT(1067,` 1847// Before 1848protoPath: join(__dirname, 'hero/hero.proto'), 1849 1850// After 1851protoPath: join(import.meta.dirname, 'hero/hero.proto'), 1852`),rf()()(),Ra(1068,`p`),gT(1069,`Similarly, `),Ra(1070,`code`),gT(1071,`require()`),rf(),gT(1072,` is unavailable. If you need it for interop, create it explicitly with `),Ra(1073,`code`),gT(1074,`createRequire(import.meta.url)`),rf(),gT(1075,` from `),Ra(1076,`code`),gT(1077,`node:module`),rf(),gT(1078,`.`),rf(),Ra(1079,`blockquote`,9)(1080,`strong`),gT(1081,`Hint`),rf(),gT(1082,` Many code samples throughout these docs use the ESM conventions above. If your project is still CommonJS, drop the `),Ra(1083,`code`),gT(1084,`.js`),rf(),gT(1085,` extensions, keep `),Ra(1086,`code`),gT(1087,`__dirname`),rf(),gT(1088,`, and call `),Ra(1089,`code`),gT(1090,`bootstrap()`),rf(),gT(1091,` without `),Ra(1092,`code`),gT(1093,`await`),rf(),gT(1094,`. 1853`),rf()(),Ra(1095,`a`,54),qa$1(1096,`i`,55),Ra(1097,`span`),gT(1098,`Edit on GitHub`),rf()()()),a&2&&(LC(605),Vv(`db.pingCheck('database', `,`{`,` timeout: 1500 `,`}`,`)`))},dependencies:[wt$1,en$1,Kc],encapsulation:2})}return o}
1853)();var ea=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-modules`]],features:[Iv],decls:492,vars:44,consts:[[`contentReference`,``],[`app6aa67fc0de8ad73c55ac01564ec477e0c777e660`,``],[`app33d22622d7232820144fee6f8e632f8ed785b600`,``],[`app7bfcf8975a1a7a1d62cca0f562f1de9f9810ef21`,``],[`app91363f82336973ba2597f4ea03aaafbf90f079fb`,``],[`app2410400ba7c4d4ca9af90727c441dc6f0468c707`,``],[`appdf1e3085aa0190f8703f860c27d8734068cebfe0`,``],[`app188b30d18960b3ed87a68aa351dcb12056bd817a`,``],[`app64acd74f2ba263f0a32edfdac3e59bbd20d46ee3`,``],[1,`content`],[1,`content-inner`],[`id`,`modules`],[`src`,`/assets/Modules_1.png`,1,`illustrative-image`],[`appAnchor`,``,`id`,`feature-modules`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/SOLID`],[1,`with-heading`],[1,`filename`],[1,`language-typescript`],[1,`info`],[1,`file-tree`],[1,`item`],[1,`children`],[`appAnchor`,``,`id`,`shared-modules`],[`src`,`/assets/Shared_Module_1.png`,1,`illustrative-image`],[`appAnchor`,``,`id`,`module-re-exporting`],[`appAnchor`,``,`id`,`dependency-injection`],[`routerLink`,`/fundamentals/circular-dependency`],[`appAnchor`,``,`id`,`global-modules`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://angular.dev`],[`appAnchor`,``,`id`,`dynamic-modules`],[`href`,`/fundamentals/custom-providers#non-class-based-provider-tokens`],[1,`warning`],[`routerLink`,`/fundamentals/dynamic-modules`],[`href`,`/fundamentals/dynamic-modules#configurable-module-builder`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/modules.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Ra(0,`div`,9,0)(2,`div`,10)(3,`h3`,11),gT(4,`Modules`),rf(),Ra(5,`p`),gT(6,`A module is a class annotated with the `),Ra(7,`code`),gT(8,`@Module()`),rf(),gT(9,` decorator. The decorator provides metadata that `),Ra(10,`strong`),gT(11,`Nest`),rf(),gT(12,` uses to organize and manage the application structure.`),rf(),Ra(13,`figure`),qa$1(14,`img`,12),rf(),Ra(15,`p`),gT(16,`Every Nest application has at least one module, the `),Ra(17,`strong`),gT(18,`root module`),rf(),gT(19,`. It is the starting point from which Nest builds the `),Ra(20,`strong`),gT(21,`application graph`),rf(),gT(22,`, the internal structure Nest uses to resolve relationships and dependencies between modules and providers. A very small application may have only a root module, but most applications have multiple modules, each encapsulating a closely related set of `),Ra(23,`strong`),gT(24,`capabilities`),rf(),gT(25,`. Modules are the `),Ra(26,`strong`),gT(27,`recommended`),rf(),gT(28,` way to organize your components.`),rf(),Ra(29,`p`),gT(30,`The `),Ra(31,`code`),gT(32,`@Module()`),rf(),gT(33,` decorator takes a single object with properties that describe the module:`),rf(),Ra(34,`table`),qa$1(35,`thead`),Ra(36,`tbody`)(37,`tr`)(38,`td`)(39,`code`),gT(40,`providers`),rf()(),Ra(41,`td`),gT(42,`the providers that will be instantiated by the Nest injector and that may be shared at least across this module`),rf()(),Ra(43,`tr`)(44,`td`)(45,`code`),gT(46,`controllers`),rf()(),Ra(47,`td`),gT(48,`the set of controllers defined in this module that must be instantiated`),rf()(),Ra(49,`tr`)(50,`td`)(51,`code`),gT(52,`imports`),rf()(),Ra(53,`td`),gT(54,`the list of imported modules that export the providers required in this module`),rf()(),Ra(55,`tr`)(56,`td`)(57,`code`),gT(58,`exports`),rf()(),Ra(59,`td`),gT(60,`the subset of `),Ra(61,`code`),gT(62,`providers`),rf(),gT(63,` that this module provides and that should be available to other modules importing it. You can use either the provider itself or its token (the `),Ra(64,`code`),gT(65,`provide`),rf(),gT(66,` value)`),rf()()()(),Ra(67,`p`),gT(68,`A module `),Ra(69,`strong`),gT(70,`encapsulates`),rf(),gT(71,` its providers by default: you can inject only providers that are part of the current module or that are explicitly exported by an imported module. A module's exported providers form its public interface, or API.`),rf(),Ra(72,`h4`,13)(73,`span`),gT(74,`Feature modules`),rf()(),Ra(75,`p`),gT(76,`In our example, `),Ra(77,`code`),gT(78,`CatsController`),rf(),gT(79,` and `),Ra(80,`code`),gT(81,`CatsService`),rf(),gT(82,` are closely related and serve the same application domain, so it makes sense to group them into a feature module. A feature module organizes the code for a specific feature, which keeps boundaries clear. This becomes more important as the application or team grows, and it aligns with the `),Ra(83,`a`,14),gT(84,`SOLID`),rf(),gT(85,` principles.`),rf(),Ra(86,`p`),gT(87,`Next, we'll create a `),Ra(88,`code`),gT(89,`CatsModule`),rf(),gT(90,` that groups the controller and the service:`),rf(),Ra(91,`app-copy-button`,15)(92,`span`,16),gT(93),TT(94,`extension`),qa$1(95,`app-tabs`,null,1),rf(),Ra(97,`pre`)(98,`code`,17),gT(99,` 1854import { Module } from '@nestjs/common'; 1855import { CatsController } from './cats.controller.js'; 1856import { CatsService } from './cats.service.js'; 1857 1858@Module({ 1859 controllers: [CatsController], 1860 providers: [CatsService], 1861}) 1862export class CatsModule {} 1863`),rf()()(),Ra(100,`blockquote`,18)(101,`strong`),gT(102,`Hint`),rf(),gT(103,` To create a module with the CLI, run `),Ra(104,`code`),gT(105,`$ nest g module cats`),rf(),gT(106,`. 1864`),rf(),Ra(107,`p`),gT(108,`Above, we defined `),Ra(109,`code`),gT(110,`CatsModule`),rf(),gT(111,` in the `),Ra(112,`code`),gT(113,`cats.module.ts`),rf(),gT(114,` file and moved everything related to it into the `),Ra(115,`code`),gT(116,`cats`),rf(),gT(117,` directory. The last step is to import this module into the root module (`),Ra(118,`code`),gT(119,`AppModule`),rf(),gT(120,`, defined in the `),Ra(121,`code`),gT(122,`app.module.ts`),rf(),gT(123,` file):`),rf(),Ra(124,`app-copy-button`,15)(125,`span`,16),gT(126),TT(127,`extension`),qa$1(128,`app-tabs`,null,2),rf(),Ra(130,`pre`)(131,`code`,17),gT(132,` 1865import { Module } from '@nestjs/common'; 1866import { CatsModule } from './cats/cats.module.js'; 1867 1868@Module({ 1869 imports: [CatsModule], 1870}) 1871export class AppModule {} 1872`),rf()()(),Ra(133,`p`),gT(134,`The directory structure now looks like this:`),rf(),Ra(135,`div`,19)(136,`div`,20),gT(137,`src`),rf(),Ra(138,`div`,21)(139,`div`,20),gT(140,`cats`),rf(),Ra(141,`div`,21)(142,`div`,20),gT(143,`dto`),rf(),Ra(144,`div`,21)(145,`div`,20),gT(146,`create-cat.dto.ts`),rf()(),Ra(147,`div`,20),gT(148,`interfaces`),rf(),Ra(149,`div`,21)(150,`div`,20),gT(151,`cat.interface.ts`),rf()(),Ra(152,`div`,20),gT(153,`cats.c
1872ontroller.ts`),rf(),Ra(154,`div`,20),gT(155,`cats.module.ts`),rf(),Ra(156,`div`,20),gT(157,`cats.service.ts`),rf()(),Ra(158,`div`,20),gT(159,`app.module.ts`),rf(),Ra(160,`div`,20),gT(161,`main.ts`),rf()()(),Ra(162,`h4`,22)(163,`span`),gT(164,`Shared modules`),rf()(),Ra(165,`p`),gT(166,`In Nest, modules are `),Ra(167,`strong`),gT(168,`singletons`),rf(),gT(169,` by default, so you can share the same instance of any provider between multiple modules.`),rf(),Ra(170,`figure`),qa$1(171,`img`,23),rf(),Ra(172,`p`),gT(173,`Every module is automatically a `),Ra(174,`strong`),gT(175,`shared module`),rf(),gT(176,`: once created, it can be reused by any other module. Suppose you want to share an instance of `),Ra(177,`code`),gT(178,`CatsService`),rf(),gT(179,` between several other modules. To do so, first `),Ra(180,`strong`),gT(181,`export`),rf(),gT(182,` the `),Ra(183,`code`),gT(184,`CatsService`),rf(),gT(185,` provider by adding it to the module's `),Ra(186,`code`),gT(187,`exports`),rf(),gT(188,` array:`),rf(),Ra(189,`app-copy-button`,15)(190,`span`,16),gT(191),TT(192,`extension`),qa$1(193,`app-tabs`,null,3),rf(),Ra(195,`pre`)(196,`code`,17),gT(197,` 1873import { Module } from '@nestjs/common'; 1874import { CatsController } from './cats.controller.js'; 1875import { CatsService } from './cats.service.js'; 1876 1877@Module({ 1878 controllers: [CatsController], 1879 providers: [CatsService], 1880 exports: [CatsService], 1881}) 1882export class CatsModule {} 1883`),rf()()(),Ra(198,`p`),gT(199,`Any module that imports `),Ra(200,`code`),gT(201,`CatsModule`),rf(),gT(202,` now has access to `),Ra(203,`code`),gT(204,`CatsService`),rf(),gT(205,` and shares the same instance with every other module that imports it.`),rf(),Ra(206,`p`),gT(207,`Registering `),Ra(208,`code`),gT(209,`CatsService`),rf(),gT(210,` directly in every module that needs it would also work, but each module would then get its own separate instance of the service. Multiple instances increase memory usage and can cause unexpected behavior, such as inconsistent state if the service holds internal state.`),rf(),Ra(211,`p`),gT(212,`Encapsulating `),Ra(213,`code`),gT(214,`CatsService`),rf(),gT(215,` in a module such as `),Ra(216,`code`),gT(217,`CatsModule`),rf(),gT(218,` and exporting it ensures that every module importing `),Ra(219,`code`),gT(220,`CatsModule`),rf(),gT(221,` reuses the same instance. This reduces memory consumption and makes behavior more predictable, because shared state and resources are managed in one place. Sharing services efficiently across the application is one of the key benefits of modularity and dependency injection.`),rf(),Ra(222,`p`),qa$1(223,`app-banner-devtools`),rf(),Ra(224,`h4`,24)(225,`span`),gT(226,`Module re-exporting`),rf()(),Ra(227,`p`),gT(228,`As shown above, modules can export their internal providers. They can also re-export modules that they import. In the example below, `),Ra(229,`code`),gT(230,`CommonModule`),rf(),gT(231,` is both imported into `),Ra(232,`strong`),gT(233,`and`),rf(),gT(234,` exported from `),Ra(235,`code`),gT(236,`CoreModule`),rf(),gT(237,`, which makes it available to any module that imports `),Ra(238,`code`),gT(239,`CoreModule`),rf(),gT(240,`.`),rf(),Ra(241,`app-copy-button`)(242,`pre`)(243,`code`,17),gT(244,` 1884@Module({ 1885 imports: [CommonModule], 1886 exports: [CommonModule], 1887}) 1888export class CoreModule {} 1889`),rf()()(),Ra(245,`h4`,25)(246,`span`),gT(247,`Dependency injection`),rf()(),Ra(248,`p`),gT(249,`A module class can also `),Ra(250,`strong`),gT(251,`inject`),rf(),gT(252,` providers (e.g., for configuration purposes):`),rf(),Ra(253,`app-copy-button`,15)(254,`span`,16),gT(255),TT(256,`extension`),qa$1(257,`app-tabs`,null,4),rf(),Ra(259,`pre`)(260,`code`,17),gT(261,` 1890import { Module } from '@nestjs/common'; 1891import { CatsController } from './cats.controller.js'; 1892import { CatsService } from './cats.service.js'; 1893 1894@Module({ 1895 controllers: [CatsController], 1896 providers: [CatsService], 1897}) 1898export class CatsModule { 1899 constructor(private catsService: CatsService) {} 1900} 1901`),rf()(),Ra(262,`pre`)(263,`code`,17),gT(264,` 1902import { Module, Dependencies } from '@nestjs/common'; 1903import { CatsController } from './cats.controller.js'; 1904import { CatsService } from './cats.service.js'; 1905 1906@Module({ 1907 controllers: [CatsController], 1908 providers: [CatsService], 1909}) 1910@Dependencies(CatsService) 1911export class CatsModule { 1912 constructor(catsService) { 1913 this.catsService = catsService; 1914 } 1915} 1916`),rf()()(),Ra(265,`p`),gT(266,`However, module classes themselves cannot be injected as providers due to `),Ra(267,`a`,26),gT(268,`circular dependencies`),rf(),gT(269,`.`),rf(),Ra(270,`h4`,27)(271,`span`),gT(272,`Global modules`),rf()(),Ra(273,`p`),gT(274,`Importing the same set of modules everywhere can become tedious. In `),Ra(275,`a`,28),gT(276,`Angular`),rf(),gT(277,`, `),Ra(278,`code`),gT(279,`providers`),rf(),gT(280,` are registered in the global scope and, once defined, are available everywhere. Nest, by contrast, encapsulates providers inside the module scope: you can't use a module's providers elsewhere without first importing the module that encapsulates them.`),rf(),Ra(281,`p`),gT(282,`To make a set of providers available everywhere out of the box (e.g., helpers or database connections), make the module `),Ra(283,`strong`),gT(284,`global`),rf(),gT(285,` with the `),Ra(286,`code`),gT(287,`@Global()`),rf(),gT(288,` decorator:`),rf(),Ra(289,`app-copy-button`)(290,`pre`)(291,`code`,17),gT(292,` 1917import { Module, Global } from '@nestjs/common'; 1918import { CatsController } from './cats.controller.js'; 1919import { CatsService } from './cats.service.js'; 1920 1921@Global() 1922@Module({ 1923 controllers: [CatsController], 1924 providers: [CatsService], 1925 exports: [CatsService], 1926}) 1927export class CatsModule {} 1928`),rf()()(),Ra(293,`p`),gT(294,`The `),Ra(295,`code`),gT(296,`@Global()`),rf(),gT(297,` decorator makes the module global-scoped. Register global modules `),Ra(298,`strong`),gT(299,`only once`),rf(),gT(300,`, typically in the root or core module. In the example above, the `),Ra(301,`code`),gT(302,`CatsService`),rf(),gT(303,` provider is available everywhere, and modules that inject it don't need to add `),Ra(304,`code`),gT(305,`CatsModule`),rf(),gT(306,` to their `),Ra(307,`code`),gT(308,`imports`),rf(),gT(309,` array.`),rf(),Ra(310,`blockquote`,18)(311,`strong`),gT(312,`Hint`),rf(),gT(313,` Making everything global is not a recommended design practice. Global modules reduce boilerplate, but the `),Ra(314,`code`),gT(315,`imports`),rf(),gT(316,` array makes a module's API available to other modules in a controlled, explicit way. This keeps the application structure maintainable, shares only the parts of a module that others need, and avoids unnecessary coupling between unrelated parts of the application. 1929`),rf(),Ra(317,`h4`,29)(318,`span`),gT(319,`Dynamic modules`),rf()(),Ra(320,`p`),gT(321,`Dynamic modules let you create modules that are configured at runtime. They are useful when a module's providers depen
1929d on options supplied by the module that imports it. For example, the following `),Ra(322,`code`),gT(323,`FeatureFlagsModule`),rf(),gT(324,` receives the application's feature flags through its static `),Ra(325,`code`),gT(326,`forRoot()`),rf(),gT(327,` method:`),rf(),Ra(328,`app-copy-button`,15)(329,`span`,16),gT(330),TT(331,`extension`),qa$1(332,`app-tabs`,null,5),rf(),Ra(334,`pre`)(335,`code`,17),gT(336,` 1930import { DynamicModule, Module } from '@nestjs/common'; 1931import { FEATURE_FLAGS } from './feature-flags.constants.js'; 1932import { FeatureFlagsService } from './feature-flags.service.js'; 1933 1934@Module({ 1935 providers: [FeatureFlagsService], 1936 exports: [FeatureFlagsService], 1937}) 1938export class FeatureFlagsModule { 1939 static forRoot(flags: Record<string, boolean>): DynamicModule { 1940 return { 1941 module: FeatureFlagsModule, 1942 providers: [{ provide: FEATURE_FLAGS, useValue: flags }], 1943 }; 1944 } 1945} 1946`),rf()(),Ra(337,`pre`)(338,`code`,17),gT(339,` 1947import { Module } from '@nestjs/common'; 1948import { FEATURE_FLAGS } from './feature-flags.constants.js'; 1949import { FeatureFlagsService } from './feature-flags.service.js'; 1950 1951@Module({ 1952 providers: [FeatureFlagsService], 1953 exports: [FeatureFlagsService], 1954}) 1955export class FeatureFlagsModule { 1956 static forRoot(flags) { 1957 return { 1958 module: FeatureFlagsModule, 1959 providers: [{ provide: FEATURE_FLAGS, useValue: flags }], 1960 }; 1961 } 1962} 1963`),rf()()(),Ra(340,`p`),gT(341,`The `),Ra(342,`code`),gT(343,`FEATURE_FLAGS`),rf(),gT(344,` injection token is a plain constant (`),Ra(345,`code`),gT(346,`export const FEATURE_FLAGS = 'FEATURE_FLAGS';`),rf(),gT(347,`), as described in `),Ra(348,`a`,30),gT(349,`Non-class-based provider tokens`),rf(),gT(350,`.`),rf(),Ra(351,`blockquote`,18)(352,`strong`),gT(353,`Hint`),rf(),gT(354,` The `),Ra(355,`code`),gT(356,`forRoot()`),rf(),gT(357,` method may return a dynamic module either synchronously or asynchronously (i.e., via a `),Ra(358,`code`),gT(359,`Promise`),rf(),gT(360,`). 1964`),rf(),Ra(361,`p`),gT(362,`The properties returned by `),Ra(363,`code`),gT(364,`forRoot()`),rf(),Ra(365,`strong`),gT(366,`extend`),rf(),gT(367,` (rather than override) the metadata defined in the `),Ra(368,`code`),gT(369,`@Module()`),rf(),gT(370,` decorator. The resulting module therefore has both the statically declared `),Ra(371,`code`),gT(372,`FeatureFlagsService`),rf(),gT(373,` and the dynamically registered `),Ra(374,`code`),gT(375,`FEATURE_FLAGS`),rf(),gT(376,` provider. Because they belong to the same module, the service can inject the flags:`),rf(),Ra(377,`app-copy-button`,15)(378,`span`,16),gT(379),TT(380,`extension`),qa$1(381,`app-tabs`,null,6),rf(),Ra(383,`pre`)(384,`code`,17),gT(385,` 1965import { Inject, Injectable } from '@nestjs/common'; 1966import { FEATURE_FLAGS } from './feature-flags.constants.js'; 1967 1968@Injectable() 1969export class FeatureFlagsService { 1970 constructor( 1971 @Inject(FEATURE_FLAGS) private readonly flags: Record<string, boolean>, 1972 ) {} 1973 1974 isEnabled(flag: string): boolean { 1975 return this.flags[flag] ?? false; 1976 } 1977} 1978`),rf()(),Ra(386,`pre`)(387,`code`,17),gT(388,` 1979import { Dependencies, Injectable } from '@nestjs/common'; 1980import { FEATURE_FLAGS } from './feature-flags.constants.js'; 1981 1982@Injectable() 1983@Dependencies(FEATURE_FLAGS) 1984export class FeatureFlagsService { 1985 constructor(flags) { 1986 this.flags = flags; 1987 } 1988 1989 isEnabled(flag) { 1990 return this.flags[flag] ?? false; 1991 } 1992} 1993`),rf()()(),Ra(389,`p`),gT(390,`The module exports only `),Ra(391,`code`),gT(392,`FeatureFlagsService`),rf(),gT(393,`, so the flags themselves stay an implementation detail of the module.`),rf(),Ra(394,`p`),gT(395,`Import and configure the `),Ra(396,`code`),gT(397,`FeatureFlagsModule`),rf(),gT(398,` as follows:`),rf(),Ra(399,`app-copy-button`,15)(400,`span`,16),gT(401),TT(402,`extension`),qa$1(403,`app-tabs`,null,7),rf(),Ra(405,`pre`)(406,`code`,17),gT(407,` 1994import { Module } from '@nestjs/common'; 1995import { FeatureFlagsModule } from './feature-flags/feature-flags.module.js'; 1996 1997@Module({ 1998 imports: [ 1999 FeatureFlagsModule.forRoot({ 2000 newCheckout: true, 2001 betaDashboard: false, 2002 }), 2003 ], 2004}) 2005export class AppModule {} 2006`),rf()()(),Ra(408,`p`),gT(409,`Only the module that imports `),Ra(410,`code`),gT(411,`FeatureFlagsModule.forRoot()`),rf(),gT(412,` can inject `),Ra(413,`code`),gT(414,`FeatureFlagsService`),rf(),gT(415,`. Calling `),Ra(416,`code`),gT(417,`forRoot()`),rf(),gT(418,` again in another module would create a second, separately configured instance. To share a single instance, configure the module once and re-export it. To re-ex
2006port a dynamic module, list the module class in the `),Ra(419,`code`),gT(420,`exports`),rf(),gT(421,` array, without calling `),Ra(422,`code`),gT(423,`forRoot()`),rf(),gT(424,` again:`),rf(),Ra(425,`app-copy-button`,15)(426,`span`,16),gT(427),TT(428,`extension`),qa$1(429,`app-tabs`,null,8),rf(),Ra(431,`pre`)(432,`code`,17),gT(433,` 2007import { Module } from '@nestjs/common'; 2008import { FeatureFlagsModule } from '../feature-flags/feature-flags.module.js'; 2009 2010@Module({ 2011 imports: [ 2012 FeatureFlagsModule.forRoot({ 2013 newCheckout: true, 2014 betaDashboard: false, 2015 }), 2016 ], 2017 exports: [FeatureFlagsModule], 2018}) 2019export class CoreModule {} 2020`),rf()()(),Ra(434,`p`),gT(435,`Every module that imports `),Ra(436,`code`),gT(437,`CoreModule`),rf(),gT(438,` can now inject `),Ra(439,`code`),gT(440,`FeatureFlagsService`),rf(),gT(441,`, and all of them share the same flags.`),rf(),Ra(442,`p`),gT(443,`Alternatively, to register a dynamic module in the global scope, set the `),Ra(444,`code`),gT(445,`global`),rf(),gT(446,` property to `),Ra(447,`code`),gT(448,`true`),rf(),gT(449,` in the object returned by `),Ra(450,`code`),gT(451,`forRoot()`),rf(),gT(452,`. `),Ra(453,`code`),gT(454,`FeatureFlagsService`),rf(),gT(455,` then becomes injectable everywhere, without importing any module:`),rf(),Ra(456,`app-copy-button`)(457,`pre`)(458,`code`,17),gT(459,` 2021return { 2022 global: true, 2023 module: FeatureFlagsModule, 2024 providers: [{ provide: FEATURE_FLAGS, useValue: flags }], 2025}; 2026`),rf()()(),Ra(460,`blockquote`,31)(461,`strong`),gT(462,`Warning`),rf(),gT(463,` As mentioned above, making everything global `),Ra(464,`strong`),gT(465,`is not a good design decision`),rf(),gT(466,`. 2027`),rf(),Ra(467,`p`),gT(468,`Options known only at runtime, such as values read by `),Ra(469,`code`),gT(470,`ConfigService`),rf(),gT(471,`, call for an asynchronous variant of `),Ra(472,`code`),gT(473,`forRoot()`),rf(),gT(474,`. The `),Ra(475,`a`,32),gT(476,`Dynamic modules`),rf(),gT(477,` chapter covers this and more.`),rf(),Ra(478,`blockquote`,18)(479,`strong`),gT(480,`Hint`),rf(),gT(481,` To learn how to build highly customizable dynamic modules with `),Ra(482,`code`),gT(483,`ConfigurableModuleBuilder`),rf(),gT(484,`, see the `),Ra(485,`a`,33),gT(486,`Configurable module builder`),rf(),gT(487,` section. 2028`),rf()(),Ra(488,`a`,34),qa$1(489,`i`,35),Ra(490,`span`),gT(491,`Edit on GitHub`),rf()()()),a&2){let l=qS(96),d=qS(129),m=qS(194),h=qS(258),u=qS(333),b=qS(382),S=qS(404),k=qS(430);LC(93),uf(` `,MT(94,20,`cats/cats.module`,l.isJsActive),` 2029`),LC(33),uf(` `,MT(127,23,`app.module`,d.isJsActive),` 2030`),LC(65),uf(` `,MT(192,26,`cats.module`,m.isJsActive),` 2031`),LC(64),uf(` `,MT(256,29,`cats.module`,h.isJsActive),` 2032`),LC(4),kv(`hide`,h.isJsActive),LC(3),kv(`hide`,!h.isJsActive),LC(68),uf(` `,MT(331,32,`feature-flags.module`,u.isJsActive),` 2033`),LC(4),kv(`hide`,u.isJsActive),LC(3),kv(`hide`,!u.isJsActive),LC(42),uf(` `,MT(380,35,`feature-flags.service`,b.isJsActive),` 2034`),LC(4),kv(`hide`,b.isJsActive),LC(3),kv(`hide`,!b.isJsActive),LC(15),uf(` `,MT(402,38,`app.module`,S.isJsActive),` 2035`),LC(26),uf(` `,MT(428,41,`core.module`,k.isJsActive),` 2036`)}},dependencies:[wt$1,en$1,u,s,Kc,g],encapsulation:2})}return o})();var ta=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-pipes`]],features:[Iv],decls:946,vars:72,consts:[[`contentReference`,``],[`appdd652ca1023213d8e4ece520a0f5c995fb3921d6`,``],[`appb41a3c3df8acbe298e73d567e2b6913071b0d75b`,``],[`app84c98e082cdd43fb36102cd1269aaf0c8ec7aaa1`,``],[`appf2c4e6c2ec8156a8410125831033a30d4335dd7a`,``],[`appfd730f900cf7182172a393538556a89ad99eb0ba`,``],[`app04beebc3d5054a446cbbf15fd618d9c08159fee1`,``],[`appd75bb343acc7d25821ccf8f707b221c3daccbc0f`,``],[`app998d3bd964fd7a38245c2c5ade31a71c3fa40de9`,``],[`appda0dc85092f46657509c4c3059ab35689fdd926c`,``],[`app00118d62c52e6438be0bf166a529778300b703cb`,``],[`appec5175b9b08b306cf46178facbd25cd154d90b11`,``],[`appbecbab69c3e43990854cb83ff19c4ed7091436bf`,``],[`app074442ea073cd9d6e148d84dd5ae0b12673d34fb`,``],[`app0e74b2508b3b9062a6a89bebdcc02f8646de04d8`,``],[`appecaf6701203abac5d062848
2036ce377822660f40258`,``],[1,`content`],[1,`content-inner`],[`id`,`pipes`],[`src`,`/assets/Pipe_1.png`,1,`illustrative-image`],[`href`,`controllers#route-parameters`],[1,`info`],[`routerLink`,`/exception-filters`],[`appAnchor`,``,`id`,`built-in-pipes`],[`appAnchor`,``,`id`,`binding-pipes`],[1,`language-typescript`],[1,`language-bash`],[1,`language-json`],[1,`with-heading`],[1,`filename`],[`routerLink`,`/application/validation`],[`appAnchor`,``,`id`,`custom-pipes`],[`routerLink`,`/custom-decorators`],[1,`warning`],[`appAnchor`,``,`id`,`schema-based-validation`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://standardschema.dev/`],[`href`,`/application/validation#schema-based-validation`],[`appAnchor`,``,`id`,`object-schema-validation`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://en.wikipedia.org/wiki/Don%27t_repeat_yourself`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://zod.dev/`],[`appAnchor`,``,`id`,`binding-validation-pipes`],[`appAnchor`,``,`id`,`class-validator`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/typestack/class-validator`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/typestack/class-validator#usage`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/typestack/class-transformer`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://github.com/typestack/class-validator#custom-validation-classes`],[`appAnchor`,``,`id`,`global-scoped-pipes`],[`routerLink`,`/faq/hybrid-application`],[`routerLink`,`/fundamentals/custom-providers`],[`appAnchor`,``,`id`,`the-built-in-validationpipe`],[`appAnchor`,``,`id`,`transformation-use-case`],[`appAnchor`,``,`id`,`providing-defaults`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/pipes.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){if(a&1&&(Ra(0,`div`,16,0)(2,`div`,17)(3,`h3`,18),gT(4,`Pipes`),rf(),Ra(5,`p`),gT(6,`A pipe is a class annotated with the `),Ra(7,`code`),gT(8,`@Injectable()`),rf(),gT(9,` decorator that implements the `),Ra(10,`code`),gT(11,`PipeTransform`),rf(),gT(12,` interface.`),rf(),Ra(13,`figure`),qa$1(14,`img`,19),rf(),Ra(15,`p`),gT(16,`Pipes have two typical use cases:`),rf(),Ra(17,`ul`)(18,`li`)(19,`strong`),gT(20,`transformation`),rf(),gT(21,`: transform input data to the desired form (e.g., from string to integer)`),rf(),Ra(22,`li`)(23,`strong`),gT(24,`validation`),rf(),gT(25,`: evaluate input data and, if valid, pass it through unchanged; otherwise, throw an exception`),rf()(),Ra(26,`p`),gT(27,`In both cases, pipes operate on the arguments being processed by a `),Ra(28,`a`,20),gT(29,`controller route handler`),rf(),gT(30,`. Nest interposes a pipe immediately before a method is invoked; the pipe receives the arguments destined for the method and operates on them. Any transformation or validation takes place at that point, after which the route handler is invoked with the (potentially) transformed arguments.`),rf(),Ra(31,`p`),gT(32,`Nest comes with a number of built-in pipes that you can use out of the box, and you can also build your own. This chapter introduces the built-in pipes and shows how to bind them to route handlers. It then walks through several custom pipes to show how to build one from scratch.`),rf(),Ra(33,`blockquote`,21)(34,`strong`),gT(35,`Hint`),rf(),gT(36,` Pipes run inside the exceptions zone. An exception thrown by a pipe is handled by the exceptions layer (the global exception filter and any `),Ra(37,`a`,22),gT(38,`exception filters`),rf(),gT(39,` applied to the current context). When a pipe throws an exception, the route handler is not executed. This makes pipes the recommended place to validate data that enters the application from external sources, at the system boundary. 2037`),rf(),Ra(40,`h4`,23)(41,`span`),gT(42,`Built-in pipes`),rf()(),Ra(43,`p`),gT(44,`Nest provides the following pipes out of the box, all exported from the `),Ra(45,`code`),gT(46,`@nestjs/common`),rf(),gT(47,` package:`),rf(),Ra(48,`ul`)(49,`li`)(50,`code`),gT(51,`ValidationPipe`),rf()(),Ra(52,`li`)(53,`code`),gT(54,`StandardSchemaValidationPipe`),rf()(),Ra(55,`li`)(56,`code`),gT(57,`ParseIntPipe`),rf()(),Ra(58,`li`)(59,`co
2037de`),gT(60,`ParseFloatPipe`),rf()(),Ra(61,`li`)(62,`code`),gT(63,`ParseBoolPipe`),rf()(),Ra(64,`li`)(65,`code`),gT(66,`ParseArrayPipe`),rf()(),Ra(67,`li`)(68,`code`),gT(69,`ParseUUIDPipe`),rf()(),Ra(70,`li`)(71,`code`),gT(72,`ParseEnumPipe`),rf()(),Ra(73,`li`)(74,`code`),gT(75,`DefaultValuePipe`),rf()(),Ra(76,`li`)(77,`code`),gT(78,`ParseFilePipe`),rf()(),Ra(79,`li`)(80,`code`),gT(81,`ParseDatePipe`),rf()()(),Ra(82,`p`),gT(83,`Let's start with `),Ra(84,`code`),gT(85,`ParseIntPipe`),rf(),gT(86,`. It is an example of the `),Ra(87,`strong`),gT(88,`transformation`),rf(),gT(89,` use case: the pipe ensures that a route handler parameter is converted to a JavaScript integer, or throws an exception if the conversion fails. Later in this chapter, we'll build a simple custom implementation of `),Ra(90,`code`),gT(91,`ParseIntPipe`),rf(),gT(92,`. The techniques below also apply to the other built-in transformation pipes (`),Ra(93,`code`),gT(94,`ParseBoolPipe`),rf(),gT(95,`, `),Ra(96,`code`),gT(97,`ParseFloatPipe`),rf(),gT(98,`, `),Ra(99,`code`),gT(100,`ParseEnumPipe`),rf(),gT(101,`, `),Ra(102,`code`),gT(103,`ParseArrayPipe`),rf(),gT(104,`, `),Ra(105,`code`),gT(106,`ParseDatePipe`),rf(),gT(107,`, and `),Ra(108,`code`),gT(109,`ParseUUIDPipe`),rf(),gT(110,`), which this chapter refers to collectively as the `),Ra(111,`code`),gT(112,`Parse*`),rf(),gT(113,` pipes.`),rf(),Ra(114,`h4`,24)(115,`span`),gT(116,`Binding pipes`),rf()(),Ra(117,`p`),gT(118,`To use a pipe, bind an instance of the pipe class to the appropriate context. In the `),Ra(119,`code`),gT(120,`ParseIntPipe`),rf(),gT(121,` example, we want to associate the pipe with a particular route handler method and make sure it runs before the method is called. The following construct does this; we refer to it as binding the pipe at the method parameter level:`),rf(),Ra(122,`app-copy-button`)(123,`pre`)(124,`code`,25),gT(125,` 2038@Get(':id') 2039async findOne(@Param('id', ParseIntPipe) id: number) { 2040 return this.catsService.findOne(id); 2041} 2042`),rf()()(),Ra(126,`p`),gT(127,`This guarantees one of two outcomes: either the parameter received by `),Ra(128,`code`),gT(129,`findOne()`),rf(),gT(130,` is a number (as `),Ra(131,`code`),gT(132,`this.catsService.findOne()`),rf(),gT(133,` expects), or an exception is thrown before the route handler is called.`),rf(),Ra(134,`p`),gT(135,`For example, suppose the route is called as follows:`),rf(),Ra(136,`pre`)(137,`code`,26),gT(138,` 2043GET localhost:3000/abc 2044`),rf()(),Ra(139,`p`),gT(140,`Nest throws an exception, which produces the following response:`),rf(),Ra(141,`pre`)(142,`code`,27),gT(143,` 2045{ 2046 "statusCode": 400, 2047 "message": "Validation failed (numeric string is expected)", 2048 "error": "Bad Request" 2049} 2050`),rf()(),Ra(144,`p`),gT(145,`The exception prevents the body of the `),Ra(146,`code`),gT(147,`findOne()`),rf(),gT(148,` method from executing.`),rf(),Ra(149,`p`),gT(150,`In the example above, we pass a class (`),Ra(151,`code`),gT(152,`ParseIntPipe`),rf(),gT(153,`), not an instance. This leaves instantiation to the framework and enables dependency injection. As with guards and exception filters, you can instead pass an in-place instance, which is useful when you want to customize the built-in pipe's behavior by passing options:`),rf(),Ra(154,`app-copy-button`)(155,`pre`)(156,`code`,25),gT(157,` 2051@Get(':id') 2052async findOne( 2053 @Param('id', new ParseIntPipe({ errorHttpStatusCode: HttpStatus.NOT_ACCEPTABLE })) 2054 id: number, 2055) { 2056 return this.catsService.findOne(id); 2057} 2058`),rf()()(),Ra(158,`p`),gT(159,`The other transformation pipes (all of the `),Ra(160,`strong`),gT(161,`Parse*`),rf(),gT(162,` pipes) are bound the same way. They work with route parameters, query string parameters, and request body values.`),rf(),Ra(163,`p`),gT(164,`For example, with a query string parameter:`),rf(),Ra(165,`app-copy-button`)(166,`pre`)(167,`code`,25),gT(168,` 2059@Get() 2060async findOne(@Query('id', ParseIntPipe) id: number) { 2061 return this.catsService.findOne(id); 2062} 2063`),rf()()(),Ra(169,`p`),gT(170,`The following example uses `),Ra(171,`code`),gT(172,`ParseUUIDPipe`),rf(),gT(173,` to verify that a string parameter is a UUID:`),rf(),Ra(174,`app-copy-button`,28)(175,`span`,29),qa$1(176,`app-tabs`,null,1),rf(),Ra(178,`pre`)(179,`code`,25),gT(180,` 2064@Get(':uuid') 2065async findOne(@Param('uuid', new ParseUUIDPipe()) uuid: string) { 2066 return this.catsService.findOne(uuid); 2067} 2068`),rf()(),Ra(181,`pre`)(182,`code`,25),gT(183,` 2069@Get(':uuid') 2070@Bind(Param('uuid', new ParseUUIDPipe())) 2071async findOne(uuid) { 2072 return this.catsService.findOne(uuid); 2073} 2074`),rf()()(),Ra(184,`blockquote`,21)(185,`strong`),gT(186,`Hint`),rf(),gT(187,` By default, `),Ra(188,`code`),gT(189,`ParseUUIDPipe`),rf(),gT(190,` accepts a UUID of any version. To require a specific version, pass the `),Ra(191,`code`),gT(192,`version`),rf(),gT(193,` option (`),Ra(194,`code`),gT(195,`'3'`),rf(),gT(196,`, `),Ra(197,`code`),gT(198,`'4'`),rf(),gT(199,`, `),Ra(200,`code`),gT(201,`'5'`),rf(),gT(2
207402,`, or `),Ra(203,`code`),gT(204,`'7'`),rf(),gT(205,`). 2075`),rf(),Ra(206,`p`),gT(207,`Binding validation pipes works slightly differently; we cover it later in this chapter.`),rf(),Ra(208,`blockquote`,21)(209,`strong`),gT(210,`Hint`),rf(),gT(211,` See `),Ra(212,`a`,30),gT(213,`Validation techniques`),rf(),gT(214,` for extensive examples of validation pipes. 2076`),rf(),Ra(215,`h4`,31)(216,`span`),gT(217,`Custom pipes`),rf()(),Ra(218,`p`),gT(219,`As mentioned, you can build your own pipes. Although Nest provides robust built-in `),Ra(220,`code`),gT(221,`ParseIntPipe`),rf(),gT(222,` and `),Ra(223,`code`),gT(224,`ValidationPipe`),rf(),gT(225,` implementations, let's build simple versions of each from scratch to see how custom pipes are constructed.`),rf(),Ra(226,`p`),gT(227,`We start with a simple `),Ra(228,`code`),gT(229,`ValidationPipe`),rf(),gT(230,`. Initially, it takes an input value and returns it unchanged, behaving like an identity function.`),rf(),Ra(231,`app-copy-button`,28)(232,`span`,29),gT(233),TT(234,`extension`),qa$1(235,`app-tabs`,null,2),rf(),Ra(237,`pre`)(238,`code`,25),gT(239,` 2077import { PipeTransform, Injectable, ArgumentMetadata } from '@nestjs/common'; 2078 2079@Injectable() 2080export class ValidationPipe implements PipeTransform { 2081 transform(value: any, metadata: ArgumentMetadata) { 2082 return value; 2083 } 2084} 2085`),rf()(),Ra(240,`pre`)(241,`code`,25),gT(242,` 2086import { Injectable } from '@nestjs/common'; 2087 2088@Injectable() 2089export class ValidationPipe { 2090 transform(value, metadata) { 2091 return value; 2092 } 2093} 2094`),rf()()(),Ra(243,`blockquote`,21)(244,`strong`),gT(245,`Hint`),rf(),Ra(246,`code`),gT(247,`PipeTransform<T, R>`),rf(),gT(248,` is a generic interface that every pipe must implement. `),Ra(249,`code`),gT(250,`T`),rf(),gT(251,` indicates the type of the input `),Ra(252,`code`),gT(253,`value`),rf(),gT(254,`, and `),Ra(255,`code`),gT(256,`R`),rf(),gT(257,` indicates the return type of the `),Ra(258,`code`),gT(259,`transform()`),rf(),gT(260,` method. 2095`),rf(),Ra(261,`p`),gT(262,`Every pipe must implement the `),Ra(263,`code`),gT(264,`transform()`),rf(),gT(265,` method to fulfill the `),Ra(266,`code`),gT(267,`PipeTransform`),rf(),gT(268,` interface contract. This method has two parameters:`),rf(),Ra(269,`ul`)(270,`li`)(271,`code`),gT(272,`value`),rf()(),Ra(273,`li`)(274,`code`),gT(275,`metadata`),rf()()(),Ra(276,`p`),gT(277,`The `),Ra(278,`code`),gT(279,`value`),rf(),gT(280,` parameter is the method argument currently being processed (before the route handler receives it), and `),Ra(281,`code`),gT(282,`metadata`),rf(),gT(283,` is that argument's metadata. The metadata object has the following properties:`),rf(),Ra(284,`app-copy-button`)(285,`pre`)(286,`code`,25),gT(287,` 2096export interface ArgumentMetadata { 2097 type: 'body' | 'query' | 'param' | 'custom'; 2098 metatype?: Type<unknown>; 2099 data?: string; 2100 schema?: StandardSchemaV1; 2101} 2102`),rf()()(),Ra(288,`p`),gT(289,`These properties describe the argument being processed:`),rf(),Ra(290,`table`)(291,`tr`)(292,`td`)(293,`code`),gT(294,`type`),rf()(),Ra(295,`td`),gT(296,`Indicates whether the argument is a body (`),Ra(297,`code`),gT(298,`@Body()`),rf(),gT(299,`), query (`),Ra(300,`code`),gT(301,`@Query()`),rf(),gT(302,`), param (`),Ra(303,`code`),gT(304,`@Param()`),rf(),gT(305,`), or custom parameter (see `),Ra(306,`a`,32),gT(307,`custom decorators`),rf(),gT(308,`).`),rf()(),Ra(309,`tr`)(310,`td`)(311,`code`),gT(312,`metatype`),rf()(),Ra(313,`td`),gT(314,` The metatype of the argument, for example, `),Ra(315,`code`),gT(316,`String`),rf(),gT(317,`. The value is `),Ra(318,`code`),gT(319,`undefined`),rf(),gT(320,` if you omit the type declaration in the route handler signature or use vanilla JavaScript. `),rf()(),Ra(321,`tr`)(322,`td`)(323,`code`),gT(324,`data`),rf()(),Ra(325,`td`),gT(326,`The string passed to the decorator, for example, `),Ra(327,`code`),gT(328,`@Body('string')`),rf(),gT(329,`. It's `),Ra(330,`code`),gT(331,`undefined`),rf(),gT(332,` if you don't pass a string to the decorator, as in `),Ra(333,`code`),gT(334,`@Body()`),rf(),gT(335,`.`),rf()(),Ra(336,`tr`)(337,`td`)(338,`code`),gT(339,`schema`),rf()(),Ra(340,`td`),gT(341,` A Standard Schema compatible schema attached through parameter decorator options such as `),Ra(342,`code`),gT(343),rf(),gT(344,` or `),Ra(345,`code`),gT(346),rf(),gT(347,`. It's `),Ra(348,`code`),gT(349,`undefined`),rf(),gT(350,` if no schema is attached. `),rf()()(),Ra(351,`blockquote`,33)(352,`strong`),gT(353,`Warning`),rf(),gT(354,` Type
2102Script interfaces disappear during transpilation. If a method parameter's type is declared as an interface instead of a class, the `),Ra(355,`code`),gT(356,`metatype`),rf(),gT(357,` value is `),Ra(358,`code`),gT(359,`Object`),rf(),gT(360,`. 2103`),rf(),Ra(361,`blockquote`,21)(362,`strong`),gT(363,`Hint`),rf(),gT(364,` The built-in `),Ra(365,`code`),gT(366,`StandardSchemaValidationPipe`),rf(),gT(367,` uses the `),Ra(368,`code`),gT(369,`schema`),rf(),gT(370,` field to validate arguments with any Standard Schema compatible library. Arguments without a schema pass through unchanged. 2104`),rf(),Ra(371,`h4`,34)(372,`span`),gT(373,`Schema based validation`),rf()(),Ra(374,`blockquote`,21)(375,`strong`),gT(376,`Hint`),rf(),gT(377,` The following sections build validation pipes from scratch to show how pipes work. For schema-based validation in production, use the built-in `),Ra(378,`code`),gT(379,`StandardSchemaValidationPipe`),rf(),gT(380,` instead. It works with Zod, Valibot, ArkType, and any other `),Ra(381,`a`,35),gT(382,`Standard Schema`),rf(),gT(383,` compatible library, and reads the schema you attach through the `),Ra(384,`code`),gT(385,`schema`),rf(),gT(386,` option of parameter decorators such as `),Ra(387,`code`),gT(388,`@Body()`),rf(),gT(389,` and `),Ra(390,`code`),gT(391,`@Param()`),rf(),gT(392,`. See `),Ra(393,`a`,36),gT(394,`Schema-based validation`),rf(),gT(395,` for details. 2105`),rf(),Ra(396,`p`),gT(397,`Let's make our validation pipe more useful. Consider the `),Ra(398,`code`),gT(399,`create()`),rf(),gT(400,` method of the `),Ra(401,`code`),gT(402,`CatsController`),rf(),gT(403,`: we want to ensure that the POST body object is valid before running the service method.`),rf(),Ra(404,`app-copy-button`,28)(405,`span`,29),qa$1(406,`app-tabs`,null,3),rf(),Ra(408,`pre`)(409,`code`,25),gT(410,` 2106@Post() 2107async create(@Body() createCatDto: CreateCatDto) { 2108 this.catsService.create(createCatDto); 2109} 2110`),rf()(),Ra(411,`pre`)(412,`code`,25),gT(413,` 2111@Post() 2112async create(@Body() createCatDto) { 2113 this.catsService.create(createCatDto); 2114} 2115`),rf()()(),Ra(414,`p`),gT(415,`The `),Ra(416,`code`),gT(417,`createCatDto`),rf(),gT(418,` body parameter is of type `),Ra(419,`code`),gT(420,`CreateCatDto`),rf(),gT(421,`:`),rf(),Ra(422,`app-copy-button`,28)(423,`span`,29),gT(424),TT(425,`extension`),qa$1(426,`app-tabs`,null,4),rf(),Ra(428,`pre`)(429,`code`,25),gT(430,` 2116export class CreateCatDto { 2117 name: string; 2118 age: number; 2119 breed: string; 2120} 2121`),rf()()(),Ra(431,`p`),gT(432,`Every request to the `),Ra(433,`code`),gT(434,`create()`),rf(),gT(435,` method must contain a valid body, so we need to validate the three members of the `),Ra(436,`code`),gT(437,`createCatDto`),rf(),gT(438,` object. We could do this inside the route handler, but that would break the `),Ra(439,`strong`),gT(440,`single responsibility principle`),rf(),gT(441,` (SRP).`),rf(),Ra(442,`p`),gT(443,`Another approach is to create a `),Ra(444,`strong`),gT(445,`validator class`),rf(),gT(446,` and delegate the task to it. The disadvantage is that we would have to remember to call the validator at the beginning of each method.`),rf(),Ra(447,`p`),gT(448,`What about validation middleware? This could work, but it's not possible to create `),Ra(449,`strong`),gT(450,`generic middleware`),rf(),gT(451,` that can be used in every context across the application. Middleware is unaware of the `),Ra(452,`strong`),gT(453,`execution context`),rf(),gT(454,`, including the handler that will be called and its parameters.`),rf(),Ra(455,`p`),gT(456,`Pipes are designed for exactly this use case, so we will refine our validation pipe.`),rf(),Ra(457,`p`),qa$1(458,`app-banner-courses`),rf(),Ra(459,`h4`,37)(460,`span`),gT(461,`Object schema validation`),rf()(),Ra(462,`p`),gT(463,`There are several ways to validate objects in a clean, `),Ra(464,`a`,38),gT(465,`DRY`),rf(),gT(466,` way. One common approach is `),Ra(467,`strong`),gT(468,`schema-based`),rf(),gT(469,` validation, which we use here.`),rf(),Ra(470,`p`),gT(471,`The `),Ra(472,`a`,39),gT(473,`Zod`),rf(),gT(474,` library lets you define schemas with a readable API. Let's build a validation pipe that uses Zod schemas.`),rf(),Ra(475,`p`),gT(476,`Start by installing the required package:`),rf(),Ra(477,`pre`)(478,`co
2121de`,26),gT(479,` 2122$ npm install --save zod 2123`),rf()(),Ra(480,`p`),gT(481,`The class below takes a schema as a constructor argument and calls `),Ra(482,`code`),gT(483,`schema.parse()`),rf(),gT(484,`, which validates the incoming argument against that schema.`),rf(),Ra(485,`p`),gT(486,`As noted earlier, a `),Ra(487,`strong`),gT(488,`validation pipe`),rf(),gT(489,` either returns the value or throws an exception. This pipe returns the value parsed by the schema, or throws a `),Ra(490,`code`),gT(491,`BadRequestException`),rf(),gT(492,` if validation fails.`),rf(),Ra(493,`p`),gT(494,`The next section shows how to supply the appropriate schema for a given route handler using the `),Ra(495,`code`),gT(496,`@UsePipes()`),rf(),gT(497,` decorator. This makes the validation pipe reusable across contexts, which is what we set out to do.`),rf(),Ra(498,`app-copy-button`,28)(499,`span`,29),qa$1(500,`app-tabs`,null,5),rf(),Ra(502,`pre`)(503,`code`,25),gT(504,` 2124import { PipeTransform, ArgumentMetadata, BadRequestException } from '@nestjs/common'; 2125import { ZodType } from 'zod'; 2126 2127export class ZodValidationPipe implements PipeTransform { 2128 constructor(private schema: ZodType) {} 2129 2130 transform(value: unknown, metadata: ArgumentMetadata) { 2131 try { 2132 const parsedValue = this.schema.parse(value); 2133 return parsedValue; 2134 } catch (error) { 2135 throw new BadRequestException('Validation failed'); 2136 } 2137 } 2138} 2139`),rf()(),Ra(505,`pre`)(506,`code`,25),gT(507,` 2140import { BadRequestException } from '@nestjs/common'; 2141 2142export class ZodValidationPipe { 2143 constructor(schema) { 2144 this.schema = schema; 2145 } 2146 2147 transform(value, metadata) { 2148 try { 2149 const parsedValue = this.schema.parse(value); 2150 return parsedValue; 2151 } catch (error) { 2152 throw new BadRequestException('Validation failed'); 2153 } 2154 } 2155} 2156`),rf()()(),Ra(508,`h4`,40)(509,`span`),gT(510,`Binding validation pipes`),rf()(),Ra(511,`p`),gT(512,`Earlier, we saw how to bind transformation pipes (such as `),Ra(513,`code`),gT(514,`ParseIntPipe`),rf(),gT(515,` and the rest of the `),Ra(516,`code`),gT(517,`Parse*`),rf(),gT(518,` pipes). Binding validation pipes is equally straightforward.`),rf(),Ra(519,`p`),gT(520,`In this case, we want to bind the pipe at the method level. To use the `),Ra(521,`code`),gT(522,`ZodValidationPipe`),rf(),gT(523,` in our example, we need to:`),rf(),Ra(524,`ol`)(525,`li`),gT(526,`Create an instance of the `),Ra(527,`code`),gT(528,`ZodValidationPipe`),rf()(),Ra(529,`li`),gT(530,`Pass the context-specific Zod schema to the pipe's constructor`),rf(),Ra(531,`li`),gT(532,`Bind the pipe to the method`),rf()(),Ra(533,`p`),gT(534,`Here's an example Zod schema:`),rf(),Ra(535,`app-copy-button`)(536,`pre`)(537,`code`,25),gT(538,` 2157import { z } from 'zod'; 2158 2159export const createCatSchema = z.object({ 2160 name: z.string(), 2161 age: z.number(), 2162 breed: z.string(), 2163}); 2164 2165export type CreateCatDto = z.infer<typeof createCatSchema>; 2166`),rf()()(),Ra(539,`p`),gT(540,`Bind the pipe with the `),Ra(541,`code`),gT(542,`@UsePipes()`),rf(),gT(543,` decorator:`),rf(),Ra(544,`app-copy-button`,28)(545,`span`,29),gT(546),TT(547,`extension`),qa$1(548,`app-tabs`,null,6),rf(),Ra(550,`pre`)(551,`code`,25),gT(552,` 2167@Post() 2168@UsePipes(new ZodValidationPipe(createCatSchema)) 2169async create(@Body() createCatDto: CreateCatDto) { 2170 this.catsService.create(createCatDto); 2171} 2172`),rf()(),Ra(553,`pre`)(554,`code`,25),gT(555,` 2173@Post() 2174@Bind(Body()) 2175@UsePipes(new ZodValidationPipe(createCatSchema)) 2176async create(createCatDto) { 2177 this.catsService.create(createCatDto); 2178} 2179`),rf()()(),Ra(556,`blockquote`,21)(557,`strong`),gT(558,`Hint`),rf(),gT(559,` The `),Ra(560,`code`),gT(561,`@UsePipes()`),rf(),gT(562,` decorator is imported from the `),Ra(563,`code`),gT(564,`@nestjs/common`),rf(),gT(565,` package. 2180`),rf(),Ra(566,`p`),gT(567,`You can also bind the `),Ra(568,`code`),gT(569,`ZodValidationPipe`),rf(),gT(570,` to a specific parameter, alongside built-in pipes. The following example validates the `),Ra(571,`code`),gT(572,`id`),rf(),gT(573,` route parameter with `),Ra(574,`code`),gT(575,`ParseIntPipe`),rf(),gT(576,` and the request body with `),Ra(577,`code`),gT(578,`ZodValidationPipe`),rf(),gT(579,`:`),rf(),Ra(580,`app-copy-button`)(581,`pre`)(582,`code`,25),gT(583,` 2181@Put('/:id') 2182async update( 2183 @Param('id', ParseIntPipe) id: number, 2184 @Body(new ZodValidationPipe(createCatSchema)) body: CreateCatDto 2185): Promise<void> { 2186 this.catsService.update(id, body); 2187} 2188`),rf()()(),Ra(584,`blockquote`,33)(585,`strong`),gT(586,`Warning`),rf(),gT(587,` The `),Ra(588,`code`),gT(589,`zod`),rf(),gT(590,` library requires the `),Ra(591,`code`),gT(592,`strictNullChecks`),rf(),gT(593,` compiler option to be enabled in your `),Ra(594,`code`),gT(595,`tsconfig.json`),rf(),gT(596,` file. 2189`),rf(),Ra(597,`h4`,41)(598,`span`),gT(599,`Class validator`),rf()(),Ra(600,`blockquote`,33)(601,`strong`),gT(602,`Warning`),rf(),gT(603,` The techniques in this section require TypeScript and are not available if your app is written in vanilla JavaScript. 2190`),rf(),Ra(604,`p`),gT(605,`This section presents an alternative implementation of our validation technique.`),rf(),Ra(606,`p`),gT(607,`Nest works well with the `),Ra(608,`a`,42),gT(609,`class-validator`),rf(),gT(610,` library, which provides decorator-based validation. Decorator-based validation pairs well with Nest's `),Ra(611,`strong`),gT(612,`pipe`),rf(),gT(613,` capabilities, because a pipe has access to the `),Ra(614,`code`),gT(615,`metatype`),rf(),gT(616,` of the processed argument. Before we start, install the required packages:`),rf(),Ra(617,`pre`)(618,`code`,26),gT
2190(619,` 2191$ npm i --save class-validator class-transformer 2192`),rf()(),Ra(620,`p`),gT(621,`Once these are installed, add a few decorators to the `),Ra(622,`code`),gT(623,`CreateCatDto`),rf(),gT(624,` class. This shows a significant advantage of the technique: the `),Ra(625,`code`),gT(626,`CreateCatDto`),rf(),gT(627,` class remains the single source of truth for the POST body object, so you don't need a separate validation class.`),rf(),Ra(628,`app-copy-button`,28)(629,`span`,29),gT(630),TT(631,`extension`),qa$1(632,`app-tabs`,null,7),rf(),Ra(634,`pre`)(635,`code`,25),gT(636,` 2193import { IsString, IsInt } from 'class-validator'; 2194 2195export class CreateCatDto { 2196 @IsString() 2197 name: string; 2198 2199 @IsInt() 2200 age: number; 2201 2202 @IsString() 2203 breed: string; 2204} 2205`),rf()()(),Ra(637,`blockquote`,21)(638,`strong`),gT(639,`Hint`),rf(),gT(640,` Read more about class-validator decorators in the `),Ra(641,`a`,43),gT(642,`class-validator documentation`),rf(),gT(643,`. 2206`),rf(),Ra(644,`p`),gT(645,`We can now create a `),Ra(646,`code`),gT(647,`ValidationPipe`),rf(),gT(648,` class that uses these decorators.`),rf(),Ra(649,`app-copy-button`,28)(650,`span`,29),gT(651),TT(652,`extension`),qa$1(653,`app-tabs`,null,8),rf(),Ra(655,`pre`)(656,`code`,25),gT(657,` 2207import { PipeTransform, Injectable, ArgumentMetadata, BadRequestException } from '@nestjs/common'; 2208import { validate } from 'class-validator'; 2209import { plainToInstance } from 'class-transformer'; 2210 2211@Injectable() 2212export class ValidationPipe implements PipeTransform<any> { 2213 async transform(value: any, { metatype }: ArgumentMetadata) { 2214 if (!metatype || !this.toValidate(metatype)) { 2215 return value; 2216 } 2217 const object = plainToInstance(metatype, value); 2218 const errors = await validate(object); 2219 if (errors.length > 0) { 2220 throw new BadRequestException('Validation failed'); 2221 } 2222 return value; 2223 } 2224 2225 private toValidate(metatype: Function): boolean { 2226 const types: Function[] = [String, Boolean, Number, Array, Object]; 2227 return !types.includes(metatype); 2228 } 2229} 2230`),rf()()(),Ra(658,`blockquote`,21)(659,`strong`),gT(660,`Hint`),rf(),gT(661,` This pipe is intentionally basic. You don't have to build a generic validation pipe yourself: Nest provides a more capable `),Ra(662,`code`),gT(663,`ValidationPipe`),rf(),gT(664,` out of the box, described at the end of this section. 2231`),rf(),Ra(665,`blockquote`,33)(666,`strong`),gT(667,`Notice`),rf(),gT(668,` The code above uses the `),Ra(669,`a`,44),gT(670,`class-transformer`),rf(),gT(671,` library, which is made by the same author as the `),Ra(672,`strong`),gT(673,`class-validator`),rf(),gT(674,` library, so the two work well together. 2232`),rf(),Ra(675,`p`),gT(676,`Let's go through this code. First, the `),Ra(677,`code`),gT(678,`transform()`),rf(),gT(679,` method is marked as `),Ra(680,`code`),gT(681,`async`),rf(),gT(682,`. This is possible because Nest supports both synchronous and `),Ra(683,`strong`),gT(684,`asynchronous`),rf(),gT(685,` pipes. We make this method `),Ra(686,`code`),gT(687,`async`),rf(),gT(688,` because some class-validator validations `),Ra(689,`a`,45),gT(690,`can be async`),rf(),gT(691,` (they return promises).`),rf(),Ra(692,`p`),gT(693,`Next, we use destructuring to extract the `),Ra(694,`code`),gT(695,`metatype`),rf(),gT(696,` field from the `),Ra(697,`code`),gT(698,`ArgumentMetadata`),rf(),gT(699,` object. This is shorthand for receiving the full `),Ra(700,`code`),gT(701,`ArgumentMetadata`),rf(),gT(702,` and then assigning the `),Ra(703,`code`),gT(704,`metatype`),rf(),gT(705,` variable in a separate statement.`),rf(),Ra(706,`p`),gT(707,`The helper method `),Ra(708,`code`),gT(709,`toValidate()`),rf(),gT(710,` skips validation when the argument being processed is a native JavaScript type. Native types can't have validation decorators attached, so there's no reason to validate them.`),rf(),Ra(711,`p`),gT(712,`Next, we use the class-transformer function `),Ra(713,`code`),gT(714,`plainToInstance()`),rf(),gT(715,` to transform the plain JavaScript argument object into a typed object so that we can apply validation. This is necessary because the incoming POST body, when deserialized from the network request, does `),Ra(716,`strong`),gT(717,`not have any type information`),rf(),gT(718,` (this is how the underlying platform, such as Express, works). Because class-validator relies on the validation decorators defined on the DTO earlier, we transform the incoming body into an instance of the decorated class rather than validating a plain object.`),rf(),Ra(719,`p`),gT(720,`Finally, because this is a `),Ra(721,`strong`),gT(722,`validation pipe`),rf(),gT(723,`, it either returns the value unchanged or throws an exception.`),rf(),Ra(724,`p`),gT(725,`The last step is to bind the `),Ra(726,`code`),gT(727,`ValidationPipe`),rf(),gT(728,`. Pipes can be parameter-scoped, method-scoped, controller-scoped, or global-scoped. Earlier, we bound the Zod-based validation pipe at the method level with `),Ra(729,`code`),gT(730,`@UsePipes()`),rf(),gT(731,`. In the example below, we bind the pipe instance to the route handler's `),Ra(732,`code`),gT(733,`@Body()`),rf(),gT(734,` decorator so that the pipe validates the POST body.`),rf(),Ra(735,`app-copy-button`,28)(736,`span`,29),gT(737),TT(738,`extension`),qa$1(739,`app-tabs`,null,9),rf(),Ra(741,`pre`)(742,`code`,25),gT(743,` 2233@Post() 2234async create( 2235 @Body(new ValidationPipe()) createCatDto: CreateCatDto, 2236) { 2237 this.catsService.create(createCatDto); 2238} 2239`),rf()()(),Ra(744,`p`),gT(745,`Parameter-scoped pipes are useful when the validation logic concerns only one parameter.`),rf(),Ra(746,`h4`,46)(747,`span`),gT(748,`Global scoped pipes`),rf()(),Ra(749,`p`),gT(750,`Because the `),Ra(751,`code`),gT(752,`ValidationPipe`),rf(),gT(753,` is designed to be as generic as possible, it is most useful as a `),Ra(754,`strong`),gT(755,`global-scoped`),rf(),gT(756,` pipe, applied to every route handler across the entire application.`),rf(),Ra(757,`app-copy-button`,28)(758,`span`,29),gT(759),TT(760,`extension`),qa$1(761,`app-tabs`,null,10),rf(),Ra(763,`pre`)(764,`code`,25),gT(765,`
2240async function bootstrap() { 2241 const app = await NestFactory.create(AppModule); 2242 app.useGlobalPipes(new ValidationPipe()); 2243 await app.listen(process.env.PORT ?? 3000); 2244} 2245await bootstrap(); 2246`),rf()()(),Ra(766,`blockquote`,33)(767,`strong`),gT(768,`Notice`),rf(),gT(769,` In a hybrid application, `),Ra(770,`code`),gT(771,`useGlobalPipes()`),rf(),gT(772,` doesn't set up pipes for connected microservices by default (see `),Ra(773,`a`,47),gT(774,`Hybrid application`),rf(),gT(775,` to change this behavior). In a standard (non-hybrid) microservice application, `),Ra(776,`code`),gT(777,`useGlobalPipes()`),rf(),gT(778,` does mount the pipes globally. 2247`),rf(),Ra(779,`p`),gT(780,`Global pipes registered outside of any module (with `),Ra(781,`code`),gT(782,`useGlobalPipes()`),rf(),gT(783,`, as in the example above) cannot inject dependencies, because the binding happens outside the context of any module. To solve this, you can register a global pipe `),Ra(784,`strong`),gT(785,`directly from any module`),rf(),gT(786,` using the following construction:`),rf(),Ra(787,`app-copy-button`,28)(788,`span`,29),gT(789),TT(790,`extension`),qa$1(791,`app-tabs`,null,11),rf(),Ra(793,`pre`)(794,`code`,25),gT(795,` 2248import { Module } from '@nestjs/common'; 2249import { APP_PIPE } from '@nestjs/core'; 2250 2251@Module({ 2252 providers: [ 2253 { 2254 provide: APP_PIPE, 2255 useClass: ValidationPipe, 2256 }, 2257 ], 2258}) 2259export class AppModule {} 2260`),rf()()(),Ra(796,`blockquote`,21)(797,`strong`),gT(798,`Hint`),rf(),gT(799,` When you use this approach to perform dependency injection for the pipe, the pipe is global regardless of the module in which you register it. Register it in the module where the pipe (`),Ra(800,`code`),gT(801,`ValidationPipe`),rf(),gT(802,` in the example above) is defined. `),Ra(803,`code`),gT(804,`useClass`),rf(),gT(805,` is not the only way to register a custom provider; learn more in `),Ra(806,`a`,48),gT(807,`Custom providers`),rf(),gT(808,`. 2261`),rf(),Ra(809,`h4`,49)(810,`span`),gT(811,`The built-in ValidationPipe`),rf()(),Ra(812,`p`),gT(813,`You don't have to build a generic validation pipe yourself: Nest provides `),Ra(814,`code`),gT(815,`ValidationPipe`),rf(),gT(816,` out of the box. The built-in `),Ra(817,`code`),gT(818,`ValidationPipe`),rf(),gT(819,` offers more options than the sample built in this chapter, which is kept basic to illustrate the mechanics of a custom pipe. For schema-based validation, Nest also provides the built-in `),Ra(820,`code`),gT(821,`StandardSchemaValidationPipe`),rf(),gT(822,`. See `),Ra(823,`a`,30),gT(824,`Validation techniques`),rf(),gT(825,` for full details and many examples.`),rf(),Ra(826,`h4`,50)(827,`span`),gT(828,`Transformation use case`),rf()(),Ra(829,`p`),gT(830,`Validation isn't the only use case for custom pipes. As mentioned at the beginning of this chapter, a pipe can also `),Ra(831,`strong`),gT(832,`transform`),rf(),gT(833,` input data to the desired format. This is possible because the value returned from the `),Ra(834,`code`),gT(835,`transform()`),rf(),gT(836,` method replaces the previous value of the argument.`),rf(),Ra(837,`p`),gT(838,`When is this useful? Sometimes the data passed from the client needs to be changed (for example, converted from a string to an integer) before the route handler can process it. Some required fields may also be missing, and you may want to apply default values. `),Ra(839,`strong`),gT(840,`Transformation pipes`),rf(),gT(841,` perform these functions by interposing a processing function between the client request and the route handler.`),rf(),Ra(842,`p`),gT(843,`Here's a simple `),Ra(844,`code`),gT(845,`ParseIntPipe`),rf(),gT(846,` that parses a string into an integer. (As noted above, Nest has a more sophisticated built-in `),Ra(847,`code`),gT(848,`ParseIntPipe`),rf(),gT(849,`; this is a simple example of a custom transformation pipe.)`),rf(),Ra(850,`app-copy-button`,28)(851,`span`,29),gT(852),TT(853,`extension`),qa$1(854,`app-tabs`,null,12),rf(),Ra(856,`pre`)(857,`code`,25),gT(858,` 2262import { PipeTransform, Injectable, ArgumentMetadata, BadRequestException } from '@nestjs/common'; 2263 2264@Injectable() 2265export class ParseIntPipe implements PipeTransform<string, number> { 2266 transform(value: string, metadata: ArgumentMetadata): number { 2267 const val = parseInt(value, 10); 2268 if (isNaN(val)) { 2269 throw new BadRequestException('Validation failed'); 2270 } 2271 return val; 2272 } 2273} 2274`),rf()(),Ra(859,`pre`)(860,`code`,25),gT(861,` 2275import { Injectable, BadRequestException } from '@nestjs/common'; 2276 2277@Injectable() 2278export class ParseIntPipe { 2279 transform(value, metadata) { 2280 const val = parseInt(value, 10); 2281 if (isNaN(val)) { 2282 throw new BadRequestException('Validation failed'); 2283 } 2284 return val; 2285 } 2286} 2287`),rf()()(),Ra(862,`p`),gT(863,`We can then bind this pipe to the selected parameter:`),rf(),Ra(864,`app-copy-button`,28)(865,`span`,29),qa$1(866,`app-tabs`,null,13),rf(),Ra(868,`pre`)(869,`code`,25),gT(870,` 2288@Get(':id') 2289async findOne(@Param('id', new ParseIntPipe()) id) { 2290 return this.catsService.findOne(id); 2291} 2292`),rf()(),Ra(871,`pre`)(872,`code`,25),gT(873,` 2293@Get(':id') 2294@Bind(Param('id', new ParseIntPipe())) 2295async findOne(id) { 2296 return this.catsService.findOne(id); 2297}
2298`),rf()()(),Ra(874,`p`),gT(875,`Another useful transformation is to look up an `),Ra(876,`strong`),gT(877,`existing user`),rf(),gT(878,` entity in the database using an ID supplied in the request:`),rf(),Ra(879,`app-copy-button`,28)(880,`span`,29),qa$1(881,`app-tabs`,null,14),rf(),Ra(883,`pre`)(884,`code`,25),gT(885,` 2299@Get(':id') 2300findOne(@Param('id', UserByIdPipe) userEntity: UserEntity) { 2301 return userEntity; 2302} 2303`),rf()(),Ra(886,`pre`)(887,`code`,25),gT(888,` 2304@Get(':id') 2305@Bind(Param('id', UserByIdPipe)) 2306findOne(userEntity) { 2307 return userEntity; 2308} 2309`),rf()()(),Ra(889,`p`),gT(890,`We leave the implementation of this pipe to the reader. Like all other transformation pipes, it receives an input value (an `),Ra(891,`code`),gT(892,`id`),rf(),gT(893,`) and returns an output value (a `),Ra(894,`code`),gT(895,`UserEntity`),rf(),gT(896,` object). This makes your code more declarative and `),Ra(897,`a`,38),gT(898,`DRY`),rf(),gT(899,` by moving boilerplate out of the route handler and into a reusable pipe.`),rf(),Ra(900,`h4`,51)(901,`span`),gT(902,`Providing defaults`),rf()(),Ra(903,`p`),gT(904,`By default, `),Ra(905,`code`),gT(906,`Parse*`),rf(),gT(907,` pipes expect a parameter's value to be defined and throw an exception when they receive `),Ra(908,`code`),gT(909,`null`),rf(),gT(910,` or `),Ra(911,`code`),gT(912,`undefined`),rf(),gT(913,` (unless you set their `),Ra(914,`code`),gT(915,`optional`),rf(),gT(916,` option to `),Ra(917,`code`),gT(918,`true`),rf(),gT(919,`). To let an endpoint handle missing query string parameters, provide a default value that is applied before the `),Ra(920,`code`),gT(921,`Parse*`),rf(),gT(922,` pipes operate on it. The `),Ra(923,`code`),gT(924,`DefaultValuePipe`),rf(),gT(925,` serves this purpose. Instantiate a `),Ra(926,`code`),gT(927,`DefaultValuePipe`),rf(),gT(928,` in the `),Ra(929,`code`),gT(930,`@Query()`),rf(),gT(931,` decorator before the relevant `),Ra(932,`code`),gT(933,`Parse*`),rf(),gT(934,` pipe, as shown below:`),rf(),Ra(935,`app-copy-button`,28)(936,`span`,29),qa$1(937,`app-tabs`,null,15),rf(),Ra(939,`pre`)(940,`code`,25),gT(941,` 2310@Get() 2311async findAll( 2312 @Query('activeOnly', new DefaultValuePipe(false), ParseBoolPipe) activeOnly: boolean, 2313 @Query('page', new DefaultValuePipe(0), ParseIntPipe) page: number, 2314) { 2315 return this.catsService.findAll({ activeOnly, page }); 2316} 2317`),rf()()()(),Ra(942,`a`,52),qa$1(943,`i`,53),Ra(944,`span`),gT(945,`Edit on GitHub`),rf()()()),a&2){let l=qS(177),d=qS(236),m=qS(407),h=qS(427),u=qS(501),b=qS(549),S=qS(633),k=qS(654),C=qS(740),w=qS(762),P=qS(792),F=qS(855),J=qS(867),Y=qS(882);LC(178),kv(`hide`,l.isJsActive),LC(3),kv(`hide`,!l.isJsActive),LC(52),uf(` `,MT(234,45,`validation.pipe`,d.isJsActive),` 2318`),LC(4),kv(`hide`,d.isJsActive),LC(3),kv(`hide`,!d.isJsActive),LC(103),Vv(`@Body(`,`{`,` schema `,`}`,`)`),LC(3),Vv(`@Param('id', `,`{`,` schema `,`}`,`)`),LC(62),kv(`hide`,m.isJsActive),LC(3),kv(`hide`,!m.isJsActive),LC(13),uf(` `,MT(425,48,`create-cat.dto`,h.isJsActive),` 2319`),LC(78),kv(`hide`,u.isJsActive),LC(3),kv(`hide`,!u.isJsActive),LC(41),uf(` `,MT(547,51,`cats.controller`,b.isJsActive),` 2320`),LC(4),kv(`hide`,b.isJsActive),LC(3),kv(`hide`,!b.isJsActive),LC(77),uf(` `,MT(631,54,`create-cat.dto`,S.isJsActive),` 2321`),LC(21),uf(` `,MT(652,57,`validation.pipe`,k.isJsActive),` 2322`),LC(86),uf(` `,MT(738,60,`cats.controller`,C.isJsActive),` 2323`),LC(22),uf(` `,MT(760,63,`main`,w.isJsActive),` 2324`),LC(30),uf(` `,MT(790,66,`app.module`,P.isJsActive),` 2325`),LC(63),uf(` `,MT(853,69,`parse-int.pipe`,F.isJsActive),` 2326`),LC(4),kv(`hide`,F.isJsActive),LC(3),kv(`hide`,!F.isJsActive),LC(9),kv(`hide`,J.isJsActive),LC(3),kv(`hide`,!J.isJsActive),LC(12),kv(`hide`,Y.isJsActive),LC(3),kv(`hide`,!Y.isJsActive)}},dependencies:[Kc,wt$1,en$1,u,l$1,g],encapsulation:2})}return o})();var na=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-support`]],features:[Iv],decls:40,vars:0,consts:[[`contentReference`,``],[1,`content`],[1,`content-inner`],[`id`,`support`],[`appAnchor`,``,`id`,`how-can-you-help`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://opencollective.com/nest`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://paypal.me/kamilmysliwiec`],[`href`,`mailto:[email protected]`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/support.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Ra(0,`div`,1,0)(2,`div`,2)(3,`h3`,3),gT(4,`Support`),rf(),Ra(5,`p`),gT(6,`Nest is an MIT-licensed open source project whose ongoing development is made possible by the support of the community. The framework is the result of a long road of sleepless nights, work `),Ra(7,`strong`),gT(8,`after hours`),rf(),gT(9,`, and busy weekends.`),rf(),Ra(10,`h4`,4)(11,`span`),gT(12,`How can you help?`),rf()(),Ra(13,`p`),gT(14,`Nest isn't backed by a large company that continuously pays for the hours spent on its development. I rely entirely on the `),Ra(15,`strong`),gT(16,`goodness`),rf(),gT(17,` â¤ï¸ of the community. I would love to make the framework even better and stay fully focused on delivering solutions that make coding enjoyable. To make that possible, I run a few support platforms:`),rf(),Ra(18,`ul`)(19,`li`),gT(20,`become a backer or sponsor on `),Ra(21,`a`,5),gT(22,`OpenCollective`),rf()(),Ra(23,`li`),gT(24,`send a one-time donation via `),Ra(25,`a`,6),gT(26,`PayPal`),rf()(),Ra(27,`li`),gT(28,`or reach me directly at `),Ra(29,`a`,7),gT(30,`[email protected]`),rf()()(),Ra(31,`p`),gT(32,`If you love Nest, or your business uses it, consider sponsoring its development to ensure that the project your product relies on is `),Ra(33,`strong`),gT(34,`actively maintained`),rf(),gT(35,` and improved. Your support also helps me create more content for the whole Nest community, such as educational blog posts and videos.`),rf()(),Ra(36,`a`,8),qa$1(37,`i`,9),Ra(38,`span`),gT(39,`Edit on GitHub`),rf()()())},dependencies:[wt$1],encapsulation:2})}return o}
2326)();var ia=o=>(window.location.href=o.data.externalUrl,!0);var ra=(()=>{class o extends Et{static ɵfac=(()=>{let i;return function(s){return(i||(i=Qg(o)))(s||o)}})();static ɵcmp=Qd({type:o,selectors:[[`app-deployment`]],features:[Iv],decls:634,vars:0,consts:[[`contentReference`,``],[1,`content`],[1,`content-inner`],[`id`,`deployment`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://mau.nestjs.com/`,`title`,`Deploy Nest`],[`href`,`/deployment#easy-deployment-with-mau`],[`appAnchor`,``,`id`,`prerequisites`],[`href`,`/first-steps#prerequisites`],[1,`info`],[`appAnchor`,``,`id`,`building-your-application`],[1,`language-bash`],[`appAnchor`,``,`id`,`production-environment`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://aws.amazon.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://azure.microsoft.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://cloud.google.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.hetzner.com/`],[`appAnchor`,``,`id`,`node_envproduction`],[`appAnchor`,``,`id`,`running-your-application`],[`appAnchor`,``,`id`,`health-checks`],[`routerLink`,`/recipes/terminus`],[`appAnchor`,``,`id`,`logging`],[`routerLink`,`/application/logger`],[`appAnchor`,``,`id`,`observability`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.observe.nestjs.com/`,`title`,`NestJS Observe`],[1,`language-typescript`],[`routerLink`,`/observability/overview`],[`appAnchor`,``,`id`,`scaling-up-or-out`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.docker.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://kubernetes.io/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://aws.amazon.com/elasticloadbalancing/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://azure.microsoft.com/en-us/services/load-balancer/`],[`appAnchor`,``,`id`,`some-other-tips`],[`routerLink`,`/security/helmet`],[`routerLink`,`/security/cors`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://prometheus.io/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://newrelic.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://aws.amazon.com/cloudwatch/`],[`routerLink`,`/security/rate-limiting`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://aws.amazon.com/waf/`],[`appAnchor`,``,`id`,`dockerizing-your-application`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://www.docker.com/get-started`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://hub.docker.com/_/node`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://hub.docker.com/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://aws.amazon.com/ecr/`],[`rel`,`nofollow`,`target`,`_blank`,`href`,`https://cloud.google.com/artifact-registry`],[`appAnchor`,``,`id`,`easy-deployment-with-mau`],[`id`,`deploying`],[`href`,`/cli/usages#nest-deploy`],[`id`,`why-mau`],[`src`,`https://www.mau.nestjs.com/docs/applications/dashboard.png`],[`id`,`how-mau-maps-to-this-guide`],[`href`,`/deployment#node_envproduction`],[`href`,`/deployment#logging`],[`href`,`/application/logger`],[`href`,`/deployment#scaling-up-or-out`],[`href`,`/deployment#health-checks`],[`href`,`/recipes/terminus`],[`href`,`/deployment#some-other-tips`],[`href`,`https://github.com/nestjs/docs.nestjs.com/edit/master/content/deployment.md`,`target`,`_blank`,`rel`,`noopener`,1,`github-links`],[`aria-hidden`,`true`,1,`ph`,`ph-pencil-simple-line`]],template:function(a,s){a&1&&(Ra(0,`div`,1,0)(2,`div`,2)(3,`h3`,3),gT(4,`Deployment`),rf(),Ra(5,`p`),gT(6,`When you're ready to deploy your NestJS application to production, there are key steps you can take to ensure it runs as efficiently as possible. This guide covers essential tips and best practices for deploying your NestJS application successfully.`),rf(),Ra(7,`p`),gT(8,`If you'd rather not manage infrastructure yourself, `),Ra(9,`a`,4),gT(10,`Mau`),rf(),gT(11,`, our official deployment platform, gets you to production on AWS with a single command. Jump straight to `),Ra(12,`a`,5),gT(13,`Easy deployment with Mau`),rf(),gT(14,`, or read on for the underlying concepts that apply to any hosting choice.`),rf(),Ra(15,`h4`,6)(16,`span`),gT(17,`Prerequisites`),rf()(),Ra(18,`p`),gT(19,`Before deploying your NestJS application, ensure you have:`),rf(),Ra(20,`ul`)(21,`li`),gT(22,`A working NestJS application that is ready for deployment.`),rf(),Ra(23,`li`),gT(24,`Access to a deployment platform or server where you can host your application.`),rf(),Ra(25,`li`),gT(26,`All necessary environment variables set up for your application.`),rf(),Ra(27,`li`),gT(28,`Any required services, like a database, set up and ready to go.`),rf(),Ra(29,`li`),gT(30,`Node.js 20.19 or later (22.12 or later on the 22.x line) installed on your deployment platform, as described
2326in `),Ra(31,`a`,7),gT(32,`Prerequisites`),rf(),gT(33,`. Prefer a Node.js version that is still in active LTS.`),rf()(),Ra(34,`blockquote`,8)(35,`strong`),gT(36,`Hint`),rf(),gT(37,` With `),Ra(38,`a`,4),gT(39,`Mau`),rf(),gT(40,`, most of the list above is handled for you: it provisions the server, the databases and brokers your app needs, and the environment variables, so the only prerequisite left is the application itself. 2327`),rf(),Ra(41,`h4`,9)(42,`span`),gT(43,`Building your application`),rf()(),Ra(44,`p`),gT(45,`To build your NestJS application, compile your TypeScript code into JavaScript. This process generates a `),Ra(46,`code`),gT(47,`dist`),rf(),gT(48,` directory containing the compiled files. Build your application by running the following command:`),rf(),Ra(49,`pre`)(50,`code`,10),gT(51,` 2328$ npm run build 2329`),rf()(),Ra(52,`p`),gT(53,`This command typically runs `),Ra(54,`code`),gT(55,`nest build`),rf(),gT(56,` under the hood, which is a wrapper around the TypeScript compiler with some additional features (such as copying assets). If you have a custom build script, you can run it directly. For Nest CLI monorepos, pass the name of the project to build as an argument (`),Ra(57,`code`),gT(58,`npm run build my-app`),rf(),gT(59,`).`),rf(),Ra(60,`p`),gT(61,`After a successful compilation, you should see a `),Ra(62,`code`),gT(63,`dist`),rf(),gT(64,` directory in your project root containing the compiled files, with `),Ra(65,`code`),gT(66,`main.js`),rf(),gT(67,` as the entry point. If you have any `),Ra(68,`code`),gT(69,`.ts`),rf(),gT(70,` files in the root directory of your project (and your `),Ra(71,`code`),gT(72,`tsconfig.json`),rf(),gT(73,` is configured to compile them), they are compiled into the `),Ra(74,`code`),gT(75,`dist`),rf(),gT(76,` directory as well, which changes the directory structure: instead of `),Ra(77,`code`),gT(78,`dist/main.js`),rf(),gT(79,`, you get `),Ra(80,`code`),gT(81,`dist/src/main.js`),rf(),gT(82,`. Keep that in mind when configuring your server.`),rf(),Ra(83,`h4`,11)(84,`span`),gT(85,`Production environment`),rf()(),Ra(86,`p`),gT(87,`Your production environment is where your application is accessible to external users. This could be a cloud-based platform like `),Ra(88,`a`,12),gT(89,`AWS`),rf(),gT(90,` (with EC2, ECS, etc.), `),Ra(91,`a`,13),gT(92,`Azure`),rf(),gT(93,`, or `),Ra(94,`a`,14),gT(95,`Google Cloud`),rf(),gT(96,`, or a dedicated server you manage, such as `),Ra(97,`a`,15),gT(98,`Hetzner`),rf(),gT(99,`.`),rf(),Ra(100,`p`),gT(101,`To simplify the deployment process and avoid manual setup, you can use `),Ra(102,`a`,4),gT(103,`Mau`),rf(),gT(104,`, our official platform for deploying NestJS applications on AWS. It gives you the benefits of AWS listed below without requiring you to configure any of it yourself. See `),Ra(105,`a`,5),gT(106,`Easy deployment with Mau`),rf(),gT(107,` for details.`),rf(),Ra(108,`p`),gT(109,`Some of the pros of using a `),Ra(110,`strong`),gT(111,`cloud-based platform`),rf(),gT(112,` or service like `),Ra(113,`a`,4),gT(114,`Mau`),rf(),gT(115,` include:`),rf(),Ra(116,`ul`)(117,`li`),gT(118,`Scalability: Scale your application as your user base grows.`),rf(),Ra(119,`li`),gT(120,`Security: Benefit from built-in security features and compliance certifications.`),rf(),Ra(121,`li`),gT(122,`Monitoring: Monitor your application's performance and health in real time.`),rf(),Ra(123,`li`),gT(124,`Reliability: Ensure your application is always available with high uptime guarantees.`),rf()(),Ra(125,`p`),gT(126,`On the other hand, cloud-based platforms are typically more expensive than self-hosting, and you may have less control over the underlying infrastructure. A simple VPS can be a good choice if you're looking for a more cost-effective solution and have the technical expertise to manage the server yourself. Keep in mind that you'll need to handle tasks like server maintenance, security, and backups manually.`),rf(),Ra(127,`h4`,16)(128,`span`),gT(129,`NODE_ENV=production`),rf()(),Ra(130,`p`),gT(131,`While there's technically no difference between development and production in Node.js and NestJS, it's good practice to set the `),Ra(132,`co
2329de`),gT(133,`NODE_ENV`),rf(),gT(134,` environment variable to `),Ra(135,`code`),gT(136,`production`),rf(),gT(137,` when running your application in a production environment, because some libraries in the ecosystem behave differently based on this variable (e.g., enabling or disabling debugging output).`),rf(),Ra(138,`p`),gT(139,`You can set the `),Ra(140,`code`),gT(141,`NODE_ENV`),rf(),gT(142,` environment variable when starting your application:`),rf(),Ra(143,`pre`)(144,`code`,10),gT(145,` 2330$ NODE_ENV=production node dist/main.js 2331`),rf()(),Ra(146,`p`),gT(147,`Alternatively, set it in your cloud provider's or Mau's dashboard.`),rf(),Ra(148,`h4`,17)(149,`span`),gT(150,`Running your application`),rf()(),Ra(151,`p`),gT(152,`To run your NestJS application in production, use the following command:`),rf(),Ra(153,`pre`)(154,`code`,10),gT(155,` 2332$ node dist/main.js # Adjust this based on your entry point location 2333`),rf()(),Ra(156,`p`),gT(157,`This command starts your application, which listens on the port passed to `),Ra(158,`code`),gT(159,`app.listen()`),rf(),gT(160,` (`),Ra(161,`code`),gT(162,`3000`),rf(),gT(163,` in newly generated projects, unless the `),Ra(164,`code`),gT(165,`PORT`),rf(),gT(166,` environment variable is set). Make sure your deployment platform routes traffic to that port.`),rf(),Ra(167,`p`),gT(168,`Alternatively, you can use the `),Ra(169,`code`),gT(170,`nest start`),rf(),gT(171,` command. It is a wrapper around `),Ra(172,`code`),gT(173,`node dist/main.js`),rf(),gT(174,`, with one key difference: it runs `),Ra(175,`code`),gT(176,`nest build`),rf(),gT(177,` before starting the application, so you don't need to run `),Ra(178,`code`),gT(179,`npm run build`),rf(),gT(180,` manually.`),rf(),Ra(181,`h4`,18)(182,`span`),gT(183,`Health checks`),rf()(),Ra(184,`p`),gT(185,`Health checks are essential for monitoring the health and status of your NestJS application in production. With a health check endpoint, you can regularly verify that your app is running as expected and respond to issues before they become critical.`),rf(),Ra(186,`p`),gT(187,`In NestJS, you can implement health checks with the `),Ra(188,`strong`),gT(189,`@nestjs/terminus`),rf(),gT(190,` package, which supports checks for database connections, external services, and custom indicators.`),rf(),Ra(191,`p`),gT(192,`See the `),Ra(193,`a`,19),gT(194,`health checks (Terminus)`),rf(),gT(195,` recipe to learn how to implement health checks in your NestJS application.`),rf(),Ra(196,`h4`,20)(197,`span`),gT(198,`Logging`),rf()(),Ra(199,`p`),gT(200,`Logging is essential for any production-ready application. It helps you track errors, monitor behavior, and troubleshoot issues. In NestJS, you can manage logging with the `),Ra(201,`a`,21),gT(202,`built-in logger`),rf(),gT(203,`, or opt for external libraries if you need more advanced features.`),rf(),Ra(204,`p`),gT(205,`Best practices for logging:`),rf(),Ra(206,`ul`)(207,`li`),gT(208,`Log errors, not exceptions: Focus on logging detailed error messages to speed up debugging and issue resolution.`),rf(),Ra(209,`li`),gT(210,`Avoid sensitive data: Never log sensitive information such as passwords or tokens.`),rf(),Ra(211,`li`),gT(212,`Use correlation IDs: In distributed systems, include unique identifiers (like correlation IDs) in your logs to trace requests across services.`),rf(),Ra(213,`li`),gT(214,`Use log levels: Categorize logs by severity (e.g., `),Ra(215,`code`),gT(216,`info`),rf(),gT(217,`, `),Ra(218,`code`),gT(219,`warn`),rf(),gT(220,`, `),Ra(221,`code`),gT(222,`error`),rf(),gT(223,`), and disable debug or verbose logs in production to reduce noise.`),rf()(),Ra(224,`blockquote`,8)(225,`strong`),gT(226,`Hint`),rf(),gT(227,` If you're using `),Ra(228,`a`,12),gT(229,`AWS`),rf(),gT(230,` (with `),Ra(231,`a`,4),gT(232,`Mau`),rf(),gT(233,` or directly), consider JSON logging to make it easier to parse and analyze your logs. 2334`),rf(),Ra(234,`p`),gT(235,`For distributed applications, a centralized logging service such as Elasticsearch, Loggly, or Datadog is very useful. These tools offer log aggregation, search, and visualization, making it easier to monitor and analyze your application's performance and behavior.`),rf(),Ra(236,`h4`,22)(237,`span`),gT(238,`Observability`),rf()(),Ra(239,`p`),gT(240,`Health checks and logs tell you whether the application is up; they don't tell you which route got slower after the last deploy, which class is burning the time, or which line threw. For that, instrument the application with `),Ra(241,`a`,23),gT(242,`NestJS Observe`),rf(),gT(243,`, our official observability platform: install the `),Ra(244,`code`),gT(245,`@nestjs/observe`),rf(),gT(246,` SDK, pass an API key, and requests, jobs, errors, logs, and traces start streaming to a dashboard with no manual span wiring or collector to run.`),rf(),Ra(247,`app-copy-button`)(248,`pre`)(249,`code`,24),gT(250,` 2335const app = await NestFactory.create(AppModule, { 2336 instrument: ObserveInstrument, 2337}); 2338`),rf()()(),Ra(251,`p`),gT(252,`See the `),Ra(253,`a`,25),gT(254,`Observability`),rf(),gT(255,` chapter for the full setup, including versioning deployments with `),Ra(256,`code`),gT(257,`serviceVersion`),rf(),gT(258,` so each release is compared against the one before it.`),rf(),Ra(259,`h4`,26)(260,`span`),gT(261,`Scaling up or out`),rf()(),Ra(262,`p`),gT(263,`Scaling your NestJS application effectively is crucial for handling increased traffic and ensuring optimal performance. There are two primary strategies for scaling: `),Ra(264,`strong`),gT(265,`vertical scaling`),rf(),gT(266,` and `),Ra(267,`strong`),gT(268,`horizontal scaling`),rf(),gT(269,`. Understanding both helps you design your application to manage load efficie
2338ntly.`),rf(),Ra(270,`p`)(271,`strong`),gT(272,`Vertical scaling`),rf(),gT(273,`, often referred to as "scaling up", involves increasing the resources of a single server to improve its performance. This could mean adding more CPU, RAM, or storage to your existing machine. Key points to consider:`),rf(),Ra(274,`ul`)(275,`li`),gT(276,`Simplicity: Vertical scaling is generally simpler to implement since you only need to upgrade your existing server rather than manage multiple instances.`),rf(),Ra(277,`li`),gT(278,`Limitations: There are physical limits to how much you can scale a single machine. Once you reach the maximum capacity, you may need to consider other options.`),rf(),Ra(279,`li`),gT(280,`Cost-effectiveness: For applications with moderate traffic, vertical scaling can be cost-effective, as it reduces the need for additional infrastructure.`),rf()(),Ra(281,`p`),gT(282,`Example: If your NestJS app is hosted on a virtual machine and you notice that it's running slowly during peak hours, you can upgrade the VM to a larger instance with more resources, typically by selecting a larger instance type in your provider's dashboard.`),rf(),Ra(283,`p`)(284,`strong`),gT(285,`Horizontal scaling`),rf(),gT(286,`, or "scaling out", involves adding more servers or instances to distribute the load. This strategy is widely used in cloud environments and is essential for applications expecting high traffic. Benefits and considerations:`),rf(),Ra(287,`ul`)(288,`li`),gT(289,`Increased capacity: By adding more instances of your application, you can handle a larger number of concurrent users without degrading performance.`),rf(),Ra(290,`li`),gT(291,`Redundancy: The failure of one server doesn't bring down your entire application, because traffic can be redistributed among the remaining servers.`),rf(),Ra(292,`li`),gT(293,`Load balancing: To manage multiple instances effectively, use load balancers (like Nginx or AWS Elastic Load Balancing) to distribute incoming traffic evenly across your servers.`),rf()(),Ra(294,`p`),gT(295,`Example: For a NestJS application experiencing high traffic, you can deploy multiple instances of your app in a cloud environment and use a load balancer to route requests, ensuring that no single instance becomes a bottleneck.`),rf(),Ra(296,`p`),gT(297,`Containerization technologies like `),Ra(298,`a`,27),gT(299,`Docker`),rf(),gT(300,` and container orchestration platforms such as `),Ra(301,`a`,28),gT(302,`Kubernetes`),rf(),gT(303,` make this process straightforward. You can also use cloud-specific load balancers like `),Ra(304,`a`,29),gT(305,`AWS Elastic Load Balancing`),rf(),gT(306,` or `),Ra(307,`a`,30),gT(308,`Azure Load Balancer`),rf(),gT(309,` to distribute traffic across your application instances.`),rf(),Ra(310,`blockquote`,8)(311,`strong`),gT(312,`Hint`),rf(),Ra(313,`a`,4),gT(314,`Mau`),rf(),gT(315,` offers built-in support for horizontal scaling on AWS, so you can deploy multiple instances of your NestJS application and manage them with just a few clicks. 2339`),rf(),Ra(316,`h4`,31)(317,`span`),gT(318,`Some other tips`),rf()(),Ra(319,`p`),gT(320,`Keep these additional tips in mind when deploying your NestJS application:`),rf(),Ra(321,`ul`)(322,`li`)(323,`strong`),gT(324,`Security`),rf(),gT(325,`: Protect your application from common threats such as SQL injection and XSS. See the chapters in the "Security" category, such as `),Ra(326,`a`,32),gT(327,`Helmet`),rf(),gT(328,` and `),Ra(329,`a`,33),gT(330,`CORS`),rf(),gT(331,`, for details.`),rf(),Ra(332,`li`)(333,`strong`),gT(334,`Monitoring`),rf(),gT(335,`: Use monitoring tools like `),Ra(336,`a`,34),gT(337,`Prometheus`),rf(),gT(338,` or `),Ra(339,`a`,35),gT(340,`New Relic`),rf(),gT(341,` to track your application's performance and health. Cloud providers and Mau may offer built-in monitoring services (such as `),Ra(342,`a`,36),gT(343,`AWS CloudWatch`),rf(),gT(344,`).`),rf(),Ra(345,`li`)(346,`strong`),gT(347,`Do not hardcode environment variables`),rf(),gT(348,`: Avoid hardcoding sensitive information like API keys, passwords, or tokens in your code. Use environment variables or a secrets manager to store and access these values securely.`),rf(),Ra(349,`li`)(350,`strong`),gT(351,`Backups`),rf(),gT(352,`: Regularly back up your data to prevent data loss in case of an incident.`),rf(),Ra(353,`li`)(354,`strong`),gT(355,`Automate deployments`),rf(),gT(356,`: Use CI/CD pipelines to automate your deployment process and ensure consistency across environments.`),rf(),Ra(357,`li`)(358,`strong`),gT(359,`Rate limiting`),rf(),gT(360,`: Implement rate limiting to prevent abuse and protect your application from DDoS attacks. See the `),Ra(361,`a`,37),gT(362,`rate limiting`),rf(),gT(363,` chapter for details, or use a service like `),Ra(364,`a`,38),gT(365,`AWS WAF`),rf(),gT(366,` for advanced protection.`),rf()(),Ra(367,`h4`,39)(368,`span`),gT(369,`Dockerizing your application`),rf()(),Ra(370,`p`)(371,`a`,27),gT(372,`Docker`),rf(),gT(373,` is a platform that uses containerization to let developers package applications along with their dependencies into a standardized unit called a container. Containers are lightweight, portable, and isolated, which makes them ideal for deploying applications in various environments, from local development to production.`),rf(),Ra(374,`p`),gT(375,`Benefits of Dockerizing your NestJS application:`),rf(),Ra(376,`ul`)(377,`li`),gT(378,`Consistency: Docker ensures that your application runs the same way on any machine, eliminating the "it works on my machine" problem.`),rf(),Ra(379,`li`),gT(380,`Isolation: Each container runs in its own isolated environment, preventing conflicts between dependencies.`),rf(),Ra(381,`li`),gT(382,`Scalability: You can scale your application by running multiple containers across different machines or cloud instances.`),rf(),Ra(383,`li`),gT(384,`Portability: Containers move between environments without changes, so you can deploy your application on different platforms.`),rf()(),Ra(385,`p`),gT(386,`To install Docker, follow the instructions on the `),Ra(387,`a`,40),gT(388,`Docker website`),rf(),gT(389,`. Once Docker is installed, create a `),Ra(390,`code`),gT(391,`Dockerfile`),rf(),gT(392,` in your NestJS project. It is a text file that contains the instructions Docker uses to build your container image.`),rf(),Ra(393,`p`),gT(394,`Here's a sample `),Ra(395,`code`),gT(396,`Dockerfile`),rf(),gT(397,` for a NestJS application:`),rf(),Ra(398,`pre`)(399,`code`,10),gT(400,` 2340# Use the official Node.js image as the base image 2341FROM node:24 2342 2343# Set the working directory inside the container 2344WORKDIR /usr/src/app 2345 2346# Copy package.json and package-lock.json to the working directory 2347COPY package*.json ./ 2348 2349# Install the application dependencies 2350RUN npm install 2351 2352# Copy the rest of the application files 2353COPY . . 2354 2355# Build the NestJS application 2356RUN npm run build 2357 2358# Expose the application port 2359EXPOSE 3000 2360
2361# Command to run the application 2362CMD ["node", "dist/main"] 2363`),rf()(),Ra(401,`blockquote`,8)(402,`strong`),gT(403,`Hint`),rf(),gT(404,` Replace `),Ra(405,`code`),gT(406,`node:24`),rf(),gT(407,` with the Node.js version your project uses (NestJS v12 requires Node.js 20.19 or later, or 22.12 or later on the 22.x line). You can find the available Node.js Docker images in the `),Ra(408,`a`,41),gT(409,`official Docker Hub repository`),rf(),gT(410,`. 2364`),rf(),Ra(411,`p`),gT(412,`This basic `),Ra(413,`code`),gT(414,`Dockerfile`),rf(),gT(415,` sets up a Node.js environment, installs the application dependencies, builds the NestJS application, and runs it. You can customize it based on your project requirements (e.g., use a different base image, optimize the build process, or install only production dependencies).`),rf(),Ra(416,`p`),gT(417,`Next, create a `),Ra(418,`code`),gT(419,`.dockerignore`),rf(),gT(420,` file in your project root to specify which files and directories Docker should ignore when building the image:`),rf(),Ra(421,`pre`)(422,`code`,10),gT(423,` 2365node_modules 2366dist 2367*.log 2368*.md 2369.git 2370`),rf()(),Ra(424,`p`),gT(425,`This file keeps unnecessary files out of the container image, keeping it lightweight. With the `),Ra(426,`code`),gT(427,`Dockerfile`),rf(),gT(428,` in place, you can build your Docker image. Open your terminal, navigate to your project directory, and run the following command:`),rf(),Ra(429,`pre`)(430,`code`,10),gT(431,` 2371docker build -t my-nestjs-app . 2372`),rf()(),Ra(432,`p`),gT(433,`In this command:`),rf(),Ra(434,`ul`)(435,`li`)(436,`code`),gT(437,`-t my-nestjs-app`),rf(),gT(438,`: Tags the image with the name `),Ra(439,`code`),gT(440,`my-nestjs-app`),rf(),gT(441,`.`),rf(),Ra(442,`li`)(443,`code`),gT(444,`.`),rf(),gT(445,`: Indicates the current directory as the build context.`),rf()(),Ra(446,`p`),gT(447,`After building the image, run it as a container:`),rf(),Ra(448,`pre`)(449,`code`,10),gT(450,` 2373docker run -p 3000:3000 my-nestjs-app 2374`),rf()(),Ra(451,`p`),gT(452,`In this command:`),rf(),Ra(453,`ul`)(454,`li`)(455,`code`),gT(456,`-p 3000:3000`),rf(),gT(457,`: Maps port 3000 on your host machine to port 3000 in the container.`),rf(),Ra(458,`li`)(459,`code`),gT(460,`my-nestjs-app`),rf(),gT(461,`: Specifies the image to run.`),rf()(),Ra(462,`p`),gT(463,`Your NestJS application should now be running inside a Docker container.`),rf(),Ra(464,`p`),gT(465,`To deploy your Docker image to a cloud provider or share it with others, push it to a container registry (such as `),Ra(466,`a`,42),gT(467,`Docker Hub`),rf(),gT(468,`, `),Ra(469,`a`,43),gT(470,`Amazon ECR`),rf(),gT(471,`, or `),Ra(472,`a`,44),gT(473,`Google Artifact Registry`),rf(),gT(474,`).`),rf(),Ra(475,`p`),gT(476,`Once you've chosen a registry, push your image:`),rf(),Ra(477,`pre`)(478,`code`,10),gT(479,` 2375docker login # Log in to your Docker registry 2376docker tag my-nestjs-app your-dockerhub-username/my-nestjs-app # Tag your image 2377docker push your-dockerhub-username/my-nestjs-app # Push your image 2378`),rf()(),Ra(480,`p`),gT(481,`Replace `),Ra(482,`code`),gT(483,`your-dockerhub-username`),rf(),gT(484,` with your Docker Hub username or the appropriate registry URL. After pushing your image, you can pull it on any machine and run it as a container.`),rf(),Ra(485,`p`),gT(486,`Cloud providers like AWS, Azure, and Google Cloud offer managed container services that simplify deploying and managing containers at scale. These services provide features like auto-scaling, load balancing, and monitoring for your NestJS application in production.`),rf(),Ra(487,`h4`,45)(488,`span`),gT(489,`Easy deployment with Mau`),rf()(),Ra(490,`p`)(491,`a`,4),gT(492,`Mau`),rf(),gT(493,` is our official platform for deploying NestJS applications on `),Ra(494,`a`,12),gT(495,`AWS`),rf(),gT(496,`. It handles everything the previous sections described (provisioning the server, wiring up databases and brokers, managing environment variables, scaling, monitoring, and CI/CD), so you don't have to assemble it yourself.`),rf(),Ra(497,`h5`,46),gT(498,`Deploying`),rf(),Ra(499,`p`),gT(500,`As of NestJS v12, the Nest CLI ships a `),Ra(501,`code`),gT(502,`deploy`),rf(),gT(503,` command. Run it from your project root:`),rf(),Ra(504,`pre`)(505,`code`,10),gT(506,` 2379$ nest deploy 2380`),rf()(),Ra(507,`p`),gT(508,`If Mau isn't installed yet, the command offers to add `),Ra(509,`code`),gT(510,`@nestjs/mau`),rf(),gT(511,` as a dev dependency and then continues. Any options you pass are forwarded to `),Ra(512,`code`),gT(513,`mau deploy`),rf(),gT(514,`. See `),Ra(515,`a`,47),gT(516,`nest deploy`),rf(),gT(517,` for details.`),rf(),Ra(518,`p`),gT(519,`You can also install the Mau CLI globally and invoke it directly. This is the right choice for CI environments, where interactive prompts aren't available:`),rf(),Ra(520,`pre`)(521,`code`,10),gT(522,` 2381$ npm install -g @nestjs/mau 2382$ mau deploy
2383`),rf()(),Ra(523,`p`),gT(524,`Once the deployment completes, your application is live on AWS, typically within minutes of your first run.`),rf(),Ra(525,`h5`,48),gT(526,`Why Mau`),rf(),Ra(527,`p`),gT(528,`With Mau, provisioning and maintaining your infrastructure takes just a few clicks. Under the hood, Mau uses `),Ra(529,`strong`),gT(530,`Amazon Web Services`),rf(),gT(531,` to give you a powerful and reliable platform, while abstracting away the complexity of AWS. You get the advantages of AWS without having to learn and manage its details, which makes Mau a good fit for startups, small-to-medium businesses, large enterprises, and any developer who would rather ship than configure infrastructure.`),rf(),Ra(532,`figure`),qa$1(533,`img`,49),rf(),Ra(534,`p`),gT(535,`With `),Ra(536,`a`,4),gT(537,`Mau`),rf(),gT(538,`, you can:`),rf(),Ra(539,`ul`)(540,`li`),gT(541,`Deploy your NestJS applications with just a few clicks (APIs, microservices, etc.).`),rf(),Ra(542,`li`),gT(543,`Provision `),Ra(544,`strong`),gT(545,`databases`),rf(),gT(546,` such as:`),Ra(547,`ul`)(548,`li`),gT(549,`PostgreSQL`),rf(),Ra(550,`li`),gT(551,`MySQL`),rf(),Ra(552,`li`),gT(553,`MongoDB (DocumentDB)`),rf(),Ra(554,`li`),gT(555,`Redis`),rf(),Ra(556,`li`),gT(557,`more`),rf()()(),Ra(558,`li`),gT(559,`Set up broker services like:`),Ra(560,`ul`)(561,`li`),gT(562,`RabbitMQ`),rf(),Ra(563,`li`),gT(564,`Kafka`),rf(),Ra(565,`li`),gT(566,`NATS`),rf()()(),Ra(567,`li`),gT(568,`Deploy scheduled tasks (`),Ra(569,`strong`),gT(570,`CRON jobs`),rf(),gT(571,`) and background workers.`),rf(),Ra(572,`li`),gT(573,`Deploy lambda functions and serverless applications.`),rf(),Ra(574,`li`),gT(575,`Set up `),Ra(576,`strong`),gT(577,`CI/CD pipelines`),rf(),gT(578,` for automated deployments.`),rf(),Ra(579,`li`),gT(580,`And much more.`),rf()(),Ra(581,`h5`,50),gT(582,`How Mau maps to this guide`),rf(),Ra(583,`p`),gT(584,`Each topic covered earlier in this chapter has a managed equivalent in Mau:`),rf(),Ra(585,`table`)(586,`tr`)(587,`td`)(588,`a`,51),gT(589,`Environment variables`),rf()(),Ra(590,`td`),gT(591,`Set `),Ra(592,`code`),gT(593,`NODE_ENV`),rf(),gT(594,` and your secrets in the Mau dashboard instead of managing them on the server.`),rf()(),Ra(595,`tr`)(596,`td`)(597,`a`,52),gT(598,`Logging`),rf()(),Ra(599,`td`),gT(600,`Logs are collected and viewable in the dashboard. JSON logging is especially useful here; see the `),Ra(601,`a`,53),gT(602,`Logger chapter`),rf(),gT(603,`.`),rf()(),Ra(604,`tr`)(605,`td`)(606,`a`,54),gT(607,`Scaling`),rf()(),Ra(608,`td`),gT(609,`Built-in support for horizontal scaling: run multiple instances of your application and manage them from the dashboard.`),rf()(),Ra(610,`tr`)(611,`td`)(612,`a`,55),gT(613,`Health checks`),rf()(),Ra(614,`td`),gT(615,`Point Mau at the endpoint you expose with `),Ra(616,`a`,56),gT(617,`Terminus`),rf(),gT(618,` and unhealthy instances are handled for you.`),rf()(),Ra(619,`tr`)(620,`td`)(621,`a`,57),gT(622,`Monitoring and backups`),rf()(),Ra(623,`td`),gT(624,`Metrics come from AWS CloudWatch, and managed databases are backed up automatically.`),rf()()(),Ra(625,`p`),gT(626,`Sign up today and `),Ra(627,`a`,4),gT(628,`deploy with Mau`),rf(),gT(629,` to get your NestJS applications up and running on AWS in minutes.`),rf()(),Ra(630,`a`,58),qa$1(631,`i`,59),Ra(632,`span`),gT(633,`Edit on GitHub`),rf()()())},dependencies:[wt$1,en$1,Kc],encapsulation:2})}return o})();var Go=[{path:``,component:Br,children:[{path:``,component:$r},{path:`first-steps`,component:Vr,data:{title:`First steps`}},{path:`controllers`,component:Gr,data:{title:`Controllers`}},{path:`components`,redirectTo:`providers`},{path:`providers`,component:Jr,data:{title:`Providers`}},{path:`modules`,component:ea,data:{title:`Modules`}},{path:`middleware`,component:Xr,data:{title:`Middleware`}},{path:`pipes`,component:ta,data:{title:`Pipes`}},{path:`guards`,component:Kr,data:{title:`Guards`}},{path:`exception-filters`,component:Yr,data:{title:`Exception filters`}},{path:`interceptors`,component:Qr,data:{title:`Interceptors`}},{path:`custom-decorators`,component:Ur,data:{title:`Custom decorators`}},{path:`standalone-applications`,component:Hr,data:{title:`Standalone applications`}},{path:`application-context`,redirectTo:`standalone-applications`},{path:`discover/companies`,component:Wr,data:{title:`Discover - Who is using Nest?`}},{path:`migration-guide`,component:Zr,data:{title:`Migration guide - FAQ`}},{path:`deployment`,component:ra,data:{title:`Deployment`}}
2383,{path:`support`,component:na,data:{title:`Support`}},{path:`consulting`,component:Nn,resolve:{url:`externalUrlRedirectResolver`},canActivate:[ia],data:{externalUrl:`https://enterprise.nestjs.com`}},{path:`enterprise`,redirectTo:`consulting`},{path:`enterprise`,component:Nn,data:{title:`Official Support`}},{path:`fundamentals`,loadChildren:()=>import(`./chunk-DP9fMw1P.js`).then(o=>o.FUNDAMENTALS_ROUTES)},{path:`techniques`,loadChildren:()=>import(`./chunk-0H85jr3G.js`).then(o=>o.TECHNIQUES_ROUTES)},{path:`application`,loadChildren:()=>import(`./chunk-FcnvAen6.js`).then(o=>o.APPLICATION_ROUTES)},{path:`data`,loadChildren:()=>import(`./chunk-DJZcYhSs.js`).then(o=>o.DATA_ROUTES)},{path:`http`,loadChildren:()=>import(`./chunk-COR4Q87Z.js`).then(o=>o.HTTP_ROUTES)},{path:`security`,loadChildren:()=>import(`./chunk-BWzb_aKF.js`).then(o=>o.SECURITY_ROUTES)},{path:`graphql`,loadChildren:()=>import(`./chunk-Dyx8vjDn.js`).then(o=>o.GRAPHQL_ROUTES)},{path:`websockets`,loadChildren:()=>import(`./chunk-CD3RJcgD.js`).then(o=>o.WEBSOCKETS_ROUTES)},{path:`microservices`,loadChildren:()=>import(`./chunk-DQySwBCt.js`).then(o=>o.MICROSERVICES_ROUTES)},{path:`recipes`,loadChildren:()=>import(`./chunk-Bw4xMJSN.js`).then(o=>o.RECIPES_ROUTES)},{path:`faq`,loadChildren:()=>import(`./chunk-CjzXOGdT.js`).then(o=>o.FAQ_ROUTES)},{path:`cli`,loadChildren:()=>import(`./chunk-BnMl6gAO.js`).then(o=>o.CLI_ROUTES)},{path:`openapi`,loadChildren:()=>import(`./chunk-DTm1JsjN.js`).then(o=>o.OPENAPI_ROUTES)},{path:`devtools`,loadChildren:()=>import(`./chunk-CtEUtW18.js`).then(o=>o.DEVTOOLS_ROUTES)},{path:`observability`,loadChildren:()=>import(`./chunk-CRHBtszG.js`).then(o=>o.OBSERVABILITY_ROUTES)}]},{path:`**`,redirectTo:_r}];var aa=eR.forRoot(Go,{scrollPositionRestoration:`enabled`,anchorScrolling:`enabled`,preloadingStrategy:QN,onSameUrlNavigation:`reload`});var Uo=1e3;var Wo=1e4;var oa=[`wheel`,`touchstart`,`keydown`,`mousedown`];var sa=(()=>{class o{document=p(Z);window=this.document.defaultView;offset=()=>[0,0];lastPathname;stopPinning;setOffset(i){this.offset=Array.isArray(i)?()=>i:i}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(i,a){this.stopPinning?.(),this.lastPathname=this.window.location.pathname,this.window.scrollTo(j(m({},a),{left:i[0],top:i[1]}))}scrollToAnchor(i,a){this.stopPinning?.();let s=this.lastPathname===this.window.location.pathname;if(this.lastPathname=this.window.location.pathname,!s){this.pinAnchor(i);return}let l=this.findAnchor(i);l&&(this.scrollBy(this.distanceToTarget(l),a),l.focus({preventScroll:!0}))}setHistoryScrollRestoration(i){try{this.window.history.scrollRestoration=i}catch(a){}}pinAnchor(i){let a=this.window.performance.now(),s=a,l=null,d=0,m=()=>{this.window.cancelAnimationFrame(d);for(let u of oa)this.window.removeEventListener(u,m,!0);this.stopPinning===m&&(this.stopPinning=void 0)};for(let u of oa)this.window.addEventListener(u,m,{capture:!0,passive:!0});this.stopPinning=m;let h=()=>{let u=this.window.performance.now();if(l||(l=this.findAnchor(i),l?.focus({preventScroll:!0})),l&&this.scrollBy(this.distanceToTarget(l),{behavior:`instant`})&&(s=u),u-s>=Uo||u-a>=Wo){m();return}d=this.window.requestAnimationFrame(h)};h()}distanceToTarget(i){let a=parseFloat(this.window.getComputedStyle(i).scrollMarginTop)||0;return i.getBoundingClientRect().top-a-this.offset()[1]}scrollBy(i,a){if(Math.abs(i)<1)return!1;let s=this.window.scrollY;return this.window.scrollTo(j(m({},a),{top:s+i})),this.window.scrollY!==s}findAnchor(i){return this.document.getElementById(i)??this.document.getElementsByName(i)[0]??null}static ɵfac=function(a){return new(a||o)};static ɵprov=b({token:o,factory:o.ɵfac})}return o})();wt.production;sM(wr,{providers:[dH(),Ep(hM,aa),G_(W_(),q_()),Sr(),{provide:bf,useClass:sa}]});export{rf as A,Vv as C,p as D,of as E,uf as M,zv as N,qS as O,Tv as S,kv as T,MT as _,u as a,Ra as b,l$1 as c,Et$1 as d,GI as f,LC as g,Kc as h,g as i,sf as j,qa$1 as k,$v as l,Iv as m,en$1 as n,s as o,Hv as p,wt$1 as r,l as s,Et as t,Bv as u,Qd as v,gT as w,TT as x,Qg as y};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.