diff --git a/chunk-MYKSZVPX.js b/chunk-MYKSZVPX.js deleted file mode 100644 index 59e9c7cd..00000000 --- a/chunk-MYKSZVPX.js +++ /dev/null @@ -1,2 +0,0 @@ -import{$a as Gt,$c as yr,$d as ln,A as ft,Aa as Xe,Ab as Yo,Ad as hi,Ae as mn,B as ie,Ba as Si,Bb as St,Bd as Yt,Be as hn,C as di,Ca as f,Cb as Zo,Cd as on,Ce as qt,D as Vo,Da as m,Db as Jo,Dd as rn,De as ei,E as pe,Ea as oe,Ed as fi,Ee as fn,F as Go,Fa as Y,Fb as Hi,Fd as Ar,G as b,Ga as K,Gb as $o,Gd as kr,Ge as Qr,H as We,Ha as X,Hb as Ko,Hd as a,He as jr,I as Jn,Ia as Fi,Ib as qo,Id as ee,Ie as Yr,J as Pi,Ja as me,Jb as _t,Jc as fr,Jd as Er,Je as Zr,K as k,Ka as T,Kb as Qe,Kc as Pe,Kd as Zt,Ke as Jr,L as I,La as zo,Lb as Ri,Lc as vr,Ld as Sr,Le as $r,M,Ma as ue,Mb as er,Mc as _r,Md as oo,N as kt,Na as Wo,Nb as tr,Nc as ji,Nd as Fr,O as lt,Oa as Q,Ob as Z,Od as Br,P as O,Pa as $,Pb as B,Pc as Cr,Pd as ro,Q as x,Qa as Kn,Qb as ir,Qc as br,Qd as ao,Ra as Bi,Rb as zt,Rc as U,Rd as Lr,S as le,Sa as mi,Sc as Ir,Sd as dt,T as xe,Ta as V,Tb as Ct,Tc as to,Td as yt,U as Vt,Ua as j,Ub as Ni,Uc as Mr,Ud as Ne,V as pi,Va as vt,Vb as Vi,Vc as io,W as Ai,Wa as G,Wb as nr,Wc as Tr,Xa as fe,Xb as or,Xc as Yi,Xd as an,Y as ki,Yb as Gi,Yc as Zi,Yd as sn,Za as qn,Zb as eo,Zc as qe,Zd as Hr,_b as Ui,_c as Se,_d as Rr,aa as gi,ab as re,ad as Qt,ae as Nr,b as Eo,ba as Uo,bb as ve,bc as rr,bd as Ji,be as Vr,c as So,ca as Ei,cb as R,cc as Wt,cd as $i,ce as Gr,d as At,da as E,dc as Re,dd as Dr,de as tt,e as ht,ec as ut,ee as Ur,f as Fo,fc as je,fd as Or,fe as zr,g as Bo,gc as ar,gd as Fe,ge as so,h as Ie,ha as d,hc as sr,hd as Be,he as un,i as Lo,ia as l,ic as lr,id as jt,j as He,ja as ge,jc as ur,jd as It,je as cn,k as N,ka as W,kb as Li,kc as we,kd as Mt,ke as Jt,l as Yn,la as Ze,lb as Je,lc as zi,ld as xr,m as Di,ma as P,mb as De,mc as cr,md as wr,me as Wr,n as Oi,na as L,nb as $e,nc as dr,nd as Pr,ne as $t,o as Me,oa as u,ob as Ee,oc as Wi,p as Ho,pa as ke,pb as Xo,pc as pr,pe as dn,q as at,qa as S,qb as Qo,qc as Xt,qd as no,qe as _e,r as Ro,ra as $n,rb as Ke,rc as gr,rd as et,re as Ce,sa as C,sc as bt,sd as Tt,se as Kt,t as No,ta as g,tc as Xi,td as Ft,te as it,u as st,ua as h,uc as q,ud as Ki,ue as Xr,v as ze,va as A,vc as ae,vd as qi,w as Zn,wa as Te,wc as mr,wd as en,we as Ve,x as xi,xa as ye,xb as he,xc as hr,xd as tn,xe as Ge,y as Nt,ya as Et,yb as Ut,yd as ct,ye as pn,z as wi,za as z,zb as jo,zc as Qi,zd as nn,ze as gn}from"./chunk-SWJE44VE.js";var $s=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=k({type:t,selectors:[["ng-component"]],hostAttrs:[1,"tui-autofilled-styles"],decls:0,vars:0,template:function(e,i){},styles:[".tui-autofill input,input.tui-autofill{transition:box-shadow .01s}\n"],encapsulation:2,changeDetection:0}),t})(),Kr=(()=>{class t{constructor(e){this.autofilled=!1,this.tuiAutofilledChange=new W,e.addComponent($s)}transitionStartHandler({propertyName:e,target:i}){var o;e.includes("box-shadow")&&((o=i)===null||o===void 0?void 0:o.matches("input"))&&(this.autofilled=!this.autofilled,this.tuiAutofilledChange.emit(this.autofilled))}}return t.\u0275fac=function(e){return new(e||t)(l(Ir))},t.\u0275dir=M({type:t,selectors:[["","tuiAutofilledChange",""]],hostAttrs:[1,"tui-autofill"],hostVars:2,hostBindings:function(e,i){e&1&&f("transitionstart",function(r){return i.transitionStartHandler(r)}),e&2&&S("_autofilled",i.autofilled)},outputs:{tuiAutofilledChange:"tuiAutofilledChange"}}),t})(),qr=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var vn=(()=>{class t{constructor(){this.indeterminate=!1,this.checked=!1,this.tuiCheckedChange=new W}get isChecked(){return this.checked}get isIndeterminate(){return this.indeterminate}set tuiChecked(e){this.checked=e||!1,this.indeterminate=e===null}onChange({checked:e}){this.checked=e,this.indeterminate=!1,this.tuiCheckedChange.emit(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=M({type:t,selectors:[["input","tuiChecked",""],["input","tuiCheckedChange",""]],hostVars:2,hostBindings:function(e,i){e&1&&f("change",function(r){return i.onChange(r.target)}),e&2&&Xe("checked",i.isChecked)("indeterminate",i.isIndeterminate)},inputs:{tuiChecked:"tuiChecked"},outputs:{tuiCheckedChange:"tuiCheckedChange"}}),t})(),_n=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var Cn=(()=>{class t{constructor(e){this.tuiFocusVisibleChange=e}}return t.\u0275fac=function(e){return new(e||t)(l(to))},t.\u0275dir=M({type:t,selectors:[["","tuiFocusVisibleChange",""]],outputs:{tuiFocusVisibleChange:"tuiFocusVisibleChange"},features:[T([U,to])]}),t})(),bn=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var nt=(()=>{class t{constructor(){this.focusable=!0}get tabIndex(){return this.focusable?0:-1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=M({type:t,selectors:[["","tuiFocusable",""]],hostVars:1,hostBindings:function(e,i){e&2&&Xe("tabIndex",i.tabIndex)},inputs:{focusable:["tuiFocusable","focusable"]}}),t})(),ot=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var In=(()=>{class t{constructor({nativeElement:e},i){this.tuiFocusedChange=Me(we(e,"focusin"),we(e,"focusout")).pipe(N(()=>Re(e)),wi(!1),ze(),Nt(1),Xt(i))}}return t.\u0275fac=function(e){return new(e||t)(l(E),l(Ze))},t.\u0275dir=M({type:t,selectors:[["","tuiFocusedChange",""]],outputs:{tuiFocusedChange:"tuiFocusedChange"}}),t})(),Mn=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();function Ks({currentTarget:t,relatedTarget:n}){return!Ct(n)||!Ct(t)||!t.contains(n)}var rt=(()=>{class t extends So{constructor(e,i){super(o=>this.stream$.subscribe(o)),this.el=e,this.zone=i,this.stream$=Me(we(this.el.nativeElement,"mouseenter").pipe(N(Ut)),we(this.el.nativeElement,"mouseleave").pipe(N(he)),we(this.el.nativeElement,"mouseout").pipe(at(Ks),N(he))).pipe(ze(),Xt(this.zone))}}return t.\u0275fac=function(e){return new(e||t)(Jn(E),Jn(Ze))},t.\u0275prov=Go({token:t,factory:t.\u0275fac}),t})(),ti=(()=>{class t{constructor(e){this.tuiHoveredChange=e}}return t.\u0275fac=function(e){return new(e||t)(l(rt))},t.\u0275dir=M({type:t,selectors:[["","tuiHoveredChange",""]],outputs:{tuiHoveredChange:"tuiHoveredChange"},features:[T([rt])]}),t})(),Dt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var ea=(()=>{class t{constructor(e,i){this.enabled$=new At;let o=i.pipe(N(r=>!!r&&(!e||!r.length||r.every(s=>!e.contains(s)))));this.tuiObscured=this.enabled$.pipe(zi(()=>o))}set tuiObscuredEnabled(e){this.enabled$.next(e)}}return t.\u0275fac=function(e){return new(e||t)(l(Be,8),l(io,2))},t.\u0275dir=M({type:t,selectors:[["","tuiObscured",""]],inputs:{tuiObscuredEnabled:"tuiObscuredEnabled"},outputs:{tuiObscured:"tuiObscured"},features:[T([io,Mr,U])]}),t})(),ta=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var Tn=(()=>{class t{constructor(e,i){this.el=e,this.takeOnlyTrustedEvents=i,this.tuiPressedChange=cr(this.el.nativeElement,{onlyTrusted:this.takeOnlyTrustedEvents})}}return t.\u0275fac=function(e){return new(e||t)(l(E),l(br))},t.\u0275dir=M({type:t,selectors:[["","tuiPressedChange",""]],outputs:{tuiPressedChange:"tuiPressedChange"}}),t})(),ii=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var ia=(()=>{class t{constructor(e,i,o){this.el=e,this.zone=i,this.destroy$=o,this.eventName=""}ngOnInit(){Di(this.el.nativeElement,this.eventName,{passive:!1}).pipe(pr(this.zone),dr(),ie(this.destroy$)).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(l(E),l(Ze),l(U,2))},t.\u0275dir=M({type:t,selectors:[["","tuiPreventDefault",""]],inputs:{eventName:["tuiPreventDefault","eventName"]},features:[T([U])]}),t})(),na=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var qs=65536,lo=class{constructor(n){this.$implicit=n}},yn=(()=>{class t{constructor(e,i){this.viewContainer=e,this.templateRef=i}set tuiRepeatTimesOf(e){let i=Math.floor(_t(e,0,qs)),{length:o}=this.viewContainer;e{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();function ra(t,n,e){return e&&et?n:t}var wn=7;var ri=12,On=1,uo=0,co=11,po=0,go=9999,xn="".concat(Hi).concat($o).concat(Hi),el=1e3,aa=60,sa=60,ho=24,ni=el*aa,oi=ni*sa,oa=oi*ho,ai=10,tl=2*ai+xn.length,fo=Z("DMY"),la=Z("."),ua=(t,n)=>t.replace(/[^0-9A-Za-zА-Яа-я]/gi,n),be=class t{constructor(n){this.year=n}static isValidYear(n){return Number.isInteger(n)&&Qe(n,po,go+1)}static isLeapYear(n){return n%400===0||n%4===0&&n%100!==0}static getAbsoluteLeapYears(n){return Math.ceil(n/400)+(Math.ceil(n/4)-Math.ceil(n/100))}static lengthBetween(n,e){return e.year-n.year}static normalizeYearPart(n){return Ri(n,po,go)}get formattedYear(){return String(this.year).padStart(4,"0")}get isLeapYear(){return t.isLeapYear(this.year)}get absoluteLeapYears(){return t.getAbsoluteLeapYears(this.year)}yearBefore({year:n}){return this.year=n}yearAfter({year:n}){return this.year>n}append({year:n=0}){let e=this.year+n;return new t(e)}toString(){return this.formattedYear}valueOf(){return this.year}[Symbol.toPrimitive](n){return Date.prototype[Symbol.toPrimitive].call(this,n)}toJSON(){return this.formattedYear}},J=class t extends be{constructor(n,e){super(n),this.month=e}static isValidMonth(n,e){return be.isValidYear(n)&&t.isValidMonthPart(e)}static getMonthDaysCount(n,e){switch(n){case et.February:return e?29:28;case et.April:case et.June:case et.September:case et.November:return 30;default:return 31}}static currentLocal(){let n=new Date;return new t(n.getFullYear(),n.getMonth())}static currentUtc(){let n=new Date;return new t(n.getUTCFullYear(),n.getUTCMonth())}static lengthBetween(n,e){let i=n.month+n.year*12;return e.month+e.year*12-i}static normalizeMonthPart(n){return Ri(n,uo,co)}static isValidMonthPart(n){return Number.isInteger(n)&&Qe(n,uo,co+1)}get formattedMonthPart(){return String(this.month+1).padStart(2,"0")}get daysCount(){return t.getMonthDaysCount(this.month,this.isLeapYear)}monthBefore(n){return this.yearBefore(n)||this.yearSame(n)&&this.month=n.month}monthAfter(n){return this.yearAfter(n)||this.yearSame(n)&&this.month>n.month}append({year:n=0,month:e=0}){let i=(this.year+n)*ri+this.month+e;return new t(Math.floor(i/ri),i%ri)}toString(){return"".concat(this.formattedMonthPart,".").concat(this.formattedYear)}valueOf(){return this.toLocalNativeDate().valueOf()}toJSON(){return"".concat(super.toJSON(),"-").concat(this.formattedMonthPart)}toLocalNativeDate(){return new Date(this.year,this.month)}toUtcNativeDate(){return new Date(Date.UTC(this.year,this.month))}},ce=class t extends J{constructor(n,e,i){super(n,e),this.day=i}static fromLocalNativeDate(n){return new t(n.getFullYear(),n.getMonth(),n.getDate())}static fromUtcNativeDate(n){return new t(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate())}static isValidDay(n,e,i){return J.isValidMonth(n,e)&&Number.isInteger(i)&&Qe(i,On,J.getMonthDaysCount(e,be.isLeapYear(n))+1)}static currentLocal(){let n=new Date,e=n.getFullYear(),i=n.getMonth(),o=n.getDate();return new t(e,i,o)}static currentUtc(){let n=new Date,e=n.getUTCFullYear(),i=n.getUTCMonth(),o=n.getUTCDate();return new t(e,i,o)}static normalizeOf(n,e,i){let o=be.normalizeYearPart(n),r=J.normalizeMonthPart(e),s=t.normalizeDayPart(i,r,o);return new t(o,r,s)}static lengthBetween(n,e){return Math.round((e.toLocalNativeDate().getTime()-n.toLocalNativeDate().getTime())/(1e3*60*60*24))}static parseRawDateString(n,e="DMY"){switch(e){case"YMD":return{day:parseInt(n.slice(8,10),10),month:parseInt(n.slice(5,7),10)-1,year:parseInt(n.slice(0,4),10)};case"MDY":return{day:parseInt(n.slice(3,5),10),month:parseInt(n.slice(0,2),10)-1,year:parseInt(n.slice(6,10),10)};case"DMY":default:return{day:parseInt(n.slice(0,2),10),month:parseInt(n.slice(3,5),10)-1,year:parseInt(n.slice(6,10),10)}}}static normalizeParse(n,e="DMY"){let{day:i,month:o,year:r}=this.parseRawDateString(n,e);return t.normalizeOf(r,o,i)}static jsonParse(n){let{day:e,month:i,year:o}=this.parseRawDateString(n,"YMD");if(!be.isValidYear(o))throw new lr(o);if(!J.isValidMonth(o,i))throw new sr(i);if(!Number.isInteger(e)||!Qe(e,On,J.getMonthDaysCount(i,be.isLeapYear(o))+1))throw new ar(e);return new t(o,i,e)}static normalizeDayPart(n,e,i){let o=J.getMonthDaysCount(e,be.isLeapYear(i));return Ri(n,1,o)}get formattedDayPart(){return String(this.day).padStart(2,"0")}get isWeekend(){let n=this.dayOfWeek(!1);return n===no.Saturday||n===no.Sunday}dayOfWeek(n=!0){let e=n?this.toLocalNativeDate().getDay()-1:this.toLocalNativeDate().getDay();return e<0?6:e}dayBefore(n){return this.monthBefore(n)||this.monthSame(n)&&this.day=n.day}dayAfter(n){return this.monthAfter(n)||this.monthSame(n)&&this.day>n.day}dayLimit(n,e){return n!==null&&this.dayBefore(n)?n:e!==null&&this.dayAfter(e)?e:this}append({year:n=0,month:e=0,day:i=0}){let o=(this.year+n)*ri+this.month+e,r=Math.floor(o/ri),s=o%ri,c=Math.min(this.day,J.getMonthDaysCount(s,be.isLeapYear(r)))+i;for(;c>J.getMonthDaysCount(s,be.isLeapYear(r));)c-=J.getMonthDaysCount(s,be.isLeapYear(r)),s===et.December?(r++,s=et.January):s++;for(;c0,i=e||n==="HH:MM:SS"||!n&&this.seconds>0;return"".concat(this.formatTime(this.hours),":").concat(this.formatTime(this.minutes))+"".concat(i?":".concat(this.formatTime(this.seconds)):"")+"".concat(e?".".concat(this.formatTime(this.ms,3)):"")}valueOf(){return this.toAbsoluteMilliseconds()}[Symbol.toPrimitive](n){return Date.prototype[Symbol.toPrimitive].call(this,n)}toAbsoluteMilliseconds(){return this.hours*oi+this.minutes*ni+this.seconds*1e3+this.ms}formatTime(n,e=2){return String(n).padStart(e,"0")}};function il(t,n){t&1&&A(0,"tui-scroll-controls",2)}var nl=["*"];var xt=(()=>{class t{constructor(e,i,o,r){this.cssRef=e,this.el=i,this.userAgent=o,this.isIos=r,this.delegated=!1,this.isLegacy=!this.cssRef.supports("position","sticky")||qo(this.userAgent)&&!this.cssRef.supports("scrollbar-width","none"),this.hidden=!1,this.browserScrollRef=new E(this.el.nativeElement)}get showScrollbars(){return!this.hidden&&!this.isIos&&(!this.isLegacy||this.delegated)}get showNative(){return this.isLegacy&&!this.hidden&&!this.delegated}onScrollable(e){this.delegated=!0,this.browserScrollRef.nativeElement=e}scrollIntoView(e){var i;if(this.delegated)return;let{nativeElement:o}=this.browserScrollRef,{offsetTop:r,offsetLeft:s}=or(o,e),{clientHeight:c,clientWidth:p}=o,{offsetHeight:v,offsetWidth:_}=e,y=r+v/2-c/2,D=s+_/2-p/2;(i=o.scrollTo)===null||i===void 0||i.call(o,D,y)}}return t.\u0275fac=function(e){return new(e||t)(l(hr),l(E),l(Qi),l(_r))},t.\u0275cmp=k({type:t,selectors:[["tui-scrollbar"]],hostVars:2,hostBindings:function(e,i){e&1&&f("tui-scrollable.stop",function(r){return i.onScrollable(r.detail)})("tui-scroll-into-view.stop",function(r){return i.scrollIntoView(r.detail)}),e&2&&S("_legacy",i.showNative)},inputs:{hidden:"hidden"},features:[T([{provide:Cr,deps:[t],useFactory:({browserScrollRef:n})=>n}])],ngContentSelectors:nl,decls:3,vars:1,consts:[["class","t-bars",4,"ngIf"],[1,"t-content"],[1,"t-bars"]],template:function(e,i){e&1&&(oe(),C(0,il,1,0,"tui-scroll-controls",0),g(1,"div",1),Y(2),h()),e&2&&u("ngIf",i.showScrollbars)},dependencies:[Dr,re],styles:["[_nghost-%COMP%]{position:relative;display:flex;isolation:isolate;overflow:auto}[_nghost-%COMP%]:not(._legacy){scrollbar-width:none;-ms-overflow-style:none}[_nghost-%COMP%]:not(._legacy)::-webkit-scrollbar, [_nghost-%COMP%]:not(._legacy)::-webkit-scrollbar-thumb{background:transparent;width:0;height:0}._legacy[_nghost-%COMP%]{overflow:overlay}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){._legacy[_nghost-%COMP%]::-webkit-scrollbar, ._legacy[_nghost-%COMP%]::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}._legacy[_nghost-%COMP%]::-webkit-scrollbar{background-color:transparent}._legacy[_nghost-%COMP%]::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}._legacy[_nghost-%COMP%]::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}._legacy[_nghost-%COMP%]::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}.t-content[_ngcontent-%COMP%]{isolation:isolate;flex:1;flex-basis:auto;width:100%;height:-webkit-max-content;height:max-content}.t-bars[_ngcontent-%COMP%]{color:var(--tui-text-01)}"],changeDetection:0}),t})(),li=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,Or]]}),t})();function ol(t,n){if(t&1&&(g(0,"div",4),X(1),h()),t&2){let e=n.polymorpheusOutlet;d(1),me(" ",e," ")}}var rl=t=>({$implicit:t}),al=B(()=>cl),vi=(()=>{class t{constructor(){this.tuiDropdownOpen=!1,this.tuiDropdownOpenChange=new W}update(e){this.tuiDropdownOpen=e,this.tuiDropdownOpenChange.emit(e)}ngOnChanges(){var e;(e=this.dropdown)===null||e===void 0||e.toggle(this.tuiDropdownOpen)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=M({type:t,selectors:[["","tuiDropdownOpen",""],["","tuiDropdownOpenChange",""]],inputs:{tuiDropdownOpen:"tuiDropdownOpen"},outputs:{tuiDropdownOpenChange:"tuiDropdownOpenChange"},features:[lt]}),t})(),pt=(()=>{class t{constructor(e,i,o,r,s,c){this.el=i,this.dropdown=o,this.injector=r,this.dropdownService=s,this.open=c,this.refresh$=new At,this.dropdownBoxRef=null,this.type="dropdown",this.component=new bt(this.dropdown,this.injector),this.open&&!this.open.dropdown?this.open.dropdown=this:this.open=null,this.refresh$.pipe(Vo(0),ie(e)).subscribe(()=>{var p,v;(p=this.dropdownBoxRef)===null||p===void 0||p.changeDetectorRef.detectChanges(),(v=this.dropdownBoxRef)===null||v===void 0||v.changeDetectorRef.markForCheck()})}get position(){return Er(this.el.nativeElement)?"fixed":"absolute"}ngAfterViewChecked(){this.refresh$.next()}ngAfterViewInit(){this.open&&this.toggle(this.open.tuiDropdownOpen)}ngOnChanges(){this.content||this.toggle(!1)}ngOnDestroy(){this.toggle(!1),this.open&&(this.open.dropdown=void 0)}getClientRect(){return this.el.nativeElement.getBoundingClientRect()}toggle(e){var i,o;e&&this.content&&!this.dropdownBoxRef?(this.dropdownBoxRef=this.dropdownService.add(this.component),(i=this.open)===null||i===void 0||i.update(!0)):!e&&this.dropdownBoxRef&&(this.dropdownService.remove(this.dropdownBoxRef),this.dropdownBoxRef=null,(o=this.open)===null||o===void 0||o.update(!1))}}return t.\u0275fac=function(e){return new(e||t)(l(U,2),l(E),l(al),l(Ai),l(Pr),l(vi,8))},t.\u0275dir=M({type:t,selectors:[["","tuiDropdown","",5,"ng-container"]],inputs:{content:["tuiDropdown","content"]},exportAs:["tuiDropdown"],features:[T([U,fi(t),qi(t)]),lt]}),Ie([Fe],t.prototype,"position",null),t})(),sl={showDelay:200,hideDelay:500},ll=Z(sl);var vo=(()=>{class t extends Tt{constructor(e,i,o){super(r=>this.stream$.subscribe(r)),this.hovered$=e,this.options=i,this.parentHover=o,this.toggle$=new At,this.stream$=Me(this.toggle$,this.hovered$).pipe(ft(r=>He(r).pipe(st(r?this.showDelay:this.hideDelay))),di(r=>{this.hovered=r}),xi()),this.showDelay=this.options.showDelay,this.hideDelay=this.options.hideDelay,this.hovered=!1,this.type="dropdown"}toggle(e){var i;(i=this.parentHover)===null||i===void 0||i.toggle(e),this.toggle$.next(e)}}return t.\u0275fac=function(e){return new(e||t)(l(rt),l(ll),l(t,12))},t.\u0275dir=M({type:t,selectors:[["","tuiDropdownHover","",5,"ng-container"]],inputs:{showDelay:["tuiDropdownShowDelay","showDelay"],hideDelay:["tuiDropdownHideDelay","hideDelay"]},features:[T([Ft(t),rt]),P]}),t})(),pa={align:"left",direction:null,limitWidth:"auto",maxHeight:400,minHeight:80,offset:4,appearance:""},Bt=Z(pa),ga=t=>({provide:Bt,deps:[[new xe,ul],[new xe,new pi,Bt]],useFactory:ao(t,pa)}),ul=(()=>{class t{constructor(e){this.options=e,this.align=this.options.align,this.appearance=this.options.appearance,this.direction=this.options.direction,this.limitWidth=this.options.limitWidth,this.minHeight=this.options.minHeight,this.maxHeight=this.options.maxHeight,this.offset=this.options.offset}}return t.\u0275fac=function(e){return new(e||t)(l(Bt,4))},t.\u0275dir=M({type:t,selectors:[["","tuiDropdownAlign",""],["","tuiDropdownAppearance",""],["","tuiDropdownDirection",""],["","tuiDropdownLimitWidth",""],["","tuiDropdownMinHeight",""],["","tuiDropdownMaxHeight",""],["","tuiDropdownOffset",""]],inputs:{align:["tuiDropdownAlign","align"],appearance:["tuiDropdownAppearance","appearance"],direction:["tuiDropdownDirection","direction"],limitWidth:["tuiDropdownLimitWidth","limitWidth"],minHeight:["tuiDropdownMinHeight","minHeight"],maxHeight:["tuiDropdownMaxHeight","maxHeight"],offset:["tuiDropdownOffset","offset"]},features:[T([{provide:Bt,useExisting:pe(()=>t)}])]}),t})(),cl=(()=>{class t{constructor(e,i,o,r,s,c,p,v,_,y,D){this.directive=r,this.animation=s,this.el=c,this.accessor=p,this.win=v,this.mode$=_,this.options=y,this.hoverDirective=D,i.pipe(N(w=>this.directive.position==="fixed"?e.correct(w):w),ie(o)).subscribe(([w,H])=>{this.update(w,H)}),this.updateWidth(this.accessor.getClientRect().width)}onHoveredChange(e){var i;(i=this.hoverDirective)===null||i===void 0||i.toggle(e)}onTopFocus(){this.moveFocusOutside(!0)}onBottomFocus(){this.moveFocusOutside(!1)}update(e,i){var o;let{style:r}=this.el.nativeElement,{right:s}=this.el.nativeElement.getBoundingClientRect(),{maxHeight:c,offset:p}=this.options,{innerHeight:v}=this.win,_=(o=this.el.nativeElement.offsetParent)===null||o===void 0?void 0:o.getBoundingClientRect(),{position:y}=this.directive,D=this.accessor.getClientRect(),w=y==="fixed"?0:-((_==null?void 0:_.left)||0),H=y==="fixed"?0:-((_==null?void 0:_.top)||0);e+=H,i+=w;let de=iD.left&&e{class t extends en{constructor(e,i,o){super(e,i,o),this.type="dropdown"}}return t.\u0275fac=function(e){return new(e||t)(l(U,2),l(Tt),l(Ki))},t.\u0275dir=M({type:t,selectors:[["","tuiDropdown",""]],features:[T([U]),P]}),t})();var ha=(()=>{class t extends Tt{constructor(){super(e=>this.stream$.subscribe(e)),this.stream$=new ht(!1),this.tuiDropdownManual=!1,this.type="dropdown"}ngOnChanges(){this.stream$.next(this.tuiDropdownManual)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=M({type:t,selectors:[["","tuiDropdown","","tuiDropdownManual",""]],inputs:{tuiDropdownManual:"tuiDropdownManual"},features:[T([Ft(t)]),P,lt]}),t})(),da=(()=>{class t extends ct{constructor(e,i,o,r){super(),this.options=e,this.viewport=i,this.accessors=o,this.directive=r,this.type="dropdown"}getPosition({width:e,height:i}){var o,r;!e&&!i&&(this.previous=void 0);let s=(r=(o=this.accessor)===null||o===void 0?void 0:o.getClientRect())!==null&&r!==void 0?r:St,c=this.viewport.getClientRect(),{minHeight:p,align:v,direction:_,offset:y}=this.options,D={top:c.top-y,bottom:c.bottom+y,right:c.right-y,left:c.left+y},w=this.previous||_||"bottom",H={top:s.top-2*y-D.top,bottom:D.bottom-s.bottom-2*y},te=Math.max(s.right-e,y),de=s.left+eH.bottom?"top":"bottom";return H[w]>p&&_||H[w]>i?[Oe[w],Oe[v]]:(this.previous=Rt,[Oe[Rt],Oe[v]])}get accessor(){return rn("dropdown")(this.accessors,this.directive)}}return t.\u0275fac=function(e){return new(e||t)(l(Bt),l(Jt),l(Yt),l(pt))},t.\u0275dir=M({type:t,selectors:[["","tuiDropdown","",3,"tuiDropdownCustomPosition","",3,"tuiDropdownSided",""]],features:[T([hi(t)]),P]}),Ie([Fe],t.prototype,"accessor",null),t})(),fa=(()=>{class t extends ct{constructor(e,i,o){super(),this.options=e,this.viewport=i,this.vertical=o,this.previous=this.options.direction||"bottom",this.tuiDropdownSided="",this.tuiDropdownSidedOffset=4,this.type="dropdown"}getPosition(e){var i,o;if(this.tuiDropdownSided===!1)return this.vertical.getPosition(e);let{height:r,width:s}=e,c=(o=(i=this.vertical.accessor)===null||i===void 0?void 0:i.getClientRect())!==null&&o!==void 0?o:St,p=this.viewport.getClientRect(),{direction:v,minHeight:_,offset:y}=this.options,D=this.options.align==="center"?"left":this.options.align,w={top:c.bottom-p.top,left:c.left-y-p.left,right:p.right-c.right-y,bottom:p.bottom-c.top},H={top:c.bottom-r+this.tuiDropdownSidedOffset+1,left:c.left-s-y,right:c.right+y,bottom:c.top-this.tuiDropdownSidedOffset-1},te=w.top>w.bottom?"top":"bottom",de=w.left>w.right?H.left:H.right,Oe=w[D]>s?H[D]:de;return w[this.previous]>_&&v||this.previous===te?[H[this.previous],Oe]:(this.previous=te,[H[te],Oe])}}return t.\u0275fac=function(e){return new(e||t)(l(Bt),l(Jt),l(da))},t.\u0275dir=M({type:t,selectors:[["","tuiDropdownSided",""]],inputs:{tuiDropdownSided:"tuiDropdownSided",tuiDropdownSidedOffset:"tuiDropdownSidedOffset"},features:[T([da,hi(t)]),P]}),t})();var Pn=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[ae,jt,wr,li,Dt]]}),t})();function pl(t,n){if(t&1&&A(0,"span",1),t&2){let e=n.polymorpheusOutlet;u("innerHTML",e,Ei)}}var gl=["*"];var ml=B(()=>vl),hl={direction:"bottom-left",showDelay:500,hideDelay:200,appearance:"",icon:"tuiIconHelpCircle"},Ht=Z(hl);var Pt=(()=>{class t extends Se{constructor(e){super(),this.options=e,this.direction=this.options.direction,this.appearance=this.options.appearance,this.showDelay=this.options.showDelay,this.hideDelay=this.options.hideDelay,this.icon=this.options.icon}}return t.\u0275fac=function(e){return new(e||t)(l(Ht,4))},t.\u0275dir=M({type:t,selectors:[["","tuiHintContent",""]],inputs:{content:["tuiHintContent","content"],direction:["tuiHintDirection","direction"],appearance:["tuiHintAppearance","appearance"],showDelay:["tuiHintShowDelay","showDelay"],hideDelay:["tuiHintHideDelay","hideDelay"]},features:[T([{provide:Ht,useExisting:pe(()=>t)}]),P]}),t})(),kn=(()=>{class t{constructor(e,i,o,r,s){this.el=e,this.component=i,this.hintService=o,this.options=r,this.activeZone=s,this.tuiHintAppearance=null,this.type="hint"}get appearance(){var e;return(e=this.tuiHintAppearance)!==null&&e!==void 0?e:this.options.appearance}ngOnChanges(){this.content||this.toggle(!1)}ngOnDestroy(){this.toggle(!1)}getClientRect(){return this.el.nativeElement.getBoundingClientRect()}toggle(e){e&&this.content?this.hintService.add(this):this.hintService.remove(this)}}return t.\u0275fac=function(e){return new(e||t)(l(E),l(bt),l(Wr),l(Ht),l(Be,8))},t.\u0275dir=M({type:t,selectors:[["","tuiHint","",5,"ng-container",5,"ng-template"]],inputs:{content:["tuiHint","content"],context:["tuiHintContext","context"],tuiHintAppearance:"tuiHintAppearance"},features:[T([fi(t),qi(t),{provide:bt,deps:[ml,Ai],useClass:bt}]),lt]}),t})(),ui=(()=>{class t extends Tt{constructor(e,i,o){super(r=>this.stream$.subscribe(r)),this.hovered$=e,this.options=i,this.el=o,this.visible=!1,this.toggle$=new At,this.stream$=Me(this.toggle$.pipe(ft(r=>He(r).pipe(st(r?0:this.hideDelay))),ie(this.hovered$),Zn()),this.hovered$.pipe(ft(r=>He(r).pipe(st(r?this.showDelay:this.hideDelay))),ie(this.toggle$),Zn())).pipe(at(()=>this.enabled),N(r=>r&&!ro(this.el.nativeElement)),di(r=>{this.visible=r})),this.showDelay=this.options.showDelay,this.hideDelay=this.options.hideDelay,this.type="hint",this.enabled=!0}toggle(e=!this.visible){this.toggle$.next(e)}}return t.\u0275fac=function(e){return new(e||t)(l(rt),l(Ht),l(E))},t.\u0275dir=M({type:t,selectors:[["","tuiHint","",5,"ng-container",5,"ng-template"]],inputs:{showDelay:["tuiHintShowDelay","showDelay"],hideDelay:["tuiHintHideDelay","hideDelay"]},exportAs:["tuiHintHover"],features:[T([Ft(t),rt]),P]}),t})(),fl=(()=>{class t extends ui{constructor(){super(...arguments),this.currentRect=St}onMove({clientX:e,clientY:i}){this.currentRect=eo(e,i)}getClientRect(){return this.currentRect}}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiHint","","tuiHintPointer",""]],hostBindings:function(e,i){e&1&&f("mousemove.silent",function(r){return i.onMove(r)})},features:[T([fi(t),Ft(t)]),P]}),t})(),va=4,vl=(()=>{class t{constructor(e,i,o,r,s,c,p,v,_,y,D,w){var H;this.animation=r,this.pointer=s,this.accessor=c,this.el=p,this.polymorpheus=v,this.hover=_,this.mode=y,this.visualViewportService=D,this.viewport=w,this.appearance=this.polymorpheus.$implicit.appearance||((H=this.mode)===null||H===void 0?void 0:H.mode),i.pipe(N(te=>this.visualViewportService.correct(te)),ie(o)).subscribe(([te,de])=>{this.update(te,de)}),e.pipe(ie(o)).subscribe(te=>this.hover.toggle(te))}get content(){return this.polymorpheus.$implicit.content}get context(){return this.polymorpheus.$implicit.context}onClick(e){(!this.el.nativeElement.contains(e)&&!this.hover.el.nativeElement.contains(e)||ro(this.hover.el.nativeElement))&&this.hover.toggle(!1)}update(e,i){let{height:o,width:r}=this.el.nativeElement.getBoundingClientRect(),{style:s}=this.el.nativeElement,c=this.accessor.getClientRect(),p=this.viewport.getClientRect();if(c===St)return;let v=_t(i,va,p.width-r-va),[_,y]=this.visualViewportService.correct([c.top+c.height/2-e,c.left+c.width/2-v]);s.top=je(e),s.left=je(v),s.setProperty("--top",je(_t(_,.5,o-1))),s.setProperty("--left",je(_t(y,.5,r-1)))}}return t.\u0275fac=function(e){return new(e||t)(l(rt),l($t),l(U,2),l(an),l(fl,8),l(Yt),l(E),l(gr),l(ui),l(Kt,8),l(dn),l(Jt))},t.\u0275cmp=k({type:t,selectors:[["tui-hint"]],hostVars:4,hostBindings:function(e,i){e&1&&f("click",function(r){return i.onClick(r.target)},!1,gi),e&2&&(L("data-appearance",i.appearance),Si("@tuiFadeIn",i.animation),S("_untouchable",i.pointer))},features:[T([U,$t,rt,nn("hint"),on("hint",kn)])],ngContentSelectors:gl,decls:2,vars:2,consts:[[3,"innerHTML",4,"polymorpheusOutlet","polymorpheusOutletContext"],[3,"innerHTML"]],template:function(e,i){e&1&&(oe(),Y(0),C(1,pl,1,1,"span",0)),e&2&&(d(1),u("polymorpheusOutlet",i.content)("polymorpheusOutletContext",i.context))},dependencies:[q],styles:['[_nghost-%COMP%]{position:absolute;max-width:18rem;min-height:var(--tui-height-m);padding:.75rem 1rem;background:var(--tui-primary);border-radius:var(--tui-radius-l);color:var(--tui-primary-text);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;word-wrap:break-word}[_nghost-%COMP%]:before{content:"";position:absolute;top:var(--top);left:var(--left);width:.5rem;height:.5rem;border-radius:.125rem;box-sizing:border-box;background:inherit;transform:translate(-50%,-50%) rotate(45deg)}[data-appearance=error][_nghost-%COMP%]{background:var(--tui-error-fill)}[data-appearance=onDark][_nghost-%COMP%]{background:var(--tui-elevation-02);color:var(--tui-text-01);filter:drop-shadow(0 0 .125rem rgba(0,0,0,.16)) drop-shadow(0 1.5rem 1rem rgba(0,0,0,.03)) drop-shadow(0 .75rem .75rem rgba(0,0,0,.04)) drop-shadow(0 .25rem .375rem rgba(0,0,0,.05))}[_nghost-%COMP%]:not([style*="top"]){visibility:hidden}._untouchable[_nghost-%COMP%]{pointer-events:none}'],data:{animation:[Ar]},changeDetection:0}),Ie([Fe],t.prototype,"update",null),t})(),_a=(()=>{class t extends Tt{constructor(e,i,o){super(r=>this.stream$.subscribe(r)),this.zone=e,this.doc=i,this.el=o,this.id$=new Fo(1),this.stream$=this.id$.pipe(zi(()=>we(this.doc,"keydown",{capture:!0}),ir),ft(()=>this.focused?He(!1):Me(we(this.doc,"keyup"),we(this.element,"blur")).pipe(N(()=>this.focused))),Ro(r=>r?Oi(1e3):He(null)),wi(!1),ze(),Nt(1),Xt(this.zone)),this.tuiHintDescribe="",this.type="hint"}ngOnChanges(){this.id$.next(this.tuiHintDescribe)}get focused(){return Re(this.element)}get element(){return this.doc.getElementById(this.tuiHintDescribe||"")||this.el.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(l(Ze),l(qn),l(E))},t.\u0275dir=M({type:t,selectors:[["","tuiHintDescribe",""]],inputs:{tuiHintDescribe:"tuiHintDescribe"},features:[T([Ft(t)]),P,lt]}),Ie([Fe],t.prototype,"element",null),t})(),Ca=(()=>{class t extends en{constructor(e,i,o){super(e,i,o),this.type="hint"}}return t.\u0275fac=function(e){return new(e||t)(l(U,2),l(Tt),l(Ki))},t.\u0275dir=M({type:t,selectors:[["","tuiHint","",5,"ng-container",5,"ng-template"]],features:[T([U]),P]}),t})();var wt=8,An=22,ne=0,se=1,ba=(()=>{class t extends ct{constructor(e,i,o,r){super(),this.options=e,this.viewport=i,this.directive=o,this.accessors=r,this.points=oo.reduce((s,c)=>Object.assign(Object.assign({},s),{[c]:[0,0]}),{}),this.direction=this.options.direction,this.type="hint"}getPosition({width:e,height:i}){var o,r;let s=(r=(o=this.accessor)===null||o===void 0?void 0:o.getClientRect())!==null&&r!==void 0?r:St,c=s.left+s.width/2,p=s.top+s.height/2;if(this.points["top-left"][ne]=s.top-i-wt,this.points["top-left"][se]=c-e+An,this.points.top[ne]=this.points["top-left"][ne],this.points.top[se]=c-e/2,this.points["top-right"][ne]=this.points["top-left"][ne],this.points["top-right"][se]=c-An,this.points["bottom-left"][ne]=s.bottom+wt,this.points["bottom-left"][se]=this.points["top-left"][se],this.points.bottom[ne]=this.points["bottom-left"][ne],this.points.bottom[se]=this.points.top[se],this.points["bottom-right"][ne]=this.points["bottom-left"][ne],this.points["bottom-right"][se]=this.points["top-right"][se],this.points["left-top"][ne]=p-i+An,this.points["left-top"][se]=s.left-e-wt,this.points.left[ne]=p-i/2,this.points.left[se]=this.points["left-top"][se],this.points["left-bottom"][ne]=p-An,this.points["left-bottom"][se]=this.points["left-top"][se],this.points["right-top"][ne]=this.points["left-top"][ne],this.points["right-top"][se]=s.right+wt,this.points.right[ne]=this.points.left[ne],this.points.right[se]=this.points["right-top"][se],this.points["right-bottom"][ne]=this.points["left-bottom"][ne],this.points["right-bottom"][se]=this.points["right-top"][se],this.checkPosition(this.points[this.direction],e,i))return this.points[this.direction];let v=oo.find(_=>this.checkPosition(this.points[_],e,i));return this.points[v||this.fallback]}get accessor(){return rn("hint")(this.accessors,this.directive)}get fallback(){return this.points.top[ne]>this.viewport.getClientRect().bottom-this.points.bottom[ne]?"top":"bottom"}checkPosition([e,i],o,r){let s=this.viewport.getClientRect();return e>wt&&i>wt&&e+r{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,ae]]}),t})();var Ia=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=M({type:t,selectors:[["input","tuiMaskAccessor",""]],features:[T([{provide:Li,deps:[[new xe,cn],Je],multi:!0,useFactory:(n,e)=>n?n[0]:e}])]}),t})(),Ma=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var Ta=(()=>{class t{constructor(e,i){this.el=e,this.destroy$=i}set tuiScrollIntoView(e){e&&Oi(0).pipe(ie(this.destroy$)).subscribe(()=>{this.el.nativeElement.dispatchEvent(new CustomEvent(Sr,{bubbles:!0,detail:this.el.nativeElement}))})}}return t.\u0275fac=function(e){return new(e||t)(l(E),l(U,2))},t.\u0275dir=M({type:t,selectors:[["","tuiScrollIntoView",""]],inputs:{tuiScrollIntoView:"tuiScrollIntoView"},features:[T([U])]}),t})(),ya=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var _o=class{constructor(n,e,i,o,r,s,c,p,v,_,y,D,w){this.change$=n,this.options=e,this.legacyAppearance=i,this.appearanceDirective=o,this.cleanerDirective=r,this.customContentDirective=s,this.iconDirective=c,this.iconLeftDirective=p,this.labelOutsideDirective=v,this.sizeDirective=_,this.prefixDirective=y,this.postfixDirective=D,this.fillerDirective=w}get appearance(){return this.appearanceDirective.appearance||this.legacyAppearance}get cleaner(){return this.cleanerDirective.cleaner}get customContent(){return this.customContentDirective.customContent||""}get icon(){return this.iconDirective.icon}get iconLeft(){return this.iconLeftDirective.iconLeft}get labelOutside(){return this.labelOutsideDirective.labelOutside}get size(){return this.sizeDirective.size}get prefix(){return this.prefixDirective.prefix}get postfix(){return this.postfixDirective.postfix}get filler(){return this.fillerDirective.filler}},Il={iconCleaner:"tuiIconClose",hintOnDisabled:!1},Co=Z(Il);var Da=B(()=>new Ml),Ml=(()=>{class t extends Se{constructor(){super(...arguments),this.appearance=""}}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiTextfieldAppearance",""]],inputs:{appearance:["tuiTextfieldAppearance","appearance"]},features:[T([{provide:Da,useExisting:pe(()=>t)}]),P]}),t})(),Oa=B(()=>new Tl),Tl=(()=>{class t extends Se{constructor(){super(...arguments),this.cleaner=!1}}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiTextfieldCleaner",""]],inputs:{cleaner:["tuiTextfieldCleaner","cleaner"]},features:[T([{provide:Oa,useExisting:pe(()=>t)}]),P]}),t})(),xa=B(()=>new yl),yl=(()=>{class t extends Se{}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiTextfieldCustomContent",""]],inputs:{customContent:["tuiTextfieldCustomContent","customContent"]},features:[T([{provide:xa,useExisting:pe(()=>t)}]),P]}),t})(),wa=B(()=>new bo),bo=(()=>{class t extends Se{constructor(){super(...arguments),this.filler=""}}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiTextfieldFiller",""]],inputs:{filler:["tuiTextfieldFiller","filler"]},features:[T([{provide:wa,useExisting:pe(()=>t)}]),P]}),t})(),Pa=B(()=>new Io),Io=(()=>{class t extends Se{}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiTextfieldIcon",""]],inputs:{icon:["tuiTextfieldIcon","icon"]},features:[T([{provide:Pa,useExisting:pe(()=>t)}]),P]}),t})(),Aa=B(()=>new Dl),Dl=(()=>{class t extends Se{}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiTextfieldIconLeft",""]],inputs:{iconLeft:["tuiTextfieldIconLeft","iconLeft"]},features:[T([{provide:Aa,useExisting:pe(()=>t)}]),P]}),t})(),ka=B(()=>new Mo),Mo=(()=>{class t extends Se{constructor(){super(...arguments),this.labelOutside=!1}}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiTextfieldLabelOutside",""]],inputs:{labelOutside:["tuiTextfieldLabelOutside","labelOutside"]},features:[T([{provide:ka,useExisting:pe(()=>t)}]),P]}),t})(),Ea=B(()=>new Ol),Ol=(()=>{class t extends Se{constructor(){super(...arguments),this.postfix=""}}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiTextfieldPostfix",""]],inputs:{postfix:["tuiTextfieldPostfix","postfix"]},features:[T([{provide:Ea,useExisting:pe(()=>t)}]),P]}),t})(),Sa=B(()=>new xl),xl=(()=>{class t extends Se{constructor(){super(...arguments),this.prefix=""}}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiTextfieldPrefix",""]],inputs:{prefix:["tuiTextfieldPrefix","prefix"]},features:[T([{provide:Sa,useExisting:pe(()=>t)}]),P]}),t})(),Sn=B(()=>new wl),wl=(()=>{class t extends Se{constructor(){super(...arguments),this.size="l"}}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiTextfieldSize",""]],inputs:{size:["tuiTextfieldSize","size"]},features:[T([{provide:Sn,useExisting:pe(()=>t)}]),P]}),t})(),Fn=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})(),_i=new We("[TUI_TEXTFIELD_WATCHED_CONTROLLER]"),Bn=[U,{provide:_i,deps:[ge,U,Co,zr,Da,Oa,xa,Pa,Aa,ka,Sn,Sa,Ea,wa],useFactory:(t,n,e,i,...o)=>{let r=Me(...o.map(({change$:s})=>s||Ho)).pipe(Wi(t),ie(n));return r.subscribe(),new _o(r,e,i,...o)}}];function Pl(t,n){if(t&1){let e=z();g(0,"div",4),f("click",function(){let r=O(e).tuiLet,s=m(3);return x(s.onItemClick(r))})("tuiHoveredChange",function(o){let s=O(e).tuiLet,c=m(3);return x(c.onItemHovered(o,s))})("tuiPressedChange",function(o){let s=O(e).tuiLet,c=m(3);return x(c.onItemPressed(o,s))}),g(1,"div",5),X(2),h()()}if(t&2){let e=n.tuiLet,i=m(3);S("t-cell_interval",i.itemIsInterval(e))("t-cell_today",i.itemIsToday(e)),u("tuiScrollIntoView",i.scrollItemIntoView(e)),L("data-range",i.getItemRange(e))("data-state",i.getItemState(e)),d(2),Fi(e)}}function Al(t,n){if(t&1&&(Te(0),C(1,Pl,3,8,"div",3),ye()),t&2){let e=n.$implicit,i=m().$implicit,o=m();d(1),u("tuiLet",o.getItem(i,e))}}function kl(t,n){t&1&&(g(0,"div",1),C(1,Al,2,1,"ng-container",2),h()),t&2&&(d(1),u("tuiRepeatTimesOf",4))}var Fa=100,Ba=4,La=(()=>{class t{constructor(){this.hoveredItem=null,this.pressedItem=null,this.currentYear=J.currentLocal().year,this.value=null,this.initialItem=J.currentLocal(),this.min=Ae,this.max=Le,this.disabledItemHandler=he,this.yearClick=new W}get computedMin(){var e;return(e=this.min)!==null&&e!==void 0?e:Ae}get computedMax(){var e;return(e=this.max)!==null&&e!==void 0?e:Le}get isSingle(){return this.isRange(this.value)&&this.value.from.yearSame(this.value.to)}get rows(){return Math.ceil((this.calculatedMax-this.calculatedMin)/Ba)}get calculatedMin(){let e=this.initialItem.year-Fa,i=this.computedMin;return i.year>e?i.year:e}get calculatedMax(){let e=this.initialItem.year+Fa,i=this.computedMax;return i.yeari.from.year&&i.from.year===e&&i.from.yearSame(i.to)||o!==null&&o===e&&oi.from.year&&i.from.yearSame(i.to)?Ne.End:i.from.yearSame(i.to)&&i.from.year===e?Ne.Single:null:i.find(r=>r.year===e)?Ne.Single:null}itemIsToday(e){return this.currentYear===e}itemIsInterval(e){let{value:i,hoveredItem:o}=this;return i===null||!this.isRange(i)?!1:i.from.yearSame(i.to)?o===null||i.from.year===o?!1:Qe(e,Math.min(i.from.year,o),Math.max(i.from.year,o)):i.from.year<=e&&i.to.year>e}onItemHovered(e,i){this.updateHoveredItem(e,i)}onItemPressed(e,i){this.updatePressedItem(e,i)}onItemClick(e){this.yearClick.emit(new be(e))}updateHoveredItem(e,i){this.hoveredItem=e?i:null}updatePressedItem(e,i){this.pressedItem=e?i:null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=k({type:t,selectors:[["tui-primitive-year-picker"]],hostVars:2,hostBindings:function(e,i){e&2&&S("_single",i.isSingle)},inputs:{value:"value",initialItem:"initialItem",min:"min",max:"max",disabledItemHandler:"disabledItemHandler"},outputs:{yearClick:"yearClick"},decls:1,vars:1,consts:[["automation-id","tui-primitive-year-picker__row","class","t-row",4,"tuiRepeatTimes","tuiRepeatTimesOf"],["automation-id","tui-primitive-year-picker__row",1,"t-row"],[4,"tuiRepeatTimes","tuiRepeatTimesOf"],["automation-id","tui-primitive-year-picker__cell","class","t-cell",3,"t-cell_interval","t-cell_today","tuiScrollIntoView","click","tuiHoveredChange","tuiPressedChange",4,"tuiLet"],["automation-id","tui-primitive-year-picker__cell",1,"t-cell",3,"tuiScrollIntoView","click","tuiHoveredChange","tuiPressedChange"],[1,"t-item"]],template:function(e,i){e&1&&C(0,kl,2,1,"div",0),e&2&&u("tuiRepeatTimesOf",i.rows)},dependencies:[yn,It,Ta,ti,Tn],styles:['[_nghost-%COMP%]{display:block;font:var(--tui-font-text-m)}.t-row[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:space-between;height:2.25rem;isolation:isolate}.t-item[_ngcontent-%COMP%]{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item[_ngcontent-%COMP%]:before, .t-item[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-item[_ngcontent-%COMP%]:after{border-radius:.5rem}.t-cell[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:3.9375rem;text-align:center;outline:none;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:.125rem solid transparent}.t-cell[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today[_ngcontent-%COMP%]:after{position:absolute;left:50%;transform:translate(-50%);content:"";bottom:.3125rem;height:.125rem;width:.75rem;border-radius:.375rem;background-color:var(--tui-text-01)}.t-cell_interval[_ngcontent-%COMP%]:before{background:var(--tui-base-02)}._single[_nghost-%COMP%] .t-cell_interval[_ngcontent-%COMP%]:before{background:var(--tui-secondary-hover)}.t-cell_interval[_ngcontent-%COMP%]:not(:last-child):before{right:-.25rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell_interval[_ngcontent-%COMP%]:not([data-range="start"]):not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell_interval[_ngcontent-%COMP%]:last-child:first-child:before{right:0}.t-cell_interval[_ngcontent-%COMP%]:first-child > .t-item[_ngcontent-%COMP%]{border-top-left-radius:var(--tui-radius-m);border-bottom-left-radius:var(--tui-radius-m)}.t-cell_interval[_ngcontent-%COMP%]:last-child > .t-item[_ngcontent-%COMP%]{border-top-right-radius:var(--tui-radius-m);border-bottom-right-radius:var(--tui-radius-m)}.t-cell_interval[_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{border-radius:0}.t-cell[data-range][_ngcontent-%COMP%]:after{background-color:var(--tui-primary-text)}.t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{color:var(--tui-primary-text)}.t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary)}.t-cell[data-range][data-state=hover][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][data-state=hover][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary-hover)}.t-cell[data-range][data-state=active][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][data-state=active][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary-active)}.t-cell[data-range=end][_ngcontent-%COMP%]:before{background:var(--tui-base-02)}._single[_nghost-%COMP%] .t-cell[data-range=end][_ngcontent-%COMP%]:before{background:var(--tui-secondary-hover)}.t-cell[data-range=end][_ngcontent-%COMP%]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before{left:.625rem;border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{left:-2rem;right:100%;transform:translate(1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=start][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before{right:.625rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{left:100%;right:-2rem;transform:translate(-1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=single][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{display:none}.t-cell[data-state=disabled][_ngcontent-%COMP%]{pointer-events:none}.t-cell[data-state=disabled][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{opacity:.36}.t-cell[data-state=hover][_ngcontent-%COMP%]:hover:not([data-range]) > .t-item[_ngcontent-%COMP%]{background-color:var(--tui-secondary-hover)}.t-cell[data-state=active][_ngcontent-%COMP%]:hover:not([data-range]) > .t-item[_ngcontent-%COMP%]{background-color:var(--tui-secondary-active)}[_nghost-%COMP%]{width:15.75rem}.t-row[_ngcontent-%COMP%]{margin:.875rem 0}.t-row[_ngcontent-%COMP%]:first-child{margin-top:0}.t-row[_ngcontent-%COMP%]:last-child{margin-bottom:0}'],changeDetection:0}),t})(),Ha=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[Dt,ii,Dn,Mt,ya]]}),t})();function Sl(t,n){if(t&1){let e=z();Te(0),g(1,"button",1),f("click",function(){O(e);let o=m();return x(o.onLeftClick())}),h(),g(2,"span",2),Y(3),h(),g(4,"button",3),f("click",function(){O(e);let o=m();return x(o.onRightClick())}),h(),ye()}if(t&2){let e=n.ngIf,i=m();d(1),S("t-hidden",i.leftComputedDisabled),u("focusable",i.computedFocusable)("icon",i.icons.decrement)("title",e[0]),d(3),S("t-hidden",i.rightComputedDisabled),u("focusable",i.computedFocusable)("icon",i.icons.increment)("title",e[1])}}var Fl=["*"],Ra=(()=>{class t extends Yi{constructor(e,i,o){super(),this.el=e,this.icons=i,this.spinTexts$=o,this.disabled=!1,this.leftDisabled=!1,this.rightDisabled=!1,this.leftClick=new W,this.rightClick=new W}get focused(){return ut(this.el.nativeElement)}get leftComputedDisabled(){return this.computedDisabled||this.leftDisabled}get rightComputedDisabled(){return this.computedDisabled||this.rightDisabled}onLeftClick(){this.leftComputedDisabled||this.leftClick.emit()}onRightClick(){this.rightComputedDisabled||this.rightClick.emit()}onFocused(e){this.updateFocused(e)}onFocusVisible(e){this.updateFocusVisible(e)}}return t.\u0275fac=function(e){return new(e||t)(l(E),l(Ur),l(Vr))},t.\u0275cmp=k({type:t,selectors:[["tui-primitive-spin-button"]],hostBindings:function(e,i){e&1&&f("mousedown.silent.prevent",function(){return 0})("keydown.arrowLeft.prevent",function(){return i.onLeftClick()})("keydown.arrowRight.prevent",function(){return i.onRightClick()})("focusin",function(){return i.onFocused(!0)})("focusout",function(){return i.onFocused(!1)})},inputs:{disabled:"disabled",leftDisabled:"leftDisabled",rightDisabled:"rightDisabled"},outputs:{leftClick:"leftClick",rightClick:"rightClick"},features:[P],ngContentSelectors:Fl,decls:2,vars:3,consts:[[4,"ngIf"],["appearance","flat","automation-id","tui-primitive-spin-button__left","size","xs","tuiIconButton","","type","button",3,"focusable","icon","title","click"],[1,"t-content","t-calendar-title"],["appearance","flat","automation-id","tui-primitive-spin-button__right","size","xs","tuiIconButton","","type","button",3,"focusable","icon","title","click"]],template:function(e,i){e&1&&(oe(),C(0,Sl,5,10,"ng-container",0),Q(1,"async")),e&2&&u("ngIf",$(1,1,i.spinTexts$))},dependencies:[mn,re,ve],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--tui-font-text-l);text-align:center;font-weight:bold}.t-hidden[_ngcontent-%COMP%]{visibility:hidden}.t-content[_ngcontent-%COMP%]{padding:0 .5rem}"],changeDetection:0}),t})(),Na=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,hn]]}),t})();var Ll=(t,n)=>{let e=new Date(t.year,t.month,1).getDay();return e>=n?e-n:wn-(n-e)},Hl=({month:t,rowIndex:n,colIndex:e,firstDayOfWeek:i})=>{let o=n*wn+e-Ll(t,i)+1;return o>t.daysCount&&(o-=t.daysCount,t=t.append({month:1})),o<=0&&(t=t.append({month:-1}),o=t.daysCount+o),new ce(t.year,t.month,o)},Rl=6,Va=(()=>{class t{constructor(e){this.firstDayOfWeek=e,this.currentMonth=null,this.currentSheet=[]}transform(e,i=!1){var o;if(!((o=this.currentMonth)===null||o===void 0)&&o.monthSame(e))return this.currentSheet;let r=[];for(let s=0;sD.yearD.year>w.year||D.month>w.month;if(!(_(v)&&!i)){if(y(v)&&!i)break;c.push(v)}}r.push(c)}return this.currentSheet=r.filter(s=>s.length),this.currentMonth=e,this.currentSheet}}return t.\u0275fac=function(e){return new(e||t)(l(ln,16))},t.\u0275pipe=kt({name:"tuiCalendarSheet",type:t,pure:!0}),t})(),Ga=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var To=(()=>{class t{constructor(e){this.months$=e}transform({month:e}){return this.months$.pipe(N(i=>i[e]))}}return t.\u0275fac=function(e){return new(e||t)(l(Nr,16))},t.\u0275pipe=kt({name:"tuiMonth",type:t,pure:!0}),t})(),Ua=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();function Nl(t){let n=t.length-1;return[t[n],...t.slice(0,n)]}var za=(()=>{class t{constructor(e){this.firstDayOfWeekIndex=e}transform(e){return e.pipe(N(Nl),N(i=>[...i.slice(this.firstDayOfWeekIndex),...i.slice(0,this.firstDayOfWeekIndex)]))}}return t.\u0275fac=function(e){return new(e||t)(l(ln,16))},t.\u0275pipe=kt({name:"tuiOrderWeekDays",type:t,pure:!0}),t})(),Wa=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();function Gl(t,n){if(t&1&&(Te(0),X(1),ye()),t&2){let e=m();d(1),me(" ",e.value.formattedYear," ")}}function Ul(t,n){if(t&1){let e=z();g(0,"button",3),f("click",function(){O(e);let o=m();return x(o.onYearClick())}),X(1),h()}if(t&2){let e=m();u("tuiFocusable",!1),d(1),me(" ",e.value.formattedYear," ")}}var Xa=(()=>{class t{constructor(){this.value=J.currentLocal(),this.min=Ae,this.max=Le,this.valueChange=new W,this.yearClick=new W}get computedMin(){var e;return(e=this.min)!==null&&e!==void 0?e:Ae}get computedMax(){var e;return(e=this.max)!==null&&e!==void 0?e:Le}get prevMonthDisabled(){return this.value.monthSameOrBefore(this.computedMin)}get nextMonthDisabled(){return this.value.monthSameOrAfter(this.computedMax)}get oneYear(){let{computedMin:e,computedMax:i}=this;return e.year===i.year}onYearClick(){this.yearClick.next(this.value)}onPrevMonthClick(){this.appendValueWithLimit({month:-1})}onNextMonthClick(){this.appendValueWithLimit({month:1})}appendValueWithLimit(e){let i=this.value.append(e),{computedMin:o,computedMax:r}=this;if(o.monthSameOrAfter(i)){this.updateValue(o);return}this.updateValue(r.monthSameOrBefore(i)?r:i)}updateValue(e){this.value.monthSame(e)||(this.value=e,this.valueChange.emit(e))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=k({type:t,selectors:[["tui-primitive-year-month-pagination"]],inputs:{value:"value",min:"min",max:"max"},outputs:{valueChange:"valueChange",yearClick:"yearClick"},decls:7,vars:10,consts:[[3,"focusable","leftDisabled","rightDisabled","leftClick","rightClick"],[4,"ngIf","ngIfElse"],["button",""],["id","year-btn","automation-id","tui-primitive-year-month-pagination__year-button","tuiLink","","type","button",3,"tuiFocusable","click"]],template:function(e,i){if(e&1&&(g(0,"tui-primitive-spin-button",0),f("leftClick",function(){return i.onPrevMonthClick()})("rightClick",function(){return i.onNextMonthClick()}),X(1),Q(2,"async"),Q(3,"tuiMonth"),C(4,Gl,2,1,"ng-container",1)(5,Ul,2,2,"ng-template",null,2,fe),h()),e&2){let o=K(6);u("focusable",!1)("leftDisabled",i.prevMonthDisabled)("rightDisabled",i.nextMonthDisabled),d(1),me(" ",$(2,6,$(3,8,i.value))," "),d(3),u("ngIf",i.oneYear)("ngIfElse",o)}},dependencies:[Ra,qt,re,nt,ve,To],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),t})(),Qa=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,ot,Na,ei,Ua]]}),t})();function Wl(t,n){if(t&1&&A(0,"div",3),t&2){let e=n.$implicit;u("textContent",e)}}function Xl(t,n){if(t&1&&A(0,"div",14),t&2){let e=m().ngIf;ke("background-color",(e==null?null:e[1])||"")}}function Ql(t,n){if(t&1&&(g(0,"div",13),A(1,"div",14),C(2,Xl,1,2,"div",15),h()),t&2){let e=n.ngIf;d(1),ke("background-color",e==null?null:e[0]),d(1),u("ngIf",e.length>1)}}function jl(t,n){if(t&1){let e=z();g(0,"div",10),f("click",function(){O(e);let o=m().tuiLet,r=m(4);return x(r.onItemClick(o))})("tuiHoveredChange",function(o){O(e);let r=m().tuiLet,s=m(4);return x(s.onItemHovered(o&&r))})("tuiPressedChange",function(o){O(e);let r=m().tuiLet,s=m(4);return x(s.onItemPressed(o&&r))}),g(1,"div",11),Q(2,"tuiMapper"),X(3),C(4,Ql,3,3,"div",12),Q(5,"tuiMapper"),h()()}if(t&2){let e=m().tuiLet,i=m(4);S("t-cell_interval",i.itemIsInterval(e))("t-cell_today",i.itemIsToday(e))("t-cell_unavailable",i.itemIsUnavailable(e)),L("data-range",i.getItemRange(e))("data-state",i.getItemState(e)),d(1),S("t-item_unavailable",i.itemIsUnavailable(e)),L("data-type",Kn(2,13,e,i.dayTypeHandler)),d(2),me(" ",e.day," "),d(1),u("ngIf",Bi(5,16,e,i.toMarkers,i.itemIsToday(e),!!i.getItemRange(e)))}}function Yl(t,n){if(t&1&&(Te(0),C(1,jl,6,21,"div",9),ye()),t&2){let e=n.tuiLet,i=m(4);d(1),u("ngIf",!i.itemIsUnavailable(e)||i.showAdjacent)}}function Zl(t,n){if(t&1&&(Te(0),C(1,Yl,2,1,"ng-container",8),ye()),t&2){let e=n.$implicit,i=m().$implicit,o=m().tuiLet;d(1),u("tuiLet",o[i][e])}}function Jl(t,n){if(t&1&&(g(0,"div",6),C(1,Zl,2,1,"ng-container",7),h()),t&2){let e=n.$implicit,i=m().tuiLet;d(1),u("tuiRepeatTimesOf",i[e].length)}}function $l(t,n){if(t&1&&(g(0,"div",4),C(1,Jl,2,1,"div",5),h()),t&2){let e=n.tuiLet;d(1),u("tuiRepeatTimesOf",e.length)}}var ja=(()=>{class t{constructor(e,i){this.unorderedWeekDays$=e,this.dayTypeHandler=i,this.pressedItem=null,this.today=ce.currentLocal(),this.month=J.currentLocal(),this.disabledItemHandler=he,this.markerHandler=Zt,this.value=null,this.hoveredItem=null,this.showAdjacent=!0,this.hoveredItemChange=new W,this.dayClick=new W,this.toMarkers=(o,r,s)=>{if(r||s)return null;let c=this.markerHandler(o);return c.length===0?null:c}}get isSingleDayRange(){return this.value instanceof Ot&&this.value.isSingleDay}get isSingle(){return this.isSingleDayRange}getItemState(e){let{disabledItemHandler:i,pressedItem:o,hoveredItem:r}=this;return i(e)?yt.Disabled:o!=null&&o.daySame(e)?yt.Active:r!=null&&r.daySame(e)?yt.Hover:null}getItemRange(e){let{value:i,hoveredItem:o}=this;return i?i instanceof ce?i.daySame(e)?Ne.Single:null:i instanceof Ot?i.from.daySame(e)&&!i.isSingleDay||o!=null&&o.dayAfter(i.from)&&i.from.daySame(e)&&i.isSingleDay||o!=null&&o.daySame(e)&&o.dayBefore(i.from)&&i.isSingleDay?Ne.Start:i.to.daySame(e)&&!i.isSingleDay||o!=null&&o.dayBefore(i.from)&&i.from.daySame(e)&&i.isSingleDay||o!=null&&o.daySame(e)&&o.dayAfter(i.from)&&i.isSingleDay?Ne.End:i.isSingleDay&&i.from.daySame(e)?Ne.Single:null:i.find(r=>r.daySame(e))?Ne.Single:null:null}itemIsToday(e){return this.today.daySame(e)}itemIsUnavailable(e){return!this.month.monthSame(e)}itemIsInterval(e){let{value:i,hoveredItem:o}=this;if(!(i instanceof Ot))return!1;if(!i.isSingleDay)return i.from.daySameOrBefore(e)&&i.to.dayAfter(e);if(o===null)return!1;let r=Ot.sort(i.from,o);return r.from.daySameOrBefore(e)&&r.to.dayAfter(e)}onItemHovered(e){this.updateHoveredItem(e||null)}onItemPressed(e){this.pressedItem=e||null}onItemClick(e){this.dayClick.emit(e)}updateHoveredItem(e){zt(this.hoveredItem,e,(i,o)=>i.daySame(o))||(this.hoveredItem=e,this.hoveredItemChange.emit(e))}}return t.\u0275fac=function(e){return new(e||t)(l(Gr),l(Rr))},t.\u0275cmp=k({type:t,selectors:[["tui-primitive-calendar"]],hostVars:2,hostBindings:function(e,i){e&2&&S("_single",i.isSingleDayRange)},inputs:{month:"month",disabledItemHandler:"disabledItemHandler",markerHandler:"markerHandler",value:"value",hoveredItem:"hoveredItem",showAdjacent:"showAdjacent"},outputs:{hoveredItemChange:"hoveredItemChange",dayClick:"dayClick"},decls:6,vars:9,consts:[[1,"t-row","t-row_weekday"],["class","t-cell",3,"textContent",4,"ngFor","ngForOf"],["id","date-rows",4,"tuiLet"],[1,"t-cell",3,"textContent"],["id","date-rows"],["automation-id","tui-primitive-calendar__row","class","t-row",4,"tuiRepeatTimes","tuiRepeatTimesOf"],["automation-id","tui-primitive-calendar__row",1,"t-row"],[4,"tuiRepeatTimes","tuiRepeatTimesOf"],[4,"tuiLet"],["automation-id","tui-primitive-calendar__cell","class","t-cell",3,"t-cell_interval","t-cell_today","t-cell_unavailable","click","tuiHoveredChange","tuiPressedChange",4,"ngIf"],["automation-id","tui-primitive-calendar__cell",1,"t-cell",3,"click","tuiHoveredChange","tuiPressedChange"],["automation-id","tui-primitive-calendar__item",1,"t-item"],["class","t-dots",4,"ngIf"],[1,"t-dots"],[1,"t-dot"],["class","t-dot",3,"backgroundColor",4,"ngIf"]],template:function(e,i){e&1&&(g(0,"div",0),C(1,Wl,1,1,"div",1),Q(2,"async"),Q(3,"tuiOrderWeekDays"),h(),C(4,$l,2,1,"div",2),Q(5,"tuiCalendarSheet")),e&2&&(d(1),u("ngForOf",$(2,2,$(3,4,i.unorderedWeekDays$))),d(3),u("tuiLet",Kn(5,6,i.month,!0)))},dependencies:[Gt,It,yn,re,ti,Tn,ve,za,Va,Ji],styles:['[_nghost-%COMP%]{display:block;font:var(--tui-font-text-m)}.t-row[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:space-between;height:2.25rem;isolation:isolate}.t-item[_ngcontent-%COMP%]{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item[_ngcontent-%COMP%]:before, .t-item[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-item[_ngcontent-%COMP%]:after{border-radius:.5rem}.t-cell[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:2.25rem;text-align:center;outline:none;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:.125rem solid transparent}.t-cell[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today[_ngcontent-%COMP%]:after{position:absolute;left:50%;transform:translate(-50%);content:"";bottom:.3125rem;height:.125rem;width:.75rem;border-radius:.375rem;background-color:var(--tui-text-01)}.t-cell_interval[_ngcontent-%COMP%]:before{background:var(--tui-base-02)}._single[_nghost-%COMP%] .t-cell_interval[_ngcontent-%COMP%]:before{background:var(--tui-secondary-hover)}.t-cell_interval[_ngcontent-%COMP%]:not(:last-child):before{right:-.25rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell_interval[_ngcontent-%COMP%]:not([data-range="start"]):not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell_interval[_ngcontent-%COMP%]:last-child:first-child:before{right:0}.t-cell_interval[_ngcontent-%COMP%]:first-child > .t-item[_ngcontent-%COMP%]{border-top-left-radius:var(--tui-radius-m);border-bottom-left-radius:var(--tui-radius-m)}.t-cell_interval[_ngcontent-%COMP%]:last-child > .t-item[_ngcontent-%COMP%]{border-top-right-radius:var(--tui-radius-m);border-bottom-right-radius:var(--tui-radius-m)}.t-cell_interval[_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{border-radius:0}.t-cell[data-range][_ngcontent-%COMP%]:after{background-color:var(--tui-primary-text)}.t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{color:var(--tui-primary-text)}.t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary)}.t-cell[data-range][data-state=hover][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][data-state=hover][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary-hover)}.t-cell[data-range][data-state=active][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][data-state=active][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary-active)}.t-cell[data-range=end][_ngcontent-%COMP%]:before{background:var(--tui-base-02)}._single[_nghost-%COMP%] .t-cell[data-range=end][_ngcontent-%COMP%]:before{background:var(--tui-secondary-hover)}.t-cell[data-range=end][_ngcontent-%COMP%]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before{left:.625rem;border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{left:-2rem;right:100%;transform:translate(1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=start][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before{right:.625rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{left:100%;right:-2rem;transform:translate(-1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=single][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{display:none}.t-cell[data-state=disabled][_ngcontent-%COMP%]{pointer-events:none}.t-cell[data-state=disabled][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{opacity:.36}.t-cell[data-state=hover][_ngcontent-%COMP%]:hover:not([data-range]) > .t-item[_ngcontent-%COMP%]{background-color:var(--tui-secondary-hover)}.t-cell[data-state=active][_ngcontent-%COMP%]:hover:not([data-range]) > .t-item[_ngcontent-%COMP%]{background-color:var(--tui-secondary-active)}[_nghost-%COMP%]{width:15.75rem}.t-row[_ngcontent-%COMP%]{justify-content:flex-start}.t-row[_ngcontent-%COMP%]:first-child{justify-content:flex-end}.t-row_weekday[_ngcontent-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none}.t-item[_ngcontent-%COMP%]{display:flex;flex-direction:column}.t-item_unavailable[_ngcontent-%COMP%]{opacity:var(--tui-disabled-opacity)}.t-dots[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:-.5rem;padding-bottom:.25rem}.t-dot[_ngcontent-%COMP%]{display:inline-block;width:.25rem;height:.25rem;border-radius:100%;margin:0 .0625rem}'],changeDetection:0}),t})(),Ya=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,Mt,$i,Dn,Dt,ii,Ga,Wa]]}),t})();function ql(t,n){if(t&1){let e=z();g(0,"tui-scrollbar",2)(1,"tui-primitive-year-picker",3),f("yearClick",function(o){O(e);let r=m();return x(r.onPickerYearClick(o))}),h()()}if(t&2){let e=m();d(1),u("initialItem",e.month)("max",e.computedMax)("min",e.computedMin)("value",e.value)}}function eu(t,n){if(t&1){let e=z();g(0,"tui-primitive-year-month-pagination",4),f("valueChange",function(o){O(e);let r=m();return x(r.onPaginationValueChange(o))})("yearClick",function(){O(e);let o=m();return x(o.onPaginationYearClick())}),h(),g(1,"tui-primitive-calendar",5),f("dayClick",function(o){O(e);let r=m();return x(r.onDayClick(o))})("hoveredItemChange",function(o){O(e);let r=m();return x(r.onHoveredItemChange(o))}),Q(2,"tuiMapper"),h()}if(t&2){let e=m();u("max",e.computedMaxViewedMonth)("min",e.computedMinViewedMonth)("value",e.month),d(1),u("disabledItemHandler",Bi(2,9,e.disabledItemHandler,e.disabledItemHandlerMapper,e.computedMin,e.computedMax))("hoveredItem",e.hoveredItem)("markerHandler",e.markerHandler)("month",e.month)("showAdjacent",e.showAdjacent)("value",e.value)}}var Ln=(()=>{class t{constructor(){this.day=null,this.view="month",this.month=J.currentLocal(),this.disabledItemHandler=he,this.min=Ae,this.max=Le,this.minViewedMonth=Ae,this.maxViewedMonth=Le,this.hoveredItem=null,this.showAdjacent=!0,this.markerHandler=Zt,this.dayClick=new W,this.monthChange=new W,this.hoveredItemChange=new W,this.disabledItemHandlerMapper=(e,i,o)=>r=>r.dayBefore(i)||r.dayAfter(o)||e(r)}set initialView(e){this.view=e}set value(e){this.day=e,this.showAdjacent&&e instanceof ce&&(this.month=e)}get value(){return this.day}get isInYearView(){return this.view==="year"}get computedMin(){var e;return(e=this.min)!==null&&e!==void 0?e:Ae}get computedMax(){var e;return(e=this.max)!==null&&e!==void 0?e:Le}get computedMinViewedMonth(){var e;let i=this.computedMin,o=(e=this.minViewedMonth)!==null&&e!==void 0?e:Ae;return o.monthSameOrAfter(i)?o:i}get computedMaxViewedMonth(){var e;let i=this.computedMax,o=(e=this.maxViewedMonth)!==null&&e!==void 0?e:Le;return o.monthSameOrBefore(i)?o:i}onPaginationYearClick(){this.view="year"}onPickerYearClick({year:e}){this.view="month",this.updateViewedMonth(new J(e,this.month.month))}onPaginationValueChange(e){this.updateViewedMonth(e)}onDayClick(e){this.dayClick.emit(e)}onHoveredItemChange(e){this.updateHoveredDay(e)}updateViewedMonth(e){this.month.monthSame(e)||(this.month=e,this.monthChange.emit(e))}updateHoveredDay(e){zt(this.hoveredItem,e,(i,o)=>i.daySame(o))||(this.hoveredItem=e,this.hoveredItemChange.emit(e))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=k({type:t,selectors:[["tui-calendar"]],inputs:{initialView:"initialView",month:"month",disabledItemHandler:"disabledItemHandler",min:"min",max:"max",minViewedMonth:"minViewedMonth",maxViewedMonth:"maxViewedMonth",hoveredItem:"hoveredItem",showAdjacent:"showAdjacent",markerHandler:"markerHandler",value:"value"},outputs:{dayClick:"dayClick",monthChange:"monthChange",hoveredItemChange:"hoveredItemChange"},decls:3,vars:2,consts:[["automation-id","tui-calendar__scrollbar","class","t-scrollbar",4,"ngIf","ngIfElse"],["calendar",""],["automation-id","tui-calendar__scrollbar",1,"t-scrollbar"],["automation-id","tui-calendar__year",3,"initialItem","max","min","value","yearClick"],["automation-id","tui-calendar__pagination",1,"t-pagination",3,"max","min","value","valueChange","yearClick"],["automation-id","tui-calendar__calendar",3,"disabledItemHandler","hoveredItem","markerHandler","month","showAdjacent","value","dayClick","hoveredItemChange"]],template:function(e,i){if(e&1&&C(0,ql,2,4,"tui-scrollbar",0)(1,eu,3,14,"ng-template",null,1,fe),e&2){let o=K(2);u("ngIf",i.isInYearView)("ngIfElse",o)}},dependencies:[xt,La,Xa,ja,re,Ji],styles:["[_nghost-%COMP%]{display:block;height:18.25rem;width:15.75rem;padding:1rem 1.125rem;box-sizing:content-box}.t-scrollbar[_ngcontent-%COMP%]{height:18.25rem;width:16.875rem}.t-pagination[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0}),t})(),Hn=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,Qa,Ya,Ha,li,$i]]}),t})();var Za=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=M({type:t,selectors:[["ng-template","tuiDataList",""]]}),t})();var tu=["wrapper"];function iu(t,n){if(t&1&&(g(0,"div",8),X(1),h()),t&2){let e=n.polymorpheusOutlet;d(1),me(" ",e," ")}}var nu=(t,n)=>({$implicit:t,close:n});function ou(t,n){if(t&1){let e=z();g(0,"div",5,6),f("keydown",function(o){O(e);let r=m(2);return x(r.onKeydown(o))}),C(2,iu,2,1,"div",7),h(),A(3,"div")}if(t&2){m();let e=K(1),i=m();d(2),u("polymorpheusOutlet",i.content)("polymorpheusOutletContext",Wo(2,nu,e,i.close))}}function ru(t,n){if(t&1){let e=z();g(0,"div",1,2),f("tuiActiveZoneChange",function(o){O(e);let r=m();return x(r.onActiveZone(o))})("tuiObscured",function(o){O(e);let r=m();return x(r.onHostObscured(o))}),Y(2),C(3,ou,4,5,"ng-template",3,4,fe),h()}if(t&2){let e=n.tuiLet,i=K(4),o=m();u("tuiDropdown",i)("tuiDropdownManual",e&&o.canOpen)("tuiDropdownSided",o.sided)("tuiObscuredEnabled",e),d(3),u("polymorpheus",o.context)}}var au=["*"],Ja=(()=>{class t extends ct{constructor(){super(...arguments),this.type="dummy"}getPosition(){return[0,0]}}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["","tuiAccessorProxy",""]],features:[T([{provide:ct,multi:!0,deps:[[new xe,new pi,t],t],useFactory:(n,e)=>n||e}]),P]}),t})(),$a=new We("[TUI_HOSTED_DROPDOWN_COMPONENT]"),su=(()=>{class t{constructor(e,i,o,r){r==null||r.tuiDropdownOpenChange.pipe(at(s=>s&&r.dropdown===o&&!i.focused),ie(e)).subscribe(()=>{var s;(s=i.nativeFocusableElement)===null||s===void 0||s.focus(),i.updateOpen(!0)})}}return t.\u0275fac=function(e){return new(e||t)(l(U,2),l($a),l(pt,2),l(vi,8))},t.\u0275dir=M({type:t,selectors:[["","tuiDropdownOpenMonitor",""]],features:[T([U])]}),t})(),lu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=M({type:t,selectors:[["","tuiHostedDropdownHost",""]]}),t})();function uu(t){var n;return"key"in t&&t.key.toLowerCase()==="escape"&&this.canOpen&&this.open&&!(!((n=this.dropdown)===null||n===void 0)&&n.nextElementSibling)}var ci=(()=>{class t{constructor(e,i){this.hover$=e,this.el=i,this.openChange$=new ht(!1),this.hostHover$=Yn([we(this.el.nativeElement,"mouseover").pipe(N(o=>this.computedHost.contains(Vi(o))),ft(o=>{var r,s;return He(o).pipe(st((o?(r=this.hover$)===null||r===void 0?void 0:r.showDelay:(s=this.hover$)===null||s===void 0?void 0:s.hideDelay)||0))})),this.hover$||Bo]).pipe(N(([o,r])=>o&&r)),this.sided=!1,this.canOpen=!0,this.open$=Me(this.openChange$,this.hostHover$).pipe(Nt(1),ze(),xi()),this.focusedChange=new W,this.focus$=new ht(!1),this.openChange=this.openChange$,this.close=()=>this.updateOpen(!1)}set open(e){this.openChange.next(e)}get open(){return this.openChange.value}get host(){var e;return((e=this.dropdownHost)===null||e===void 0?void 0:e.nativeElement)||this.el.nativeElement}get computedHost(){var e;return((e=this.dropdownHost)===null||e===void 0?void 0:e.nativeElement)||this.nativeFocusableElement||this.el.nativeElement}get dropdown(){var e,i;return(i=(e=this.dropdownDirective)===null||e===void 0?void 0:e.dropdownBoxRef)===null||i===void 0?void 0:i.location.nativeElement}get nativeFocusableElement(){return rr(this.host)?this.host:Wt({initial:this.host,root:this.el.nativeElement})}get focused(){return ut(this.host)||this.open&&!!this.wrapper&&ut(this.wrapper.nativeElement)}onFocusInOut(){this.focus$.next(this.focused)}onFocusIn(e){this.computedHost.contains(e)||this.updateOpen(!1)}onClick(e){var i;!this.hostEditable&&this.computedHost.contains(e)&&!(!((i=this.hover$)===null||i===void 0)&&i.hovered)&&this.updateOpen(!this.open)}onKeyDownEsc(e){e.preventDefault(),this.closeDropdown()}onArrow(e,i){this.focusDropdown(e,i)}onKeydown({key:e,target:i,defaultPrevented:o}){!o&&Br(e)&&this.hostEditable&&Ni(i)&&!Gi(i)&&this.focusHost()}onActiveZone(e){this.updateFocused(e),e||this.updateOpen(!1)}onHostObscured(e){e&&this.closeDropdown()}updateOpen(e){(!e||this.canOpen)&&(this.open=e)}get hostEditable(){return Gi(this.computedHost)}focusDropdown(e,i){let o=this.nativeFocusableElement;if(!o||!Ni(o)||!Ct(e.target)||!o.contains(e.target))return;if(!this.wrapper||!this.open||!this.dropdown||!Ni(this.wrapper.nativeElement.nextElementSibling)){this.updateOpen(!0),Gi(o)||e.preventDefault();return}let r=i?this.wrapper.nativeElement:this.wrapper.nativeElement.nextElementSibling,s=Wt({initial:r,root:this.wrapper.nativeElement,previous:!i});s&&(s.focus(),e.preventDefault())}closeDropdown(){this.focused&&this.focusHost(),this.updateOpen(!1)}focusHost(){let e=this.nativeFocusableElement;e&&e.focus({preventScroll:!0})}updateFocused(e){this.focusedChange.emit(e)}}return t.\u0275fac=function(e){return new(e||t)(l(vo,10),l(E))},t.\u0275cmp=k({type:t,selectors:[["tui-hosted-dropdown"]],contentQueries:function(e,i,o){if(e&1&&vt(o,lu,5,E),e&2){let r;V(r=G())&&(i.dropdownHost=r.first)}},viewQuery:function(e,i){if(e&1&&(j(tu,5,E),j(pt,5),j(Be,5)),e&2){let o;V(o=G())&&(i.wrapper=o.first),V(o=G())&&(i.dropdownDirective=o.first),V(o=G())&&(i.activeZone=o.first)}},hostVars:1,hostBindings:function(e,i){e&1&&f("$.class._hosted_dropdown_focused",function(){return i.focus$})("focusin.capture.silent",function(){return i.onFocusInOut()})("focusout.capture.silent",function(){return i.onFocusInOut()})("focusin",function(r){return i.onFocusIn(r.target)})("click",function(r){return i.onClick(r.target)})("keydown.silent.capture",function(r){return i.onKeyDownEsc(r)},!1,gi)("keydown.arrowDown",function(r){return i.onArrow(r,!0)})("keydown.arrowUp",function(r){return i.onArrow(r,!1)}),e&2&&Xe("$.class._hosted_dropdown_focused",i.focus$)},inputs:{content:"content",sided:"sided",canOpen:"canOpen",open:"open"},outputs:{open$:"openChange",focusedChange:"focusedChange"},features:[T([Pe(t),{provide:Ja,deps:[[new xe,new Vt,ct]],useFactory:n=>n==null?void 0:n[0]},{provide:$a,useExisting:t}])],ngContentSelectors:au,decls:2,vars:3,consts:[["tuiAccessorProxy","","tuiDropdownOpenMonitor","","class","t-wrapper",3,"tuiDropdown","tuiDropdownManual","tuiDropdownSided","tuiObscuredEnabled","tuiActiveZoneChange","tuiObscured",4,"tuiLet"],["tuiAccessorProxy","","tuiDropdownOpenMonitor","",1,"t-wrapper",3,"tuiDropdown","tuiDropdownManual","tuiDropdownSided","tuiObscuredEnabled","tuiActiveZoneChange","tuiObscured"],["activeZone","tuiActiveZone"],[3,"polymorpheus"],["dropdown","polymorpheus"],[1,"t-dropdown",3,"keydown"],["wrapper",""],["class","t-primitive",4,"polymorpheusOutlet","polymorpheusOutletContext"],[1,"t-primitive"]],template:function(e,i){if(e&1&&(oe(),C(0,ru,5,5,"div",0),Q(1,"async")),e&2){let o;u("tuiLet",(o=$(1,1,i.open$))!==null&&o!==void 0?o:i.openChange.value)}},dependencies:[It,Ja,su,pt,ma,ha,fa,Be,ea,Xi,q,ve],styles:["[_nghost-%COMP%]{display:inline-flex}.t-wrapper[_ngcontent-%COMP%]{border-radius:inherit;height:inherit;flex:1 1 auto;width:100%}.t-dropdown[_ngcontent-%COMP%]{height:100%}.t-primitive[_ngcontent-%COMP%]{padding:1rem}"],changeDetection:0}),Ie([Xr(uu)],t.prototype,"onKeyDownEsc",null),t})(),Rn=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,ae,Mt,ta,jt,Pn]]}),t})();function cu(t,n){if(t&1&&A(0,"tui-svg",2),t&2){let e=n.polymorpheusOutlet,i=m();S("t-mark_on",!i.empty),u("src",e)}}var du=t=>({$implicit:t}),pu=["*"],gu={size:"m",appearances:{unchecked:dt.Outline,checked:dt.Primary,indeterminate:dt.Primary},icons:{checked:({$implicit:t})=>t==="m"?"tuiIconCheck":"tuiIconCheckLarge",indeterminate:({$implicit:t})=>t==="m"?"tuiIconMinus":"tuiIconMinusLarge"}},Ci=Z(gu);var es=(()=>{class t{constructor(e){this.options=e,this.size=this.options.size,this.disabled=!1,this.focused=!1,this.hovered=!1,this.pressed=!1,this.invalid=!1,this.icon=this.options.icons.checked,this.value=!1}set valueSetter(e){e!==!1&&this.setCurrentIcon(e),this.value=e}get appearance(){switch(this.value){case!1:return this.options.appearances.unchecked;case!0:return this.options.appearances.checked;default:return this.options.appearances.indeterminate}}get empty(){return this.value===!1}setCurrentIcon(e){this.icon=e===null?this.options.icons.indeterminate:this.options.icons.checked}}return t.\u0275fac=function(e){return new(e||t)(l(Ci))},t.\u0275cmp=k({type:t,selectors:[["tui-primitive-checkbox"]],hostVars:1,hostBindings:function(e,i){e&2&&L("data-size",i.size)},inputs:{size:"size",disabled:"disabled",focused:"focused",hovered:"hovered",pressed:"pressed",invalid:"invalid",valueSetter:["value","valueSetter"]},ngContentSelectors:pu,decls:3,vars:10,consts:[["tuiWrapper","",3,"active","appearance","disabled","focus","hover","invalid"],["class","t-mark",3,"t-mark_on","src",4,"polymorpheusOutlet","polymorpheusOutletContext"],[1,"t-mark",3,"src"]],template:function(e,i){e&1&&(oe(),g(0,"div",0),C(1,cu,1,3,"tui-svg",1),Y(2),h()),e&2&&(u("active",i.pressed)("appearance",i.appearance)("disabled",i.disabled)("focus",i.focused)("hover",i.hovered)("invalid",i.invalid),d(1),u("polymorpheusOutlet",i.icon)("polymorpheusOutletContext",ue(8,du,i.size)))},dependencies:[_e,Ve,q],styles:["[_nghost-%COMP%]{display:block;font-size:0;flex-shrink:0}[data-size=m][_nghost-%COMP%]{width:1rem;height:1rem;border-radius:var(--tui-radius-xs)}[data-size=l][_nghost-%COMP%]{width:1.5rem;height:1.5rem;border-radius:var(--tui-radius-s)}.t-mark[_ngcontent-%COMP%]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:block;width:100%;height:100%;transform:scale(0)}.t-mark_on[_ngcontent-%COMP%]{transform:scale(1)}"],changeDetection:0}),t})(),ts=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[Ce,Ge,ae]]}),t})();function mu(t,n){if(t&1&&A(0,"tui-svg",3),t&2){let e=n.polymorpheusOutlet;u("src",e)}}var Nn=(()=>{class t extends Pt{constructor(e,i,o,r){super(o),this.isMobile=r,this.mode=null,this.describeId="",i.pipe(ie(e)).subscribe(s=>{this.mode=s})}get computedAppearance(){return this.appearance||this.mode||""}stopOnMobile(e){var i;this.isMobile&&(e.preventDefault(),e.stopPropagation()),(i=this.driver$)===null||i===void 0||i.toggle()}}return t.\u0275fac=function(e){return new(e||t)(l(U,2),l(tt),l(Ht),l(ji))},t.\u0275cmp=k({type:t,selectors:[["tui-tooltip"]],viewQuery:function(e,i){if(e&1&&j(ui,5),e&2){let o;V(o=G())&&(i.driver$=o.first)}},hostVars:1,hostBindings:function(e,i){e&1&&f("mousedown",function(r){return i.stopOnMobile(r)}),e&2&&L("data-appearance",i.computedAppearance)},inputs:{content:"content",direction:"direction",appearance:"appearance",showDelay:"showDelay",hideDelay:"hideDelay",describeId:"describeId",context:"context"},features:[T([U,it]),P],decls:4,vars:11,consts:[["appearance","icon","automation-id","tui-tooltip__icon","tuiWrapper","",1,"t-tooltip-icon",3,"hover","tuiHint","tuiHintAppearance","tuiHintContext","tuiHintDescribe","tuiHintDirection","tuiHintHideDelay","tuiHintShowDelay"],["driver","tuiHintHover"],[3,"src",4,"polymorpheusOutlet"],[3,"src"]],template:function(e,i){if(e&1&&(g(0,"span",0,1),Q(2,"async"),C(3,mu,1,1,"tui-svg",2),h()),e&2){let o=K(1);u("hover",$(2,9,o)||null)("tuiHint",i.content)("tuiHintAppearance",i.computedAppearance)("tuiHintContext",i.context)("tuiHintDescribe",i.describeId)("tuiHintDirection",i.direction)("tuiHintHideDelay",i.hideDelay)("tuiHintShowDelay",i.showDelay),d(3),u("polymorpheusOutlet",i.icon)}},dependencies:[_e,Ve,kn,Ca,ui,ba,_a,q,ve],styles:['[_nghost-%COMP%]{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle;font-size:0;line-height:0;pointer-events:auto;cursor:pointer;color:var(--tui-text-01)}[data-appearance=error][_nghost-%COMP%]{color:var(--tui-error-fill)}.t-tooltip-icon[_ngcontent-%COMP%]{display:inline-block;width:100%;height:100%;color:inherit}[tuiWrapper][data-appearance="textfield"][data-state="disabled"][_nghost-%COMP%] .t-tooltip-icon[_ngcontent-%COMP%], [tuiWrapper][data-appearance="textfield"][data-state="disabled"] [_nghost-%COMP%] .t-tooltip-icon[_ngcontent-%COMP%]{opacity:1}'],changeDetection:0}),t})(),Vn=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,Ge,Ce,En,ae]]}),t})();var fu=["pre"],vu=["focusableElement"];function _u(t,n){t&1&&Et(0)}function Cu(t,n){t&1&&Et(0)}function bu(t,n){t&1&&(g(0,"div",17),Y(1,2),h())}function Iu(t,n){if(t&1&&A(0,"tui-svg",20),t&2){let e=n.polymorpheusOutlet;u("src",e)}}var yo=t=>({$implicit:t});function Mu(t,n){if(t&1&&(g(0,"div",18),C(1,Iu,1,1,"tui-svg",19),h()),t&2){let e=m();d(1),u("polymorpheusOutlet",e.iconLeftContent)("polymorpheusOutletContext",ue(2,yo,e.size))}}function Tu(t,n){if(t&1&&(g(0,"label",21),Y(1,3),h()),t&2){let e=m();S("t-placeholder_raised",e.placeholderRaised),u("for",e.computedId)}}function yu(t,n){if(t&1&&A(0,"tui-svg",24),t&2){let e=n.polymorpheusOutlet;u("src",e)}}function Du(t,n){if(t&1&&(g(0,"div",22),C(1,yu,1,1,"tui-svg",23),h()),t&2){let e=m();d(1),u("polymorpheusOutlet",e.controller.customContent)}}function Ou(t,n){if(t&1&&A(0,"tui-svg",27),t&2){let e=n.polymorpheusOutlet;u("src",e)}}function xu(t,n){if(t&1){let e=z();g(0,"span",25),f("click.stop",function(){O(e);let o=m();return x(o.clear())}),C(1,Ou,1,1,"tui-svg",26),h()}if(t&2){let e=m();d(1),u("polymorpheusOutlet",e.iconCleaner||e.controller.options.iconCleaner)("polymorpheusOutletContext",ue(2,yo,e.size))}}function wu(t,n){if(t&1&&A(0,"tui-tooltip",28),t&2){let e=m();u("content",e.hintOptions==null?null:e.hintOptions.content)("describeId",e.computedId)}}function Pu(t,n){if(t&1&&A(0,"tui-svg",20),t&2){let e=n.polymorpheusOutlet;u("src",e)}}function Au(t,n){if(t&1&&(g(0,"div",29),C(1,Pu,1,1,"tui-svg",19),h()),t&2){let e=m();d(1),u("polymorpheusOutlet",e.iconContent)("polymorpheusOutletContext",ue(2,yo,e.size))}}var ku=[[["input"]],[["select"]],[["tuiContent"]],"*"],Eu=["input","select","tuiContent","*"];var Su=(()=>{class t{constructor(e,i){this.textfield=e,this.fontsReady$=i,this.prefix$=new ht(""),this.pre$=Me(this.fontsReady$,this.prefix$).pipe(st(0),at(()=>{var o;return!!(!((o=this.pre)===null||o===void 0)&&o.nativeElement.isConnected)}),N(()=>{var o;return((o=this.pre)===null||o===void 0?void 0:o.nativeElement.offsetWidth)||0}),ze())}get isContextTable(){return this.textfield.appearance===dt.Table}get value(){return this.textfield.value}get filler(){let{focused:e,placeholder:i,exampleText:o,value:r,textfield:s}=this;return i&&o?"":e?o||s.filler.slice(r.length):""}get prefix(){return this.decorationsVisible?this.textfield.prefix:""}get postfix(){return this.decorationsVisible?this.computedPostfix:""}ngDoCheck(){this.prefix$.next(this.prefix)}get placeholder(){var e;return((e=this.textfield.nativeFocusableElement)===null||e===void 0?void 0:e.placeholder)||""}get exampleText(){return!this.value&&this.focused?this.placeholder:""}get decorationsVisible(){return!!this.value||this.focused&&!this.placeholder}get focused(){return this.textfield.computedFocused&&!this.textfield.readOnly}get computedPostfix(){return this.textfield.postfix&&(this.filler||this.value)?" ".concat(this.textfield.postfix):this.textfield.postfix}}return t.\u0275fac=function(e){return new(e||t)(l(fr),l(vr))},t.\u0275cmp=k({type:t,selectors:[["tui-value-decoration"]],viewQuery:function(e,i){if(e&1&&j(fu,7,E),e&2){let o;V(o=G())&&(i.pre=o.first)}},hostVars:4,hostBindings:function(e,i){e&1&&f("animationstart",function(){return i.ngDoCheck()}),e&2&&S("_table",i.isContextTable)("_filler",i.filler)},decls:5,vars:4,consts:[[1,"t-prefix",3,"textContent"],["pre",""],[1,"t-ghost",3,"textContent"],[1,"t-filler",3,"textContent"],[1,"t-postfix",3,"textContent"]],template:function(e,i){e&1&&A(0,"span",0,1)(2,"span",2)(3,"span",3)(4,"span",4),e&2&&(u("textContent",i.prefix),d(2),u("textContent",i.value),d(1),u("textContent",i.filler),d(1),u("textContent",i.postfix))},styles:['[_nghost-%COMP%]{position:absolute;display:block;width:100%;line-height:var(--tui-height);margin-top:calc(var(--tui-height) / -2);box-sizing:content-box;color:var(--tui-text-03);animation:tuiPresent 1s;white-space:nowrap}._table[_nghost-%COMP%]{position:static;margin-top:0}._filler[_nghost-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}tui-primitive-textfield [tuiWrapper][data-mode="onDark"] [_nghost-%COMP%]{color:var(--tui-text-03-night)}tui-primitive-textfield[data-size="m"]:not(._label-outside) [_nghost-%COMP%]{line-height:calc(var(--tui-height) - .25rem)}.t-ghost[_ngcontent-%COMP%]{visibility:hidden;white-space:pre;text-overflow:clip}.t-prefix[_ngcontent-%COMP%], .t-postfix[_ngcontent-%COMP%]{white-space:pre;color:var(--tui-text-01)}tui-primitive-textfield [tuiWrapper][data-mode="onDark"][_nghost-%COMP%] .t-prefix[_ngcontent-%COMP%], tui-primitive-textfield [tuiWrapper][data-mode="onDark"] [_nghost-%COMP%] .t-prefix[_ngcontent-%COMP%], tui-primitive-textfield [tuiWrapper][data-mode="onDark"][_nghost-%COMP%] .t-postfix[_ngcontent-%COMP%], tui-primitive-textfield [tuiWrapper][data-mode="onDark"] [_nghost-%COMP%] .t-postfix[_ngcontent-%COMP%]{color:var(--tui-text-01-night)}.t-filler[_ngcontent-%COMP%]{max-width:100%;white-space:nowrap}']}),t})(),Fu={s:1.25,m:1.75,l:2.25},bi=(()=>{class t extends Yi{constructor(e,i,o,r){super(),this.controller=e,this.hintOptions=i,this.options=o,this.el=r,this.editable=!0,this.textfieldFiller="",this.iconCleaner=this.options.iconCleaner,this.readOnly=!1,this.invalid=!1,this.disabled=!1,this.textfieldPrefix="",this.textfieldPostfix="",this.value="",this.valueChange=new W,this.autofilled=!1}get prefix(){return this.textfieldPrefix||this.controller.prefix}get postfix(){return this.textfieldPostfix||this.controller.postfix}get filler(){return this.textfieldFiller||this.controller.filler}get nativeFocusableElement(){if(this.computedDisabled||!this.focusableElement)return null;let{nativeElement:e}=this.focusableElement;return e.previousElementSibling||e}get focused(){return ut(this.el.nativeElement)}get appearance(){return this.controller.appearance}get size(){return this.controller.size}get computedInvalid(){return!this.readOnly&&!this.disabled&&this.invalid}get inputHidden(){var e;return!!(!((e=this.content)===null||e===void 0)&&e.length)}get hasValue(){return!!this.value}get hasCleaner(){return this.controller.cleaner&&this.hasValue&&!this.computedDisabled&&!this.readOnly}get hasTooltip(){var e;return!!(!((e=this.hintOptions)===null||e===void 0)&&e.content)&&!this.computedDisabled}get hasCustomContent(){return!!this.controller.customContent}get placeholderVisible(){var e;let o=(((e=this.nativeFocusableElement)===null||e===void 0?void 0:e.placeholder)||this.prefix||this.postfix||this.filler)&&!this.readOnly&&this.computedFocused;return!this.hasValue&&!o}get hasPlaceholder(){return this.placeholderRaisable||this.placeholderVisible}get placeholderRaised(){return this.placeholderRaisable&&(this.computedFocused&&!this.readOnly||this.hasValue||this.autofilled)}get borderStart(){return this.iconLeftContent?this.iconPaddingLeft:0}get borderEnd(){return Fr(!!this.iconContent,this.hasCleaner,this.hasTooltip,this.hasCustomContent,this.size)}get iconContent(){return this.controller.icon}get iconLeftContent(){return this.controller.iconLeft}get showHint(){var e;return!!(!((e=this.hintOptions)===null||e===void 0)&&e.content)&&(this.options.hintOnDisabled||!this.computedDisabled)}get name(){var e;return((e=this.nativeFocusableElement)===null||e===void 0?void 0:e.autocomplete)==="cc-exp"?"ccexpiryyear":null}get computedId(){var e;return((e=this.nativeFocusableElement)===null||e===void 0?void 0:e.id)||""}onFocused(e){this.updateFocused(e)}getIndent$(e){return Di(e,"scroll").pipe(N(()=>-1*Math.max(e.scrollLeft,0)))}clear(){this.nativeFocusableElement&&(this.nativeFocusableElement.value=""),this.updateValue("")}onMouseDown(e){let{nativeFocusableElement:i}=this;!i||e.target===i||(e.preventDefault(),i.focus())}onModelChange(e){this.updateValue(e)}onAutofilled(e){this.updateAutofilled(e)}detectRetargetFromLabel(e){Ui(e)&&e.stopImmediatePropagation()}get iconPaddingLeft(){return Fu[this.size]}get placeholderRaisable(){return this.size!=="s"&&!this.controller.labelOutside}updateAutofilled(e){this.autofilled!==e&&(this.autofilled=e)}updateValue(e){this.value=e,this.valueChange.emit(e)}}return t.\u0275fac=function(e){return new(e||t)(l(_i),l(Pt,8),l(Co),l(E))},t.\u0275cmp=k({type:t,selectors:[["tui-primitive-textfield"]],contentQueries:function(e,i,o){if(e&1&&vt(o,q,5),e&2){let r;V(r=G())&&(i.content=r)}},viewQuery:function(e,i){if(e&1&&j(vu,5),e&2){let o;V(o=G())&&(i.focusableElement=o.first)}},hostVars:15,hostBindings:function(e,i){e&1&&f("focusin",function(){return i.onFocused(!0)})("focusout",function(){return i.onFocused(!1)}),e&2&&(L("data-size",i.size),ke("--border-start",i.borderStart,"rem")("--border-end",i.borderEnd,"rem"),S("_autofilled",i.autofilled)("_label-outside",i.controller.labelOutside)("_readonly",i.readOnly)("_invalid",i.computedInvalid)("_hidden",i.inputHidden))},inputs:{editable:"editable",textfieldFiller:["filler","textfieldFiller"],iconCleaner:"iconCleaner",readOnly:"readOnly",invalid:"invalid",disabled:"disabled",textfieldPrefix:["prefix","textfieldPrefix"],textfieldPostfix:["postfix","textfieldPostfix"],value:"value"},outputs:{valueChange:"valueChange"},features:[T([Pe(t),Bn]),P],ngContentSelectors:Eu,decls:24,vars:37,consts:[[4,"ngIf"],["automation-id","tui-primitive-textfield__wrapper","tuiWrapper","",3,"active","appearance","disabled","focus","hover","invalid","readOnly","click.prevent.silent","mousedown","tuiAutofilledChange"],["automation-id","tui-primitive-textfield__native-input","tuiMaskAccessor","",1,"t-input",3,"disabled","id","ngModel","readOnly","tuiFocusable","ngModelChange"],["focusableElement",""],["automation-id","tui-primitive-textfield__value","class","t-input t-input_template",4,"ngIf"],[1,"t-content"],["class","t-icon t-icon_left t-textfield-icon",4,"ngIf"],[1,"t-wrapper"],["automation-id","tui-primitive-textfield__placeholder","class","t-placeholder",3,"t-placeholder_raised","for",4,"ngIf"],[1,"t-wrapper-value-decoration"],["aria-hidden","true","automation-id","tui-primitive-textfield__value-decoration",1,"t-value-decoration"],["decor",""],[1,"t-icons"],["automation-id","tui-primitive-textfield__custom-content","class","t-custom-content",4,"ngIf"],["appearance","icon","automation-id","tui-primitive-textfield__cleaner","tuiWrapper","","class","t-cleaner",3,"click.stop",4,"ngIf"],["automation-id","tui-primitive-textfield__tooltip","class","t-tooltip",3,"content","describeId",4,"ngIf"],["class","t-icon t-textfield-icon",4,"ngIf"],["automation-id","tui-primitive-textfield__value",1,"t-input","t-input_template"],[1,"t-icon","t-icon_left","t-textfield-icon"],["appearance","icon","tuiWrapper","",3,"src",4,"polymorpheusOutlet","polymorpheusOutletContext"],["appearance","icon","tuiWrapper","",3,"src"],["automation-id","tui-primitive-textfield__placeholder",1,"t-placeholder",3,"for"],["automation-id","tui-primitive-textfield__custom-content",1,"t-custom-content"],["class","t-custom-icon",3,"src",4,"polymorpheusOutlet"],[1,"t-custom-icon",3,"src"],["appearance","icon","automation-id","tui-primitive-textfield__cleaner","tuiWrapper","",1,"t-cleaner",3,"click.stop"],[3,"src",4,"polymorpheusOutlet","polymorpheusOutletContext"],[3,"src"],["automation-id","tui-primitive-textfield__tooltip",1,"t-tooltip",3,"content","describeId"],[1,"t-icon","t-textfield-icon"]],template:function(e,i){if(e&1&&(oe(ku),C(0,_u,1,0,"ng-container",0),Q(1,"async"),C(2,Cu,1,0,"ng-container",0),Q(3,"async"),g(4,"div",1),f("click.prevent.silent",function(r){return i.detectRetargetFromLabel(r)})("mousedown",function(r){return i.onMouseDown(r)})("tuiAutofilledChange",function(r){return i.onAutofilled(r)}),Q(5,"async"),Y(6),Y(7,1),g(8,"input",2,3),f("ngModelChange",function(r){return i.onModelChange(r)}),h(),C(10,bu,2,0,"div",4),g(11,"div",5),C(12,Mu,2,4,"div",6),g(13,"div",7),C(14,Tu,2,3,"label",8),g(15,"div",9)(16,"tui-value-decoration",10,11),Q(18,"async"),h()()(),g(19,"div",12),C(20,Du,2,1,"div",13)(21,xu,2,4,"span",14)(22,wu,1,2,"tui-tooltip",15)(23,Au,2,4,"div",16),h()()()),e&2){let o=K(9),r=K(17);u("ngIf",$(1,29,i.content==null?null:i.content.changes)),d(2),u("ngIf",$(3,31,i.hintOptions==null?null:i.hintOptions.change$)),d(2),ke("--text-indent",$(5,33,r.pre$),"px"),u("active",i.pseudoActive)("appearance",i.appearance)("disabled",i.disabled)("focus",i.computedFocused)("hover",i.pseudoHover)("invalid",i.computedInvalid)("readOnly",i.readOnly),d(4),u("disabled",i.computedDisabled)("id",i.id)("ngModel",i.value)("readOnly",i.readOnly||!i.editable)("tuiFocusable",i.computedFocusable),L("aria-invalid",i.computedInvalid)("name",i.name),d(2),u("ngIf",i.inputHidden),d(2),u("ngIf",i.iconLeftContent),d(2),u("ngIf",i.hasPlaceholder),d(2),ke("text-indent",$(18,35,i.getIndent$(o)),"px"),S("t-has-value",i.value),d(4),u("ngIf",i.hasCustomContent),d(1),u("ngIf",i.hasCleaner),d(1),u("ngIf",i.showHint),d(1),u("ngIf",i.iconContent)}},dependencies:[_e,Su,Nn,re,Ve,Kr,Ia,Je,$e,Ee,nt,q,ve],styles:['[_nghost-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;text-align:left;border-radius:var(--tui-radius-m);height:var(--tui-height);min-height:var(--tui-height);max-height:var(--tui-height)}[data-size=s][_nghost-%COMP%]{--tui-height: var(--tui-height-s)}[data-size=m][_nghost-%COMP%]{--tui-height: var(--tui-height-m)}[data-size=l][_nghost-%COMP%]{--tui-height: var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input[_ngcontent-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;border-style:solid;border-color:transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-input[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input[_ngcontent-%COMP%]:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-input[_ngcontent-%COMP%]::-webkit-caps-lock-indicator, .t-input[_ngcontent-%COMP%]::-webkit-contacts-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-credit-card-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-credentials-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}.t-input[_ngcontent-%COMP%]::placeholder{color:var(--tui-text-03);opacity:0}._focused[_nghost-%COMP%]:not(._readonly) .t-input[_ngcontent-%COMP%]::placeholder, tui-primitive-textfield._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-primitive-textfield._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-textarea._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-textarea._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-text-area._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-text-area._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder{opacity:1}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input [tuiWrapper][data-mode="onDark"][_nghost-%COMP%]:-webkit-autofill, [tuiWrapper][data-mode="onDark"] [_nghost-%COMP%]:-webkit-autofill, [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-input [tuiWrapper][data-mode="onDark"][_nghost-%COMP%]:-webkit-autofill:hover, [tuiWrapper][data-mode="onDark"] [_nghost-%COMP%]:-webkit-autofill:hover, [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill:focus, .t-input [tuiWrapper][data-mode="onDark"][_nghost-%COMP%]:-webkit-autofill:focus, [tuiWrapper][data-mode="onDark"] [_nghost-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, .t-input [tuiWrapper][data-mode="onDark"][_nghost-%COMP%]::placeholder, [tuiWrapper][data-mode="onDark"] [_nghost-%COMP%]::placeholder{color:var(--tui-text-03-night)}[data-size=s][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="s"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size="s"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size="s"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size="s"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size="s"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size="s"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-s)}[data-size=m][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="m"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size="m"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size="m"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size="m"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size="m"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size="m"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-m)}[data-size=l][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="l"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size="l"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size="l"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size="l"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size="l"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size="l"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-l)}._disabled[_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield._disabled[_nghost-%COMP%], tui-primitive-textfield._disabled [_nghost-%COMP%], .t-input tui-textarea._disabled[_nghost-%COMP%], tui-textarea._disabled [_nghost-%COMP%], .t-input tui-text-area._disabled[_nghost-%COMP%], tui-text-area._disabled [_nghost-%COMP%]{pointer-events:none}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="l"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size="l"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield){padding-top:1.25rem}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="l"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], tui-primitive-textfield[data-size="l"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="m"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size="m"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield){padding-top:1rem}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="m"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], tui-primitive-textfield[data-size="m"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.69rem;transform:translateY(-.5rem)}._hidden[_nghost-%COMP%] input.t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield._hidden[_nghost-%COMP%], tui-primitive-textfield._hidden [_nghost-%COMP%]{opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;box-sizing:border-box;align-items:center;overflow:hidden}[data-size=s][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-s)}[data-size=m][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-m)}[data-size=l][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-l)}.t-wrapper[_ngcontent-%COMP%]{flex:1;min-width:0;-webkit-padding-end:.25rem;padding-inline-end:.25rem}.t-placeholder[_ngcontent-%COMP%]{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}@supports (-webkit-hyphens: none){.t-placeholder[_ngcontent-%COMP%]{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised[_ngcontent-%COMP%]{transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}._invalid[_nghost-%COMP%]:not(._focused) .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill)}._invalid[_nghost-%COMP%]:not(._focused) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill-night)}._focused[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-03)}[data-size=l][_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font:var(--tui-font-text-m);line-height:1.25rem}[data-size=l][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font-size:.8156rem}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01-night)}._focused[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}.t-cleaner[_ngcontent-%COMP%]{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}._readonly[_nghost-%COMP%] .t-cleaner[_ngcontent-%COMP%], ._disabled[_nghost-%COMP%] .t-cleaner[_ngcontent-%COMP%]{pointer-events:none}.t-icon[_ngcontent-%COMP%]{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}[data-size=s][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-start:-.375rem;margin-inline-start:-.375rem}[data-size=m][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-start:-.125rem;margin-inline-start:-.125rem;-webkit-margin-end:.375rem;margin-inline-end:.375rem}[data-size=l][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-end:.75rem;margin-inline-end:.75rem}.t-icons[_ngcontent-%COMP%]{display:flex;align-items:center}[data-size=m][_nghost-%COMP%] .t-icons[_ngcontent-%COMP%]{-webkit-margin-end:-.125rem;margin-inline-end:-.125rem}[data-size=s][_nghost-%COMP%] .t-icons[_ngcontent-%COMP%]{-webkit-margin-end:-.375rem;margin-inline-end:-.375rem}[_nghost-%COMP%]:not([data-size="s"]) .t-icons[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(:first-child){-webkit-margin-start:.25rem;margin-inline-start:.25rem}._autofilled[data-size=s][_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], ._autofilled._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], ._autofilled[_nghost-%COMP%] .t-value-decoration[_ngcontent-%COMP%]:not(.t-has-value){visibility:hidden}.t-custom-content[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;pointer-events:none}.t-custom-icon[_ngcontent-%COMP%]{width:2rem;height:100%}.t-input[_ngcontent-%COMP%]:not(:first-child){display:none}[data-size][_nghost-%COMP%] .t-input_template[_ngcontent-%COMP%]{display:flex;width:calc(100% - 1rem);max-width:calc(100% - 1rem);align-items:center;pointer-events:none;-webkit-padding-end:0;padding-inline-end:0}.t-text-template[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration[_ngcontent-%COMP%]{position:relative;pointer-events:none}'],changeDetection:0}),Ie([Fe],t.prototype,"getIndent$",null),t})(),is=(()=>{class t extends tn{constructor(e){super(e),this.textfield=e}get readOnly(){return this.textfield.readOnly||!this.textfield.editable}onValueChange(e){this.textfield.onModelChange(e)}}return t.\u0275fac=function(e){return new(e||t)(l(bi))},t.\u0275dir=M({type:t,selectors:[["tui-primitive-textfield"]],features:[T([un(t)]),P]}),t})();var ns=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,Ke,ae,Ma,ot,Ge,Ce,Vn,qr]]}),t})();function os(t){if(t==="")return"";let n=0;for(let r=0;rs&&n(r)),i=t[e-1]||t[0],o=t[e]||t[t.length-1];return[i,o]}function ls(t,n){let[[e,i],[o,r]]=ss(n,([p,v])=>t<=p),s=(t-e)/(o-e),c=(r-i)*s+i;return er(c,as)}function us(t,n){let[[e,i],[o,r]]=ss(n,([c,p])=>t<=p),s=(t-i)/(r-i)||0;return(o-e)*s+e}function cs(t,n){return t?ur(t).pipe(N(e=>n?n.fromControlValue(e):e)):He(null)}var Bu=new We("[TUI_CALENDAR_DATE_STREAM]");function ds(t){return{provide:Bu,deps:[[new xe,new Vt,De],[new xe,t]],useFactory:cs}}var Uv=Z({[a.AD]:"+376###-###",[a.AE]:"+971-##-###-####",[a.AF]:"+93##-###-####",[a.AG]:"+1(268) ###-####",[a.AI]:"+1(264) ###-####",[a.AL]:"+355(###) ###-###",[a.AM]:"+374##-###-###",[a.AO]:"+244(###) ###-###",[a.AR]:"+54(###) ####-####",[a.AT]:"+43(###) ###-####",[a.AU]:"+61#-####-####",[a.AW]:"+297###-####",[a.AZ]:"+994##-###-##-##",[a.BA]:"+387 ###-####-##",[a.BB]:"+1(246) ###-####",[a.BD]:"+880##-###-###",[a.BE]:"+32(###) ###-###",[a.BF]:"+226##-##-####",[a.BG]:"+359(###) ###-###",[a.BH]:"+973####-####",[a.BI]:"+257##-##-####",[a.BJ]:"+229##-##-####",[a.BL]:"+590 ## ## ## ## ##",[a.BM]:"+1(441) ###-####",[a.BN]:"+673###-####",[a.BO]:"+591#-###-####",[a.BQ]:"+599-###-####",[a.BR]:"+55(##) ####-####",[a.BS]:"+1(242) ###-####",[a.BT]:"+975#-###-###",[a.BW]:"+267##-###-###",[a.BY]:"+375(##) ###-##-##",[a.BZ]:"+501###-####",[a.CA]:"+1(###) ###-####",[a.CD]:"+243(###) ###-###",[a.CF]:"+236-##-##-####",[a.CG]:"+242##-###-####",[a.CH]:"+41##-###-####",[a.CI]:"+225##-##-###-###",[a.CL]:"+56#-####-####",[a.CM]:"+237#####-####",[a.CN]:"+86(###) ####-####",[a.CO]:"+57(###) ###-####",[a.CR]:"+506####-####",[a.CU]:"+53#-###-####",[a.CV]:"+238(###) ##-##",[a.CW]:"+5999-###-####",[a.CY]:"+357##-###-###",[a.CZ]:"+420(###) ###-###",[a.DE]:"+49(###) ###-###-##",[a.DJ]:"+253##-##-##-##",[a.DK]:"+45##-##-##-##",[a.DM]:"+1(767) ###-####",[a.DO]:"+1(###) ###-####",[a.DZ]:"+213##-###-####",[a.EC]:"+593##-###-####",[a.EE]:"+372####-####",[a.EG]:"+20(###) ###-####",[a.ER]:"+291#-###-###",[a.ES]:"+34(###) ###-###",[a.ET]:"+251##-###-####",[a.FI]:"+358(###) ###-##-##",[a.FJ]:"+679##-#####",[a.FK]:"+500#####",[a.FM]:"+691###-####",[a.FR]:"+33 ## ## ## ## ##",[a.GA]:"+241##-##-##-##",[a.GB]:"+44##-####-####",[a.GD]:"+1(473) ###-####",[a.GE]:"+995(###) ###-###",[a.GF]:"+594 ## ## ## ## ##",[a.GH]:"+233(###) ###-###",[a.GI]:"+350###-#####",[a.GL]:"+299##-##-##",[a.GM]:"+220(###) ##-##",[a.GN]:"+224##-###-###",[a.GP]:"+590 ## ## ## ## ##",[a.GQ]:"+240##-###-####",[a.GR]:"+30(###) ###-####",[a.GT]:"+502#-###-####",[a.GW]:"+245#-######",[a.GY]:"+592###-####",[a.HK]:"+852####-####",[a.HN]:"+504####-####",[a.HR]:"+385##-###-####",[a.HT]:"+509##-##-####",[a.HU]:"+36(###) ###-###",[a.ID]:"+62(###) ###-##-###",[a.IE]:"+353(###) ###-###",[a.IL]:"+972##-###-####",[a.IN]:"+91(####) ###-###",[a.IQ]:"+964(###) ###-####",[a.IR]:"+98(###) ###-####",[a.IS]:"+354###-####",[a.IT]:"+39(###) ####-###",[a.JM]:"+1(876) ###-####",[a.JO]:"+962#-####-####",[a.JP]:"+81-##-####-####",[a.KE]:"+254###-######",[a.KG]:"+996(###) ###-###",[a.KH]:"+855##-###-###",[a.KM]:"+269##-#####",[a.KN]:"+1(869) ###-####",[a.KP]:"+850####-#############",[a.KR]:"+82##-###-####",[a.KW]:"+965####-####",[a.KY]:"+1(345) ###-####",[a.KZ]:"+7(###) ###-##-##",[a.LA]:"+856##-##-###-###",[a.LB]:"+961##-###-###",[a.LC]:"+1(758) ###-####",[a.LI]:"+423(###) ###-####",[a.LK]:"+94##-###-####",[a.LR]:"+231##-###-###",[a.LS]:"+266#-###-####",[a.LT]:"+370(###) ##-###",[a.LU]:"+352(###) ###-###",[a.LV]:"+371##-###-###",[a.LY]:"+218##-###-####",[a.MA]:"+212##-####-###",[a.MC]:"+377###-###-###",[a.MD]:"+373####-####",[a.ME]:"+382##-###-###",[a.MF]:"+590 ## ## ## ## ##",[a.MG]:"+261##-##-#####",[a.MK]:"+389##-###-###",[a.ML]:"+223##-##-####",[a.MM]:"+95##-###-###",[a.MN]:"+976##-##-####",[a.MO]:"+853####-####",[a.MQ]:"+596 ## ## ## ## ##",[a.MR]:"+222##-##-####",[a.MS]:"+1(664) ###-####",[a.MT]:"+356####-####",[a.MU]:"+230####-####",[a.MV]:"+960###-####",[a.MW]:"+265#-####-####",[a.MX]:"+52(###) ###-####",[a.MY]:"+60(###) ###-###",[a.MZ]:"+258##-###-###",[a.NA]:"+264##-###-####",[a.NC]:"+687 ### ###",[a.NE]:"+227##-##-####",[a.NG]:"+234(###) ###-####",[a.NI]:"+505####-####",[a.NL]:"+31##-###-####",[a.NO]:"+47(###) ##-###",[a.NP]:"+977##-###-###",[a.NZ]:"+64(###) ###-####",[a.OM]:"+968##-###-###",[a.PA]:"+507###-####",[a.PE]:"+51(###) ###-###",[a.PF]:"+689 ## ## ## ##",[a.PG]:"+675(###) ##-###",[a.PH]:"+63(###) ###-####",[a.PK]:"+92(###) ###-####",[a.PL]:"+48(###) ###-###",[a.PT]:"+351##-###-####",[a.PW]:"+680###-####",[a.PY]:"+595(###) ###-###",[a.QA]:"+974####-####",[a.RE]:"+262 ## ## ## ## ##",[a.RO]:"+40##-###-####",[a.RS]:"+381##-###-####",[a.RU]:"+7### ###-##-##",[a.RW]:"+250(###) ###-###",[a.SA]:"+966#-####-####",[a.SB]:"+677###-####",[a.SC]:"+248#-###-###",[a.SD]:"+249##-###-####",[a.SE]:"+46##-###-####",[a.SG]:"+65####-####",[a.SH]:"+290####",[a.SI]:"+386##-###-###",[a.SK]:"+421(###) ###-###",[a.SL]:"+232##-######",[a.SM]:"+378####-######",[a.SN]:"+221##-###-####",[a.SO]:"+252##-###-###",[a.SR]:"+597###-####",[a.ST]:"+239##-#####",[a.SV]:"+503##-##-####",[a.SX]:"+1(721) ###-####",[a.SY]:"+963##-####-###",[a.SZ]:"+268##-##-####",[a.TC]:"+1(649) ###-####",[a.TD]:"+235##-##-##-##",[a.TG]:"+228##-###-###",[a.TH]:"+66##-###-####",[a.TJ]:"+992##-###-####",[a.TL]:"+670###-#####",[a.TM]:"+993#-###-####",[a.TN]:"+216##-###-###",[a.TO]:"+676#####",[a.TR]:"+90(###) ###-####",[a.TT]:"+1(868) ###-####",[a.TW]:"+886#-####-####",[a.TZ]:"+255##-###-####",[a.UA]:"+380(##) ###-##-##",[a.UG]:"+256(###) ###-###",[a.US]:"+1(###) ###-####",[a.UY]:"+598#-###-##-##",[a.UZ]:"+998##-###-####",[a.VC]:"+1(784) ###-####",[a.VE]:"+58(###) ###-####",[a.VG]:"+1(284)###-####",[a.VN]:"+84(###) ####-###",[a.VU]:"+678##-#####",[a.WS]:"+685##-####",[a.XK]:"+383##-###-###",[a.YE]:"+967###-###-###",[a.YT]:"+262 ## ## ## ## ##",[a.ZA]:"+27##-###-####",[a.ZM]:"+260##-###-####",[a.ZW]:"+263#-######"}),Do=new We("[TUI_DATE_VALUE_TRANSFORMER]"),zv=new We("[TUI_DATE_RANGE_VALUE_TRANSFORMER]"),Wv=new We("[TUI_DATE_TIME_VALUE_TRANSFORMER]"),Xv=B(ee("prompt")),Qv=B(ee("cancel")),jv=B(ee("done")),Yv=B(ee("more")),Zv=B(ee("hide")),Jv=B(ee("showAll")),$v=B(ee("otherDate")),Kv=B(ee("mobileCalendarTexts")),qv=B(ee("range")),e_=B(ee("countTexts")),t_=B(ee("time")),ps=B(ee("dateTexts")),i_=B(ee("digitalInformationUnits")),n_=B(ee("copyTexts")),o_=B(ee("passwordTexts")),r_=B(ee("shortCalendarMonths")),a_=B(ee("fileTexts")),s_=B(ee("pagination")),l_=B(ee("inputFileTexts")),u_=B(ee("multiSelectTexts")),c_=B(ee("countries")),Lu={icon:({$implicit:t})=>t==="s"?"tuiIconCalendar":"tuiIconCalendarLarge",min:Ae,max:Le,nativePicker:!1},gs=Z(Lu);var Hu={stringify:Zo,identityMatcher:Jo,disabledItemHandler:he},d_=Z(Hu);var ms=new We("[TUI_MOBILE_CALENDAR]"),p_=new We("[TUI_MONTH_FORMATTER]"),g_=Z(24),m_=Z({});var Is=t=>t.querySelector("input,textarea")||t,mt={mask:/^.*$/,preprocessors:[],postprocessors:[],plugins:[],overwriteMode:"shift"},Oo=class{constructor(){this.now=null,this.past=[],this.future=[]}undo(){let n=this.past.pop();n&&this.now&&(this.future.push(this.now),this.updateElement(n,"historyUndo"))}redo(){let n=this.future.pop();n&&this.now&&(this.past.push(this.now),this.updateElement(n,"historyRedo"))}updateHistory(n){if(!this.now){this.now=n;return}let e=this.now.value!==n.value,i=this.now.selection.some((o,r)=>o!==n.selection[r]);!e&&!i||(e&&(this.past.push(this.now),this.future=[]),this.now=n)}updateElement(n,e){this.now=n,this.updateElementState(n,{inputType:e,data:null})}};function Ru(t,...n){return n.every(({value:e})=>e===t.value)}function Nu(t,...n){return n.every(({value:e,selection:i})=>e===t.value&&i[0]===t.selection[0]&&i[1]===t.selection[1])}function Vu({value:t,selection:n},e,i){let[o,r]=n,s=typeof i=="function"?i({value:t,selection:n}):i;return{value:t,selection:s==="replace"?[o,o+e.length]:[o,r]}}function Xn(t){return typeof t=="string"}function hs(t,n,e,i){let o="";for(let r=n.length;r{let o=n[i];return Xn(o)?e===o:e.match(o)}):n.test(t)}function Gu(t,n,e){let i=null,o=null,r=Array.from(t.value).reduce((c,p,v)=>{let _=hs(n,c,p,e),y=c+_,D=n[y.length];return Xn(D)?y+D:p.match(D)?(i===null&&v>=t.selection[0]&&(i=y.length),o===null&&v>=t.selection[1]&&(o=y.length),y+p):y},""),s=hs(n,r,"",e);return{value:Ms(r+s,n)?r+s:r,selection:[i!=null?i:r.length,o!=null?o:r.length]}}function Uu({value:t,selection:n},e){let[i,o]=n,r=i,s=o;return{value:Array.from(t).reduce((p,v,_)=>{let y=p+v;return i===_&&(r=p.length),o===_&&(s=p.length),y.match(e)?y:p},""),selection:[r,s]}}function Un(t,n,e=null){if(Ms(t.value,n))return t;let{value:i,selection:o}=Array.isArray(n)?Gu(t,n,e):Uu(t,n);return{selection:o,value:Array.isArray(n)?i.slice(0,n.length):i}}function fs(t,n){if(!Array.isArray(n))return t;let[e,i]=t.selection,o=[],r=Array.from(t.value).reduce((s,c,p)=>{let v=n[p];return p===e&&o.push(s.length),p===i&&o.push(s.length),Xn(v)&&v===c?s:s+c},"");return o.length<2&&o.push(...new Array(2-o.length).fill(r.length)),{value:r,selection:[o[0],o[1]]}}var Mi=class{constructor(n,e){this.initialElementState=n,this.maskOptions=e,this.value="",this.selection=[0,0];let{value:i,selection:o}=Un(n,this.getMaskExpression(n));this.value=i,this.selection=o}addCharacters([n,e],i){let{value:o}=this,r=this.getMaskExpression({value:o.slice(0,n)+i+o.slice(e),selection:[n+i.length,n+i.length]}),s={value:o,selection:[n,e]},c=fs(s,r),[p,v]=Vu(c,i,this.maskOptions.overwriteMode).selection,_=c.value.slice(0,p)+i,y=_.length,D=Un({value:_+c.value.slice(v),selection:[y,y]},r,s);if(o.slice(0,p)===Un({value:_,selection:[y,y]},r,s).value||Nu(this,D))throw new Error("Invalid mask value");this.value=D.value,this.selection=D.selection}deleteCharacters([n,e]){if(n===e||!e)return;let{value:i}=this,o=this.getMaskExpression({value:i.slice(0,n)+i.slice(e),selection:[n,n]}),r={value:i,selection:[n,e]},s=fs(r,o),[c,p]=s.selection,v=s.value.slice(0,c)+s.value.slice(p),_=Un({value:v,selection:[c,c]},o,r);this.value=_.value,this.selection=_.selection}getMaskExpression(n){let{mask:e}=this.maskOptions;return typeof e=="function"?e(n):e}},xo=class{constructor(n){this.element=n,this.listeners=[]}listen(n,e,i){let o=e;this.element.addEventListener(n,o,i),this.listeners.push(()=>this.element.removeEventListener(n,o))}destroy(){this.listeners.forEach(n=>n())}};function Ii(t,n,e){return t.ctrlKey===!!(n&1)&&t.altKey===!!(n&2)&&t.shiftKey===!!(n&4)&&t.metaKey===!!(n&8)&&t.keyCode===e}function zu(t){return Ii(t,1,89)||Ii(t,5,90)||Ii(t,12,90)}function Wu(t){return Ii(t,1,90)||Ii(t,8,90)}function Xu(t){return"onbeforeinput"in t}function Qu({key:t,ctrlKey:n,metaKey:e,altKey:i}){let o=n||e||i,r=/^.$/u.test(t);return!o&&t!=="Backspace"&&r}function ju({value:t,selection:n},e){let[i,o]=n;if(i!==o)return[i,o];let r=e?t.slice(i).indexOf("\n")+1||t.length:t.slice(0,o).lastIndexOf("\n")+1;return[e?i:r,e?r:o]}function vs({value:t,selection:n},e){let[i,o]=n;return i!==o?[i,o]:(e?[i,o+1]:[i-1,o]).map(s=>Math.min(Math.max(s,0),t.length))}var _s=/\s+$/g,Cs=/^\s+/g,bs=/\s/;function Yu({value:t,selection:n},e){let[i,o]=n;if(i!==o)return[i,o];if(e){let p=t.slice(i),[v]=p.match(Cs)||[""],_=p.replace(Cs,"").search(bs);return[i,_!==-1?i+v.length+_:t.length]}let r=t.slice(0,o),[s]=r.match(_s)||[""],c=r.replace(_s,"").split("").reverse().findIndex(p=>p.match(bs));return[c!==-1?o-s.length-c:0,o]}function zn(t=[]){return(n,...e)=>t.reduce((i,o)=>Object.assign(Object.assign({},i),o(i,...e)),n)}function wo(t,n){let e=Object.assign(Object.assign({},mt),n),i=zn(e.preprocessors),o=zn(e.postprocessors),r=typeof t=="string"?{value:t,selection:[0,0]}:t,{elementState:s}=i({elementState:r,data:""},"validation"),c=new Mi(s,e),{value:p,selection:v}=o(c,r);return typeof t=="string"?p:{value:p,selection:v}}var Wn=class extends Oo{constructor(n,e){super(),this.element=n,this.maskitoOptions=e,this.isTextArea=this.element.nodeName==="TEXTAREA",this.eventListener=new xo(this.element),this.options=Object.assign(Object.assign({},mt),this.maskitoOptions),this.preprocessor=zn(this.options.preprocessors),this.postprocessor=zn(this.options.postprocessors),this.teardowns=this.options.plugins.map(i=>i(this.element,this.options)),this.ensureValueFitsMask(),this.updateHistory(this.elementState),this.eventListener.listen("keydown",i=>{if(zu(i))return i.preventDefault(),this.redo();if(Wu(i))return i.preventDefault(),this.undo()}),Xu(n)?this.eventListener.listen("beforeinput",i=>{let o=i.inputType.includes("Forward");switch(this.updateHistory(this.elementState),i.inputType){case"historyUndo":return i.preventDefault(),this.undo();case"historyRedo":return i.preventDefault(),this.redo();case"deleteByCut":case"deleteContentBackward":case"deleteContentForward":return this.handleDelete({event:i,isForward:o,selection:vs(this.elementState,o)});case"deleteWordForward":case"deleteWordBackward":return this.handleDelete({event:i,isForward:o,selection:Yu(this.elementState,o),force:!0});case"deleteSoftLineBackward":case"deleteSoftLineForward":case"deleteHardLineBackward":case"deleteHardLineForward":return this.handleDelete({event:i,isForward:o,selection:ju(this.elementState,o),force:!0});case"insertCompositionText":return;case"insertLineBreak":return this.handleEnter(i);case"insertFromPaste":case"insertText":case"insertFromDrop":default:return this.handleInsert(i,i.data||"")}}):(this.eventListener.listen("keydown",i=>this.handleKeydown(i)),this.eventListener.listen("paste",i=>{var o;return this.handleInsert(i,((o=i.clipboardData)===null||o===void 0?void 0:o.getData("text/plain"))||"")})),this.eventListener.listen("input",({inputType:i})=>{i!=="insertCompositionText"&&(this.ensureValueFitsMask(),this.updateHistory(this.elementState))}),this.eventListener.listen("compositionend",()=>{this.ensureValueFitsMask(),this.updateHistory(this.elementState)})}get elementState(){let{value:n,selectionStart:e,selectionEnd:i}=this.element;return{value:n,selection:[e||0,i||0]}}get maxLength(){let{maxLength:n}=this.element;return n===-1?1/0:n}destroy(){this.eventListener.destroy(),this.teardowns.forEach(n=>n==null?void 0:n())}updateElementState({value:n,selection:e},i={inputType:"insertText",data:null}){let o=this.elementState.value;this.updateValue(n),this.updateSelectionRange(e),o!==n&&this.dispatchInputEvent(i)}updateSelectionRange([n,e]){var i,o;(this.element.selectionStart!==n||this.element.selectionEnd!==e)&&((o=(i=this.element).setSelectionRange)===null||o===void 0||o.call(i,n,e))}updateValue(n){this.element.value=n}ensureValueFitsMask(){this.updateElementState(wo(this.elementState,this.options))}dispatchInputEvent(n={inputType:"insertText",data:null}){let e=typeof window<"u"?window:globalThis;e!=null&&e.InputEvent&&this.element.dispatchEvent(new InputEvent("input",Object.assign(Object.assign({},n),{bubbles:!0,cancelable:!1})))}handleKeydown(n){let e=n.key,i=e==="Delete";switch(e){case"Backspace":case"Delete":return this.handleDelete({event:n,isForward:i,selection:vs(this.elementState,i)});case"Enter":return this.handleEnter(n)}Qu(n)&&this.handleInsert(n,e)}handleDelete({event:n,selection:e,isForward:i,force:o=!1}){let r={value:this.elementState.value,selection:e},[s,c]=r.selection,{elementState:p}=this.preprocessor({elementState:r,data:""},i?"deleteForward":"deleteBackward"),v=new Mi(p,this.options),[_,y]=p.selection;v.deleteCharacters([_,y]);let D=this.postprocessor(v,r);if(r.value.slice(0,s)+r.value.slice(c)===D.value&&!o)return;if(n.preventDefault(),Ru(r,p,v,D))return this.updateSelectionRange(i?[y,y]:[_,_]);let H=i?"deleteContentForward":"deleteContentBackward";this.updateElementState(D,{inputType:"inputType"in n?n.inputType:H,data:null}),this.updateHistory(D)}handleInsert(n,e){let i=this.elementState,{elementState:o,data:r=e}=this.preprocessor({data:e,elementState:i},"insert"),s=new Mi(o,this.options);try{s.addCharacters(o.selection,r)}catch{return n.preventDefault()}let[c,p]=o.selection,v=o.value.slice(0,c)+e+o.value.slice(p),_=this.postprocessor(s,i);if(_.value.length>this.maxLength)return n.preventDefault();v!==_.value&&(n.preventDefault(),this.updateElementState(_,{data:e,inputType:"inputType"in n?n.inputType:"insertText"}),this.updateHistory(_))}handleEnter(n){this.isTextArea&&this.handleInsert(n,"\n")}};var Ts=ga({limitWidth:"fixed",align:"right"}),ys={provide:cn,deps:[[new xe,new Vt,Li]],useFactory:Eo};var Ds=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=M({type:t,selectors:[["","tuiValueAccessor",""]],features:[T([ys])]}),t})(),Os=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();var Zu=["focusableElement"],Qn=(()=>{class t extends Qt{constructor(e,i,o){super(e,o),this.options=i,this.size=this.options.size}get nativeFocusableElement(){return!this.focusableElement||this.computedDisabled?null:this.focusableElement.nativeElement}get focused(){return Re(this.nativeFocusableElement)}get computedFocusable(){return this.interactive&&this.focusable}onChecked(e){this.value=e}onFocused(e){this.updateFocused(e)}onFocusVisible(e){this.updateFocusVisible(e)}}return t.\u0275fac=function(e){return new(e||t)(l(De,10),l(Ci),l(ge))},t.\u0275cmp=k({type:t,selectors:[["tui-checkbox"]],viewQuery:function(e,i){if(e&1&&j(Zu,5),e&2){let o;V(o=G())&&(i.focusableElement=o.first)}},hostVars:1,hostBindings:function(e,i){e&2&&L("data-size",i.size)},inputs:{size:"size"},features:[T([Pe(t),qe(t)]),P],decls:3,vars:11,consts:[[3,"disabled","focused","hovered","invalid","pressed","size","value"],["automation-id","tui-checkbox__native","type","checkbox",1,"t-native",3,"disabled","id","tuiFocusable","tuiChecked","tuiCheckedChange","tuiFocusedChange","tuiFocusVisibleChange"],["focusableElement",""]],template:function(e,i){e&1&&(g(0,"tui-primitive-checkbox",0)(1,"input",1,2),f("tuiCheckedChange",function(r){return i.value=r})("tuiFocusedChange",function(r){return i.onFocused(r)})("tuiFocusVisibleChange",function(r){return i.onFocusVisible(r)}),h()()),e&2&&(u("disabled",i.disabled)("focused",i.computedFocusVisible)("hovered",i.pseudoHover)("invalid",i.computedInvalid)("pressed",i.pseudoActive)("size",i.size)("value",i.value),d(1),u("disabled",i.disabled)("id",i.id)("tuiFocusable",i.computedFocusable)("tuiChecked",i.value))},dependencies:[es,vn,nt,In,Cn],styles:["[_nghost-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;flex-shrink:0}[data-size=m][_nghost-%COMP%]{width:1rem;height:1rem}[data-size=l][_nghost-%COMP%]{width:1.5rem;height:1.5rem}._readonly[_nghost-%COMP%] tui-primitive-checkbox[_ngcontent-%COMP%]{pointer-events:none}.t-native[_ngcontent-%COMP%]{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.t-native[_ngcontent-%COMP%]:-webkit-autofill, .t-native[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-native[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}"],changeDetection:0}),t})(),xs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,_n,ot,Mn,bn,ts]]}),t})();var $u=["*"],ws=(()=>{class t extends Qt{constructor(e,i,o,r){super(e,i),this.mode$=o,this.options=r,this.size=this.options.size}get focused(){return Re(this.nativeFocusableElement)}get nativeFocusableElement(){var e,i;return(i=(e=this.checkbox)===null||e===void 0?void 0:e.nativeFocusableElement)!==null&&i!==void 0?i:null}onFocused(e){this.updateFocused(e)}onModelChange(e){this.value=e}}return t.\u0275fac=function(e){return new(e||t)(l(De,10),l(ge),l(tt),l(Ci))},t.\u0275cmp=k({type:t,selectors:[["tui-checkbox-labeled"]],viewQuery:function(e,i){if(e&1&&j(Qn,5),e&2){let o;V(o=G())&&(i.checkbox=o.first)}},hostVars:1,hostBindings:function(e,i){e&1&&f("$.data-mode.attr",function(){return i.mode$}),e&2&&L("data-size",i.size)},inputs:{size:"size"},features:[T([Pe(t),qe(t),it]),P],ngContentSelectors:$u,decls:4,vars:12,consts:[[1,"t-wrapper"],[3,"disabled","focusable","nativeId","pseudoActive","pseudoFocus","pseudoHover","pseudoInvalid","readOnly","size","ngModel","ngModelChange","focusedChange"],[1,"t-content"]],template:function(e,i){e&1&&(oe(),g(0,"label",0)(1,"tui-checkbox",1),f("ngModelChange",function(r){return i.value=r})("focusedChange",function(r){return i.onFocused(r)}),h(),g(2,"div",2),Y(3),h()()),e&2&&(d(1),u("disabled",i.computedDisabled)("focusable",i.focusable)("nativeId",i.nativeId)("pseudoActive",i.pseudoActive)("pseudoFocus",i.pseudoFocus)("pseudoHover",i.pseudoHover)("pseudoInvalid",i.computedInvalid)("readOnly",i.readOnly)("size",i.size)("ngModel",i.value),d(1),S("t-content_disabled",i.computedDisabled))},dependencies:[Qn,$e,Ee],styles:["[_nghost-%COMP%]{position:relative;display:block;line-height:0}._disabled[_nghost-%COMP%], ._readonly[_nghost-%COMP%]{pointer-events:none}.t-wrapper[_ngcontent-%COMP%]{display:inline-flex;max-width:100%;cursor:pointer}._disabled[_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{cursor:default}[data-mode=onDark][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{color:var(--tui-text-01-night)}.t-content[_ngcontent-%COMP%]{font:var(--tui-font-text-s);line-height:1rem;word-wrap:break-word;min-width:0}.t-content_disabled[_ngcontent-%COMP%]{opacity:var(--tui-disabled-opacity)}[data-size=m][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{margin-left:.5rem}[data-size=l][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{font:var(--tui-font-text-m);margin-left:.75rem}"],changeDetection:0}),t})(),Ps=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,Ke,xs]]}),t})();var Ku=new Date("0001-01-01"),qu=new Date("9999-12-31");var ec="\u2013",tc="\u2014",ic="-",nc="\u2212",oc=[ic,ec,tc,nc];var rc=[":","."];function ac(t,n,e){let i=Math.min(Number(e),Math.max(Number(n),Number(t)));return t instanceof Date?new Date(i):i}var As=t=>{var n,e,i;return{day:((n=t.match(/d/g))===null||n===void 0?void 0:n.length)||0,month:((e=t.match(/m/g))===null||e===void 0?void 0:e.length)||0,year:((i=t.match(/y/g))===null||i===void 0?void 0:i.length)||0}};function sc(t){return{day:String(t.getDate()).padStart(2,"0"),month:String(t.getMonth()+1).padStart(2,"0"),year:String(t.getFullYear()).padStart(4,"0"),hours:String(t.getHours()).padStart(2,"0"),minutes:String(t.getMinutes()).padStart(2,"0"),seconds:String(t.getSeconds()).padStart(2,"0"),milliseconds:String(t.getMilliseconds()).padStart(3,"0")}}function lc(t,n){return t.length!e.match(/^0+$/))}function ks(t,n,e){let i=n.replace(/\W/g,"").length;return t.replace(e,"").match(new RegExp("(\\D*\\d[^\\d\\s]*){1,".concat(i,"}"),"g"))||[]}function Es(t){return t.reduce((n,[e,i])=>Object.assign(Object.assign({},n),{[e]:i}),{})}function Ss(t,n){let e=n.replace(/[^dmy]/g,""),i=t.replace(/\D+/g,""),o={day:i.slice(e.indexOf("d"),e.lastIndexOf("d")+1),month:i.slice(e.indexOf("m"),e.lastIndexOf("m")+1),year:i.slice(e.indexOf("y"),e.lastIndexOf("y")+1)};return Es(Object.entries(o).filter(([r,s])=>!!s).sort(([r],[s])=>n.toLowerCase().indexOf(r[0])>n.toLowerCase().indexOf(s[0])?1:-1))}function uc(t,n){var e,i,o,r,s,c,p;let v=((e=t.year)===null||e===void 0?void 0:e.length)===2?"20".concat(t.year):t.year,_=new Date(Number(v!=null?v:"0"),Number((i=t.month)!==null&&i!==void 0?i:"1")-1,Number((o=t.day)!==null&&o!==void 0?o:"1"),Number((r=n==null?void 0:n.hours)!==null&&r!==void 0?r:"0"),Number((s=n==null?void 0:n.minutes)!==null&&s!==void 0?s:"0"),Number((c=n==null?void 0:n.seconds)!==null&&c!==void 0?c:"0"),Number((p=n==null?void 0:n.milliseconds)!==null&&p!==void 0?p:"0"));return _.setFullYear(Number(v!=null?v:"0")),_}var yi=", ";function jn({day:t,month:n,year:e,hours:i,minutes:o,seconds:r,milliseconds:s},c,p){var v;let _=((v=c.match(/y/g))===null||v===void 0?void 0:v.length)===2?e==null?void 0:e.slice(-2):e;return(c+(p?yi+p:"")).replace(/d+/g,t!=null?t:"").replace(/m+/g,n!=null?n:"").replace(/y+/g,_!=null?_:"").replace(/H+/g,i!=null?i:"").replace(/MSS/g,s!=null?s:"").replace(/M+/g,o!=null?o:"").replace(/S+/g,r!=null?r:"").replace(/^\D+/g,"").replace(/\D+$/g,"")}function Po(t,n,e=0){return Number(t.padEnd(n.length,"0"))<=Number(n)?{validatedSegmentValue:t,prefixedZeroesCount:e}:t.endsWith("0")?Po("0".concat(t.slice(0,n.length-1)),n,e+1):Po("".concat(t.slice(0,n.length-1),"0"),n,e)}var cc={day:31,month:12,year:9999};function dc({dateString:t,dateModeTemplate:n,offset:e,selection:[i,o]}){let r=Ss(t,n),s=Object.entries(r),c={},p=0;for(let[y,D]of s){let w=jn(c,n),H=cc[y],te=w.length&&1,de=e+w.length+te+As(n)[y],Oe=de>=i&&de===o;if(Oe&&Number(D)>Number(H))return{validatedDateString:"",updatedSelection:[i,o]};if(Oe&&Number(D)<1)return{validatedDateString:"",updatedSelection:[i,o]};let{validatedSegmentValue:Rt,prefixedZeroesCount:Js}=Po(D,"".concat(H));p+=Js,c[y]=Rt}let v=jn(c,n),_=v.length-t.length;return{validatedDateString:v,updatedSelection:[i+p+_,o+p+_]}}var Fs=/[\\^$.*+?()[\]{}|]/g,pc=new RegExp(Fs.source);function Bs(t){return t&&pc.test(t)?t.replace(Fs,"\\$&"):t}function gc(t,n){let e=As(n);return Es(Object.entries(t).map(([i,o])=>{let r=e[i];return[i,o.length===r&&o.match(/^0+$/)?"1".padStart(r,"0"):o]}))}function mc({dateModeTemplate:t,min:n=Ku,max:e=qu,rangeSeparator:i="",dateSegmentSeparator:o="."}){return({value:r,selection:s})=>{let c=i&&r.endsWith(i),p=ks(r,t,i),v="";for(let _ of p){v+=v?i:"";let y=Ss(_,t);if(!lc(_,t)){let H=gc(y,t),te=jn(H,t),de=_.endsWith(o)?o:"";v+=te+de;continue}let D=uc(y),w=ac(D,n,e);v+=jn(sc(w),t)}return{selection:s,value:v+(c?i:"")}}}function hc({dateModeTemplate:t,dateSegmentsSeparator:n,rangeSeparator:e=""}){return({elementState:i,data:o})=>{let r=e?new RegExp("".concat(e,"|-")):yi,s=o.split(r),c=o.includes(yi)?[s[0]]:s;if(c.every(p=>p.trim().split(/\D/).length===t.split(n).length)){let p=c.map(v=>fc(v,t,n)).join(e);return{elementState:i,data:"".concat(p).concat(o.includes(yi)&&yi+s[1]||"")}}return{elementState:i,data:o}}}function fc(t,n,e){let i=t.split(/\D/),o=n.split(e);return i.map((s,c)=>c===o.length-1?s:s.padStart(o[c].length,"0")).join(e)}function vc({dateModeTemplate:t,dateSegmentsSeparator:n,rangeSeparator:e=""}){return({elementState:i,data:o})=>{let{value:r,selection:s}=i;if(o===n)return{elementState:i,data:s[0]===r.length?o:""};if(oc.includes(o))return{elementState:i,data:e};let c=o.replace(new RegExp("[^\\d".concat(Bs(n)).concat(e,"]"),"g"),"");if(!c)return{elementState:i,data:""};let[p,v]=s,_=v+o.length,y=r.slice(0,p)+c+r.slice(_),D=ks(y,t,e),w="",H=!!e&&y.includes(e);for(let de of D){let{validatedDateString:Oe,updatedSelection:Rt}=dc({dateString:de,dateModeTemplate:t,offset:w?w.length+e.length:0,selection:[p,_]});if(de&&!Oe)return{elementState:i,data:""};_=Rt[1],w+=H&&w?e+Oe:Oe}let te=w.slice(p,_);return{elementState:{selection:s,value:w.slice(0,p)+te.split(n).map(de=>"0".repeat(de.length)).join(n)+w.slice(_)},data:te}}}function _c(){return({elementState:t},n)=>{let{value:e,selection:i}=t;if(!e||Cc(e,i))return{elementState:t};let[o,r]=i,s=e.slice(o,r).replace(/\d/g,"0"),c=e.slice(0,o)+s+e.slice(r);return n==="validation"||n==="insert"&&o===r?{elementState:{selection:i,value:c}}:{elementState:{selection:n==="deleteBackward"||n==="insert"?[o,o]:[r,r],value:c}}}}function Cc(t,[n,e]){return e===t.length}function Ls({mode:t,separator:n=".",max:e,min:i}){let o=t.split("/").join(n);return Object.assign(Object.assign({},mt),{mask:Array.from(o).map(r=>r===n?r:/\d/),overwriteMode:"replace",preprocessors:[_c(),hc({dateModeTemplate:o,dateSegmentsSeparator:n}),vc({dateModeTemplate:o,dateSegmentsSeparator:n})],postprocessors:[mc({min:i,max:e,dateModeTemplate:o,dateSegmentSeparator:n})]})}var eC=new RegExp("[".concat(rc.map(Bs).join(""),"]$"));var Hs=(()=>{class t{constructor(e,i){this.ngZone=e,this.elementRef=i,this.maskedElement=null,this.maskito=mt,this.maskitoElement=Is}ngOnChanges(){var e;return Lo(this,void 0,void 0,function*(){(e=this.maskedElement)===null||e===void 0||e.destroy();let i=this.maskitoElement,o=yield i(this.elementRef.nativeElement);this.maskitoElement===i&&this.ngZone.runOutsideAngular(()=>{var r;this.maskedElement=new Wn(o,(r=this.maskito)!==null&&r!==void 0?r:mt)})})}ngOnDestroy(){var e;(e=this.maskedElement)===null||e===void 0||e.destroy()}}return t.\u0275fac=function(e){return new(e||t)(l(Ze),l(E))},t.\u0275dir=M({type:t,selectors:[["","maskito",""]],inputs:{maskito:"maskito",maskitoElement:"maskitoElement"},features:[lt]}),t})();var Rs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({}),t})();function Ic(t,n){if(t&1){let e=z();g(0,"tui-primitive-textfield",5),f("focusedChange",function(o){O(e);let r=m();return x(r.onFocused(o))})("valueChange",function(o){O(e);let r=m();return x(r.onValueChange(o))}),Y(1),Y(2,1,["ngProjectAs","input",5,["input"]]),h()}if(t&2){let e=n.tuiLet,i=m(),o=K(4);u("disabled",i.computedDisabled)("focusable",i.computedFocusable)("invalid",i.computedInvalid)("maskito",i.computedMask)("nativeId",i.nativeId)("pseudoFocus",i.pseudoFocus)("pseudoHover",i.pseudoHover)("readOnly",i.readOnly)("tuiTextfieldFiller",i.getComputedFiller(e||""))("tuiTextfieldIcon",i.calendarIcon&&o)("value",i.computedValue)}}function Mc(t,n){if(t&1){let e=z();g(0,"tui-svg",8),f("click",function(){O(e);let o=m(2);return x(o.onIconClick())}),h()}if(t&2){let e=n.polymorpheusOutlet,i=m(2);S("t-icon",!i.computedDisabled),u("src",e)}}function Tc(t,n){t&1&&A(0,"input",9)}var yc=t=>({$implicit:t});function Dc(t,n){if(t&1&&C(0,Mc,1,3,"tui-svg",6)(1,Tc,1,0,"input",7),t&2){let e=m();u("polymorpheusOutlet",e.calendarIcon)("polymorpheusOutletContext",ue(3,yc,e.size)),d(1),u("ngIf",e.isMobile&&e.nativePicker)}}function Oc(t,n){if(t&1){let e=z();g(0,"div",12)(1,"button",13),f("click",function(){O(e);let o=m(2);return x(o.onDayClick(o.items[0].day))}),X(2),h()()}if(t&2){let e=m(2);d(2),me(" ",e.items[0]," ")}}function xc(t,n){if(t&1){let e=z();g(0,"tui-calendar",10),f("dayClick",function(o){O(e);let r=m();return x(r.onDayClick(o))})("monthChange",function(o){O(e);let r=m();return x(r.onMonthChange(o))}),h(),C(1,Oc,3,1,"div",11)}if(t&2){let e=m();u("disabledItemHandler",e.disabledItemHandler)("markerHandler",e.markerHandler)("max",e.computedMax)("min",e.computedMin)("month",e.computedActiveYearMonth)("value",e.value),d(1),u("ngIf",e.items.length===1)}}var wc=["*",[["input"]]],Pc=["*","input"],Ac=(()=>{class t{constructor(e,i){this.host=e,this.dateFormat=i}get value(){return this.host.value.length===ai?ce.normalizeParse(this.host.value,this.dateFormat).toString("YMD","-"):""}get max(){return this.host.max.toJSON()}get min(){return this.host.min.toJSON()}onChange(e){this.host.onValueChange(e?ce.normalizeParse(e,"YMD").toString(this.dateFormat):"")}}return t.\u0275fac=function(e){return new(e||t)(l(so),l(fo))},t.\u0275dir=M({type:t,selectors:[["input","tuiDate",""]],hostAttrs:["type","date"],hostVars:4,hostBindings:function(e,i){e&1&&f("change",function(r){return i.onChange(r.target.value)})("click.stop.silent",function(){return 0})("input.stop.silent",function(){return 0})("mousedown.stop.silent",function(){return 0}),e&2&&Xe("tabIndex",-1)("value",i.value)("max",i.max)("min",i.min)}}),t})(),Ns=(()=>{class t extends Qt{constructor(e,i,o,r,s,c,p,v,_,y,D,w){super(e,i,y),this.injector=o,this.isMobile=r,this.dialogs=s,this.mobileCalendar=c,this.dateFormat=p,this.dateSeparator=v,this.dateTexts$=_,this.valueTransformer=y,this.options=D,this.textfieldSize=w,this.month=null,this.min=this.options.min,this.max=this.options.max,this.disabledItemHandler=he,this.markerHandler=Zt,this.items=[],this.defaultActiveYearMonth=J.currentLocal(),this.open=!1,this.filler$=this.dateTexts$.pipe(N(H=>ua(H[this.dateFormat],this.dateSeparator)))}get size(){return this.textfieldSize.size}get computedMin(){var e;return(e=this.min)!==null&&e!==void 0?e:this.options.min}get computedMax(){var e;return(e=this.max)!==null&&e!==void 0?e:this.options.max}get nativeFocusableElement(){var e,i;return(i=(e=this.textfield)===null||e===void 0?void 0:e.nativeFocusableElement)!==null&&i!==void 0?i:null}get focused(){var e;return!!(!((e=this.textfield)===null||e===void 0)&&e.focused)}get computedMobile(){return this.isMobile&&(!!this.mobileCalendar||this.nativePicker)}get nativePicker(){return this.options.nativePicker}get calendarIcon(){return this.options.icon}get computedValue(){let{value:e,nativeValue:i,activeItem:o}=this;return o?String(o):e?e.toString(this.dateFormat,this.dateSeparator):i}get computedActiveYearMonth(){return this.items[0]&&this.value&&this.value.daySame(this.items[0].day)?this.items[0].displayDay:this.month||this.value||ra(this.defaultActiveYearMonth,this.computedMin,this.computedMax)}get nativeValue(){var e;return((e=this.nativeFocusableElement)===null||e===void 0?void 0:e.value)||""}set nativeValue(e){this.nativeFocusableElement&&(this.nativeFocusableElement.value=e)}get canOpen(){return this.interactive&&!this.computedMobile}get computedMask(){return this.activeItem?mt:this.computeMaskOptions(this.dateFormat,this.dateSeparator,this.computedMin,this.computedMax)}get activeItem(){let{value:e}=this;return e&&this.items.find(i=>i.day.daySame(e))||null}onClick(){this.isMobile||(this.open=!this.open)}getComputedFiller(e){return this.activeItem?"":e}onMobileClick(){this.onIconClick()}onIconClick(){!this.computedMobile||!this.mobileCalendar||this.dialogs.open(new bt(this.mobileCalendar,this.injector),{size:"fullscreen",closeable:!1,data:{single:!0,min:this.min,max:this.max,disabledItemHandler:this.disabledItemHandler}}).pipe(ie(this.destroy$)).subscribe(e=>{this.value=e})}onValueChange(e){this.control&&this.control.updateValueAndValidity({emitEvent:!1}),e||this.onOpenChange(!0),this.value=e.length!==ai?null:ce.normalizeParse(e,this.dateFormat)}onDayClick(e){this.value=e,this.open=!1}onMonthChange(e){this.month=e}onOpenChange(e){this.open=e}onFocused(e){this.updateFocused(e)}setDisabledState(){super.setDisabledState(),this.open=!1}writeValue(e){super.writeValue(e),this.nativeValue=e?this.computedValue:""}valueIdenticalComparator(e,i){return zt(e,i,(o,r)=>o.daySame(r))}computeMaskOptions(e,i,o,r){return Ls({separator:i,mode:rs[e],min:o.toLocalNativeDate(),max:r.toLocalNativeDate()})}}return t.\u0275fac=function(e){return new(e||t)(l(De,10),l(ge),l(ki),l(ji),l(fn),l(ms,8),l(fo),l(la),l(ps),l(Do,8),l(gs),l(Sn))},t.\u0275cmp=k({type:t,selectors:[["tui-input-date"]],viewQuery:function(e,i){if(e&1&&j(bi,5),e&2){let o;V(o=G())&&(i.textfield=o.first)}},hostVars:1,hostBindings:function(e,i){e&1&&f("click",function(){return i.onClick()}),e&2&&L("data-size",i.size)},inputs:{min:"min",max:"max",disabledItemHandler:"disabledItemHandler",markerHandler:"markerHandler",items:"items",defaultActiveYearMonth:"defaultActiveYearMonth"},features:[T([Pe(t),qe(t),ds(Do)]),P],ngContentSelectors:Pc,decls:7,vars:7,consts:[[1,"t-hosted",3,"canOpen","content","open","openChange"],["automation-id","tui-input-date-range__textfield","tuiValueAccessor","","class","t-textfield",3,"disabled","focusable","invalid","maskito","nativeId","pseudoFocus","pseudoHover","readOnly","tuiTextfieldFiller","tuiTextfieldIcon","value","focusedChange","valueChange",4,"tuiLet"],["iconContent",""],[3,"polymorpheus"],["dropdown","polymorpheus"],["automation-id","tui-input-date-range__textfield","tuiValueAccessor","",1,"t-textfield",3,"disabled","focusable","invalid","maskito","nativeId","pseudoFocus","pseudoHover","readOnly","tuiTextfieldFiller","tuiTextfieldIcon","value","focusedChange","valueChange"],["appearance","icon","automation-id","tui-input-date-range__icon","tuiWrapper","",3,"t-icon","src","click",4,"polymorpheusOutlet","polymorpheusOutletContext"],["tuiDate","","class","t-native-input",4,"ngIf"],["appearance","icon","automation-id","tui-input-date-range__icon","tuiWrapper","",3,"src","click"],["tuiDate","",1,"t-native-input"],["automation-id","tui-input-date__calendar","tuiPreventDefault","mousedown",3,"disabledItemHandler","markerHandler","max","min","month","value","dayClick","monthChange"],["tuiPreventDefault","mousedown","class","t-button",4,"ngIf"],["tuiPreventDefault","mousedown",1,"t-button"],["tuiLink","","type","button",3,"click"]],template:function(e,i){if(e&1&&(oe(wc),g(0,"tui-hosted-dropdown",0),f("openChange",function(r){return i.onOpenChange(r)}),C(1,Ic,3,11,"tui-primitive-textfield",1),Q(2,"async"),C(3,Dc,2,5,"ng-template",null,2,fe)(5,xc,2,7,"ng-template",3,4,fe),h()),e&2){let o=K(6);u("canOpen",i.canOpen)("content",o)("open",i.open&&i.canOpen),d(1),u("tuiLet",$(2,5,i.filler$)),d(4),u("polymorpheus",i.type)}},dependencies:[ci,bi,_e,Ln,qt,It,is,Ds,Hs,bo,Io,q,Ve,re,Ac,Xi,ia,ve],styles:["[_nghost-%COMP%]{display:block;border-radius:var(--tui-radius-m);text-align:left}.t-hosted[_ngcontent-%COMP%]{display:block;border-radius:inherit}.t-textfield[_ngcontent-%COMP%]{border-radius:inherit;text-align:inherit}.t-icon[_ngcontent-%COMP%]{pointer-events:auto}.t-button[_ngcontent-%COMP%]{display:flex;height:2.75rem;justify-content:center;box-shadow:inset 0 1px var(--tui-base-03)}.t-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1;text-align:center}.t-native-input[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;pointer-events:auto;font-size:2rem}"],changeDetection:0}),Ie([Fe],t.prototype,"computeMaskOptions",null),t})(),Vs=(()=>{class t extends tn{get value(){return this.host.computedValue}get max(){return this.host.computedMax}get min(){return this.host.computedMin}onValueChange(e){e||(this.host.nativeValue=""),this.host.onValueChange(e)}process(e){e.inputMode="numeric"}}return t.\u0275fac=(()=>{let n;return function(i){return(n||(n=le(t)))(i||t)}})(),t.\u0275dir=M({type:t,selectors:[["tui-input-date"]],features:[T([un(t)]),P]}),t})(),Gs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,Rs,ae,Ge,na,Hn,Ce,ei,Rn,ns,Os,Mt,Fn]]}),t})();var kc=["input"];function Ec(t,n){if(t&1&&(Te(0),X(1),ye()),t&2){let e=n.polymorpheusOutlet;d(1),me(" ",e," ")}}function Sc(t,n){if(t&1&&(g(0,"div",6),C(1,Ec,2,1,"ng-container",7),h()),t&2){let e=m();d(1),u("polymorpheusOutlet",e.leftContent)}}function Fc(t,n){if(t&1&&A(0,"tui-loader",8),t&2){let e=m();u("inheritColor",!0)("size",e.loaderSize)}}function Bc(t,n){if(t&1){let e=z();g(0,"tui-svg",9),f("click",function(o){O(e);let r=m();return x(r.remove(o))})("mousedown.stop.prevent.silent",function(){return 0}),h()}if(t&2){let e=m();u("src",e.icons.close)}}function Lc(t,n){if(t&1){let e=z();g(0,"input",10,11),f("blur",function(){O(e);let o=m();return x(o.onBlur())})("keydown",function(o){O(e);let r=m();return x(r.onKeyDown(o))})("ngModelChange",function(o){O(e);let r=m();return x(r.onInput(o))}),h()}if(t&2){let e=m();u("ngModel",e.editedText),L("maxLength",e.maxLength)}}var Hc={size:"m",status:"default",autoColor:!1},Rc=Z(Hc);var Us=(()=>{class t{constructor(e,i,o,r){this.el=e,this.mode$=i,this.options=o,this.icons=r,this.value="",this.editable=!1,this.separator=",",this.maxLength=null,this.size=this.options.size,this.showLoader=!1,this.status=this.options.status,this.hoverable=!1,this.removable=!1,this.disabled=!1,this.autoColor=this.options.autoColor,this.edited=new W,this.editing=!1,this.editedText=null}set input(e){e&&e.nativeElement.focus()}get backgroundColor(){return this.autoColor?os(this.value):null}get canRemove(){return this.removable&&!this.disabled&&!this.showLoader}get displayText(){return this.editedText===null?this.value:this.editedText}get loaderSize(){return Lr(this.size)?"s":"xs"}edit(e){this.canEdit&&(e.preventDefault(),this.editing=!0,this.editedText=this.value)}remove(e){this.canRemove&&(e.preventDefault(),e.stopPropagation(),this.edited.emit(""))}onInput(e){let i=e.split(this.separator);if(i.length>1){this.save(String(i));return}this.editedText=e}onKeyDown(e){switch(e.stopPropagation(),e.key.toLowerCase()){case"enter":e.preventDefault(),this.save(this.editedText||"");break;case"escape":case"esc":e.preventDefault(),this.stopEditing(),this.el.nativeElement.focus();break;default:break}}onBlur(){this.editedText!==null&&this.save(this.editedText)}get canEdit(){return this.editable&&!this.disabled&&!this.showLoader}stopEditing(){this.editing=!1,this.editedText=null}save(e){this.stopEditing(),this.edited.emit(e.trim())}}return t.\u0275fac=function(e){return new(e||t)(l(E),l(tt),l(Rc),l(sn))},t.\u0275cmp=k({type:t,selectors:[["tui-tag"],["a","tuiTag",""],["button","tuiTag",""]],viewQuery:function(e,i){if(e&1&&j(kc,5,E),e&2){let o;V(o=G())&&(i.input=o.first)}},hostVars:10,hostBindings:function(e,i){e&1&&f("$.data-mode.attr",function(){return i.mode$})("keydown.enter",function(r){return i.edit(r)})("keydown.delete",function(r){return i.remove(r)})("keydown.backspace",function(r){return i.remove(r)}),e&2&&(L("data-size",i.size)("data-status",i.status),S("_hoverable",i.hoverable)("_disabled",i.disabled)("_autocolor",i.autoColor)("_editing",i.editing))},inputs:{value:"value",editable:"editable",separator:"separator",maxLength:"maxLength",size:"size",showLoader:"showLoader",status:"status",hoverable:"hoverable",removable:"removable",disabled:"disabled",autoColor:"autoColor",leftContent:"leftContent"},outputs:{edited:"edited"},features:[T([it])],decls:6,vars:7,consts:[[1,"t-tag",3,"dblclick"],["class","t-content",4,"ngIf"],["automation-id","tui-tag__text",1,"t-text",3,"textContent"],["class","t-content",3,"inheritColor","size",4,"ngIf"],["automation-id","tui-tag__remove","class","t-icon",3,"src","click","mousedown.stop.prevent.silent",4,"ngIf"],["automation-id","tui-tag__edit","type","text","class","t-edit",3,"ngModel","blur","keydown","ngModelChange",4,"ngIf"],[1,"t-content"],[4,"polymorpheusOutlet"],[1,"t-content",3,"inheritColor","size"],["automation-id","tui-tag__remove",1,"t-icon",3,"src","click","mousedown.stop.prevent.silent"],["automation-id","tui-tag__edit","type","text",1,"t-edit",3,"ngModel","blur","keydown","ngModelChange"],["input",""]],template:function(e,i){e&1&&(g(0,"div",0),f("dblclick",function(r){return i.edit(r)}),C(1,Sc,2,1,"div",1),A(2,"span",2),C(3,Fc,1,2,"tui-loader",3)(4,Bc,1,1,"tui-svg",4),h(),C(5,Lc,2,2,"input",5)),e&2&&(ke("background-color",i.backgroundColor),d(1),u("ngIf",i.leftContent),d(1),u("textContent",i.displayText),d(1),u("ngIf",i.showLoader),d(1),u("ngIf",i.canRemove),d(1),u("ngIf",i.editing))},dependencies:[pn,_e,re,q,Je,$e,Ee],styles:['[_nghost-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-block;font:var(--tui-font-text-s);line-height:1.25rem;max-width:100%;cursor:default;outline:none;text-decoration:none;padding:0;border:0}[_nghost-%COMP%]:after{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;content:"";box-sizing:border-box;border-radius:inherit;pointer-events:none}._hoverable[_nghost-%COMP%]:hover[data-status=custom]:after, ._hoverable[_nghost-%COMP%]:active[data-status=custom]:after{background-color:var(--tui-clear)}[_nghost-%COMP%]:focus:after{border:2px solid var(--tui-focus)}[data-size=s][_nghost-%COMP%]{font:var(--tui-font-text-xs);line-height:1.25rem;border-radius:var(--tui-radius-xs)}[data-size=m][_nghost-%COMP%]{border-radius:var(--tui-radius-xs)}[data-size=l][_nghost-%COMP%]{border-radius:var(--tui-radius-s)}[data-status=primary][_nghost-%COMP%]{background-color:var(--tui-primary);color:var(--tui-primary-text)}[data-status=primary]._hoverable[_nghost-%COMP%]:hover{background-color:var(--tui-primary-hover)}[data-status=primary]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-primary-active)}[data-status=error][_nghost-%COMP%]{background-color:var(--tui-error-bg);color:var(--tui-text-01)}[data-status=error]._hoverable[_nghost-%COMP%]:hover, [data-status=error]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-error-bg-hover)}[data-status=error][data-mode=onDark][_nghost-%COMP%]{background-color:var(--tui-error-bg-night);color:var(--tui-text-01-night)}[data-status=error][data-mode=onDark]._hoverable[_nghost-%COMP%]:hover, [data-status=error][data-mode=onDark]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-error-bg-night-hover)}[data-status=success][_nghost-%COMP%]{background-color:var(--tui-success-bg);color:var(--tui-text-01)}[data-status=success]._hoverable[_nghost-%COMP%]:hover, [data-status=success]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-success-bg-hover)}[data-status=success][data-mode=onDark][_nghost-%COMP%]{background-color:var(--tui-success-bg-night);color:var(--tui-text-01-night)}[data-status=success][data-mode=onDark]._hoverable[_nghost-%COMP%]:hover, [data-status=success][data-mode=onDark]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-success-bg-night-hover)}[data-status=warning][_nghost-%COMP%]{background-color:var(--tui-warning-bg);color:var(--tui-text-01)}[data-status=warning]._hoverable[_nghost-%COMP%]:hover, [data-status=warning]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-warning-bg-hover)}[data-status=warning][data-mode=onDark][_nghost-%COMP%]{background-color:var(--tui-warning-bg-night);color:var(--tui-text-01-night)}[data-status=warning][data-mode=onDark]._hoverable[_nghost-%COMP%]:hover, [data-status=warning][data-mode=onDark]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-warning-bg-night-hover)}[data-status=default][_nghost-%COMP%]{color:var(--tui-text-01-night);background-color:var(--tui-base-06)}[data-status=default][_nghost-%COMP%]:not([data-mode])._hoverable:hover{background-color:var(--tui-base-07)}[data-status=default][_nghost-%COMP%]:not([data-mode])._hoverable:active{background-color:var(--tui-base-08)}[data-status=default][data-mode=onDark][_nghost-%COMP%]{color:var(--tui-text-01-night);background-color:var(--tui-clear-inverse)}[data-status=default][data-mode=onDark]._hoverable[_nghost-%COMP%]:hover{background-color:var(--tui-clear-inverse-hover)}[data-status=default][data-mode=onDark]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-clear-inverse-active)}[data-status=default][data-mode=onDark][_nghost-%COMP%]:focus:after{border:2px solid var(--tui-base-01)}[data-status=default][data-mode=onLight][_nghost-%COMP%]{background-color:var(--tui-clear);color:var(--tui-text-01)}[data-status=default][data-mode=onLight]._hoverable[_nghost-%COMP%]:hover{background-color:var(--tui-clear-hover)}[data-status=default][data-mode=onLight]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-clear-active)}._editing[_nghost-%COMP%]{background:transparent!important}._disabled[_nghost-%COMP%]{pointer-events:none;opacity:var(--tui-disabled-opacity)}._hoverable[_nghost-%COMP%]{cursor:pointer}._autocolor[_nghost-%COMP%]{color:#000c}.t-text[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;text-overflow:ellipsis;padding-right:.02em}.t-tag[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:flex;width:auto;align-items:center;font:inherit;border-radius:inherit}[data-size=s][_nghost-%COMP%] .t-tag[_ngcontent-%COMP%]{height:1.25rem;padding:0 .375rem}[data-size=m][_nghost-%COMP%] .t-tag[_ngcontent-%COMP%]{height:var(--tui-height-xs);padding:0 .5rem}[data-size=l][_nghost-%COMP%] .t-tag[_ngcontent-%COMP%]{height:var(--tui-height-s);padding:0 .75rem}._editing[_nghost-%COMP%] .t-tag[_ngcontent-%COMP%]{visibility:hidden}.t-edit[_ngcontent-%COMP%]{margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;font:inherit;color:var(--tui-text-01);width:100%;height:100%;box-sizing:border-box;padding:0 .5rem}.t-edit[_ngcontent-%COMP%]:-webkit-autofill, .t-edit[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-edit[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}[data-size=s][_nghost-%COMP%] .t-edit[_ngcontent-%COMP%]{padding:0 .375rem}[data-size=m][_nghost-%COMP%] .t-edit[_ngcontent-%COMP%]{padding:0 .5rem}[data-size=l][_nghost-%COMP%] .t-edit[_ngcontent-%COMP%]{padding:0 .75rem}.t-icon[_ngcontent-%COMP%]{width:1rem;height:100%;cursor:pointer;pointer-events:all;opacity:var(--tui-disabled-opacity);-webkit-margin-start:.25rem;margin-inline-start:.25rem;-webkit-margin-end:-.25rem;margin-inline-end:-.25rem}.t-icon[_ngcontent-%COMP%]:hover{opacity:1}[data-size=s][_nghost-%COMP%] .t-icon[_ngcontent-%COMP%]{-webkit-margin-start:0;margin-inline-start:0}[data-size=s][_nghost-%COMP%] .t-icon[_ngcontent-%COMP%] svg{transform:scale(.75)}.t-content[_ngcontent-%COMP%]{width:1rem;height:1rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}'],changeDetection:0}),t})(),zs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,Ke,Ce,gn,ae]]}),t})();var Vc=["focusableElement"],Gc=["tagsContainer"],Uc=["cleaner"],zc=["errorIcon"],Wc=["tag"];function Xc(t,n){t&1&&Et(0)}function Qc(t,n){if(t&1&&A(0,"tui-svg",21),t&2){let e=n.polymorpheusOutlet;u("src",e)}}var Ao=t=>({$implicit:t});function jc(t,n){if(t&1&&(g(0,"div",19),C(1,Qc,1,1,"tui-svg",20),h()),t&2){let e=m();d(1),u("polymorpheusOutlet",e.iconLeft)("polymorpheusOutletContext",ue(2,Ao,e.size))}}function Yc(t,n){if(t&1&&(g(0,"div",22),Y(1,2),h()),t&2){let e=m();S("t-placeholder_raised",e.placeholderRaised)}}function Zc(t,n){if(t&1){let e=z();g(0,"tui-tag",24,25),f("edited",function(o){let s=O(e).index,c=m(2);return x(c.onTagEdited(o,s))})("keydown.arrowLeft.prevent",function(){let r=O(e).index,s=m(2);return x(s.onTagKeyDownArrowLeft(r))})("keydown.arrowRight.prevent",function(){let r=O(e).index,s=m(2);return x(s.onTagKeyDownArrowRight(r))}),Q(2,"async"),h()}if(t&2){let e=n.$implicit,i=m(2);u("disabled",i.computedDisabled||i.disabledItemHandler(e))("editable",i.editable&&!i.readOnly)("hoverable",!i.readOnly)("leftContent",i.getLeftContent(e))("maxLength",i.maxLength)("removable",!i.readOnly&&i.removable)("separator",i.separator)("size",i.controller.size)("status",$(2,11,i.status$))("tuiFocusable",!1)("value",e.toString())}}function Jc(t,n){if(t&1&&(Te(0),C(1,Zc,3,13,"tui-tag",23),ye()),t&2){let e=m();d(1),u("ngForOf",e.value)("ngForTrackBy",e.trackByFn)}}function $c(t,n){if(t&1&&A(0,"span",27),t&2){let e=n.$implicit,i=m(2);S("t-text_comma",i.computedFocused&&!i.inputHidden)("t-text_disabled",i.disabledItemHandler(e))("t-text_error",!i.tagValidator(e)),u("textContent",e)}}function Kc(t,n){if(t&1&&C(0,$c,1,7,"span",26),t&2){let e=m();u("ngForOf",e.value)}}function qc(t,n){if(t&1){let e=z();g(0,"tui-svg",32,33),f("click.stop",function(){O(e);let o=m(3);return x(o.onCleanerClick())}),h()}if(t&2){let e=n.polymorpheusOutlet;u("src",e)}}function ed(t,n){if(t&1&&(Te(0),C(1,qc,2,1,"tui-svg",31),ye()),t&2){let e=m(2);d(1),u("polymorpheusOutlet",e.iconCleaner)("polymorpheusOutletContext",ue(2,Ao,e.size))}}function td(t,n){if(t&1&&A(0,"tui-tooltip",34),t&2){let e=m(2);u("content",e.hintOptions==null?null:e.hintOptions.content)("describeId",e.id)}}function id(t,n){if(t&1&&A(0,"tui-svg",21),t&2){let e=n.polymorpheusOutlet;u("src",e)}}function nd(t,n){if(t&1&&(g(0,"div",35),C(1,id,1,1,"tui-svg",20),h()),t&2){let e=m(2);d(1),u("polymorpheusOutlet",e.icon)("polymorpheusOutletContext",ue(2,Ao,e.size))}}function od(t,n){if(t&1&&(g(0,"div",28),C(1,ed,2,4,"ng-container",0)(2,td,1,2,"tui-tooltip",29)(3,nd,2,4,"div",30),h()),t&2){let e=m();d(1),u("ngIf",e.hasCleaner),d(1),u("ngIf",e.showHint),d(1),u("ngIf",e.icon)}}function rd(t,n){if(t&1&&A(0,"tui-svg",36),t&2){let e=m();u("src",e.icons.error)}}var ad=[[["tuiContent"]],[["select"]],"*"],sd=["tuiContent","select","*"],ld={separator:",",uniqueTags:!0,tagStatus:"primary"},ud=Z(ld);var cd={s:1.25,m:1.5,l:2},dd={s:1,m:1.25,l:1.25},pd=.125,Ws=(()=>{class t extends yr{constructor(e,i,o,r,s,c,p,v,_){super(e,i),this.el=o,this.modeDirective=r,this.mode$=s,this.hintOptions=c,this.controller=p,this.options=v,this.icons=_,this.tags=Yo,this.separator=this.options.separator,this.search="",this.editable=!0,this.tagValidator=Ut,this.expandable=!0,this.rows=1/0,this.inputHidden=!1,this.uniqueTags=this.options.uniqueTags,this.maxLength=null,this.placeholder="",this.removable=!0,this.disabledItemHandler=he,this.searchChange=new W,this.status$=this.mode$.pipe(N(()=>this.status)),this.open=!1}set pseudoFocusedSetter(e){!e&&!this.focused&&this.scrollTo(0),this.pseudoFocus=e}get nativeFocusableElement(){return!this.focusableElement||this.computedDisabled?null:this.focusableElement.nativeElement}get focused(){var e;return ut(this.el.nativeElement)||!!(!((e=this.hostedDropdown)===null||e===void 0)&&e.focused)}get appearance(){return this.controller.appearance}get size(){return this.controller.size}get labelOutside(){let{size:e,labelOutside:i}=this.controller;return e==="s"||i}get iconLeft(){return this.controller.iconLeft}get icon(){return this.controller.icon}get iconCleaner(){return this.controller.options.iconCleaner}get hasCleaner(){return this.controller.cleaner&&this.hasValue&&this.interactive}get hasNativeValue(){return!!this.search}get hasValue(){return!!this.value.length||this.hasNativeValue}get hasPlaceholder(){return!this.labelOutside||!this.hasValue&&(!this.hasExampleText||this.inputHidden)}get placeholderRaised(){return!this.labelOutside&&(this.computedFocused&&!this.readOnly||this.hasValue)}get hasExampleText(){var e;return!!(!((e=this.nativeFocusableElement)===null||e===void 0)&&e.placeholder)&&this.computedFocused&&!this.hasValue&&!this.readOnly}get hasRightIcons(){var e;return this.hasCleaner||!!this.icon||!!(!((e=this.hintOptions)===null||e===void 0)&&e.content)&&!this.computedDisabled}get showHint(){var e;return!!(!((e=this.hintOptions)===null||e===void 0)&&e.content)&&(this.controller.options.hintOnDisabled||!this.computedDisabled)}get status(){var e;return!((e=this.modeDirective)===null||e===void 0)&&e.mode?"default":this.options.tagStatus}get canOpen(){return this.interactive&&!!this.datalist}get computeMaxHeight(){return this.expandable?this.rows*this.lineHeight:null}onFocusInOut(){this.cdr.detectChanges()}detectRetargetFromLabel(e){Ui(e)&&e.stopImmediatePropagation()}getLeftContent(e){return!this.tagValidator(e)&&this.errorIconTemplate?this.errorIconTemplate:""}onCleanerClick(){this.updateSearch(""),this.clear(),this.focusInput()}onActiveZone(e){this.open=!1,this.addTag(),this.updateFocused(e),!e&&!this.computedFocused&&this.scrollTo(0)}onMouseDown(e){var i;let o=Vi(e);!this.focusableElement||o===this.focusableElement.nativeElement||!Ct(e.target)||!((i=this.cleanerSvg)===null||i===void 0)&&i.nativeElement.contains(e.target)||this.tagsContainer&&o!==this.tagsContainer.nativeElement&&this.tagsContainer.nativeElement.contains(o)||(e.preventDefault(),this.focusInput())}onFieldKeyDownBackspace(e){!this.labelOutside&&!this.hasNativeValue&&this.value.length?this.deleteLastEnabledItem():this.onFieldKeyDownArrowLeft(e)}onFieldKeyDownArrowLeft(e){!this.labelOutside||this.hasNativeValue||!this.value.length||(e.preventDefault(),this.tags.last.nativeElement.focus())}onFieldKeyDownEnter(){this.addTag(),this.scrollTo()}onTagKeyDownArrowLeft(e){e>0&&this.onScrollKeyDown(e,-1)}onTagKeyDownArrowRight(e){e===this.value.length-1?this.focusInput():this.onScrollKeyDown(e,1)}onTagEdited(e,i){this.focusInput(e===""),this.value=this.filterValue(this.value.map((o,r)=>r!==i?o:e.split(this.separator).map(s=>s.trim()).filter(Boolean)).reduce((o,r)=>o.concat(r),[]))}handleOption(e){this.focusInput(),this.updateSearch(""),this.value=this.filterValue(this.value.concat(e)),this.open=!1,this.scrollTo()}onInput(e){let i=e.split(this.separator),r=i.map(s=>this.clippedValue(s.trim())).filter((s,c,{length:p})=>s.length>0&&c!==p-1).filter(s=>!this.disabledItemHandler(s));i.length>1?(this.updateSearch(this.clippedValue(i[i.length-1].trim())),this.value=this.filterValue([...this.value,...r])):this.updateSearch(this.clippedValue(e)),this.open=this.hasNativeValue}onPaste(e){let i=nr(e);this.onInput(i||"")}onDrop({dataTransfer:e}){e&&this.onInput(e.getData("text")||"")}setDisabledState(){super.setDisabledState(),this.open=!1}trackByFn(e,i){return i.toString()}scrollTo(e){var i;e===void 0&&(e=(i=this.scrollBar)===null||i===void 0?void 0:i.nativeElement.scrollWidth),setTimeout(()=>{this.scrollBar&&(this.scrollBar.nativeElement.scrollLeft=e||0)})}filterValue(e){let i=new Set;return e.reverse().filter(o=>!this.uniqueTags||o&&!i.has(o)&&i.add(o)).reverse()}onScrollKeyDown(e,i){let o=this.tags.find((r,s)=>s===e+i);!o||!this.scrollBar||(o.nativeElement.focus(),i*this.scrollBar.nativeElement.clientWidth-i*o.nativeElement.offsetLeft-o.nativeElement.clientWidth<0&&(this.scrollBar.nativeElement.scrollLeft+=i*o.nativeElement.clientWidth))}updateSearch(e){this.focusableElement&&(this.focusableElement.nativeElement.value=e),this.search=e,this.searchChange.emit(e)}addTag(){var e,i;let o=(i=(e=this.search)===null||e===void 0?void 0:e.trim())!==null&&i!==void 0?i:"";!o||this.disabledItemHandler(o)||(this.updateSearch(""),this.value=this.filterValue(this.value.concat(o)))}deleteLastEnabledItem(){for(let e=this.value.length-1;e>=0;e--)if(!this.disabledItemHandler(this.value[e])){this.value=tr(this.value,e);break}}focusInput(e=!1){var i;(i=this.nativeFocusableElement)===null||i===void 0||i.focus({preventScroll:e})}clippedValue(e){return e.slice(0,this.maxLength||e.length)}get lineHeight(){return this.labelOutside?cd[this.controller.size]+2*pd:dd[this.controller.size]}}return t.\u0275fac=function(e){return new(e||t)(l(De,10),l(ge),l(E),l(Kt,8),l(tt),l(Pt,8),l(_i),l(ud),l(sn))},t.\u0275cmp=k({type:t,selectors:[["tui-input-tag"]],contentQueries:function(e,i,o){if(e&1&&vt(o,Za,5,mi),e&2){let r;V(r=G())&&(i.datalist=r.first)}},viewQuery:function(e,i){if(e&1&&(j(ci,5),j(Vc,5),j(Gc,5),j(Uc,5,E),j(xt,5,E),j(zc,5),j(Wc,5,E)),e&2){let o;V(o=G())&&(i.hostedDropdown=o.first),V(o=G())&&(i.focusableElement=o.first),V(o=G())&&(i.tagsContainer=o.first),V(o=G())&&(i.cleanerSvg=o.first),V(o=G())&&(i.scrollBar=o.first),V(o=G())&&(i.errorIconTemplate=o.first),V(o=G())&&(i.tags=o)}},hostVars:7,hostBindings:function(e,i){e&1&&f("focusin.capture.silent",function(){return i.onFocusInOut()})("focusout.capture.silent",function(){return i.onFocusInOut()}),e&2&&(L("data-size",i.size),S("_expandable",i.expandable)("_label-outside",i.labelOutside)("_icon-left",i.iconLeft))},inputs:{separator:"separator",search:"search",editable:"editable",tagValidator:"tagValidator",expandable:"expandable",rows:"rows",inputHidden:"inputHidden",uniqueTags:"uniqueTags",maxLength:"maxLength",placeholder:"placeholder",removable:"removable",disabledItemHandler:"disabledItemHandler",pseudoFocusedSetter:["pseudoFocused","pseudoFocusedSetter"]},outputs:{searchChange:"searchChange"},features:[T([Pe(t),qe(t),Hr(t),Bn,it],[Ts]),P],ngContentSelectors:sd,decls:25,vars:34,consts:[[4,"ngIf"],[1,"t-hosted",3,"canOpen","content","open","openChange","tuiActiveZoneChange"],["tuiWrapper","",3,"appearance","disabled","focus","hover","invalid","readOnly","click.prevent.silent","mousedown"],[1,"t-content"],["class","t-icon t-icon_left t-textfield-icon t-icon-wrapper",4,"ngIf"],[1,"t-wrapper"],[1,"t-absolute-wrapper"],["automation-id","tui-input-tag__placeholder","class","t-placeholder",3,"t-placeholder_raised",4,"ngIf"],[1,"t-scrollbar",3,"hidden"],[1,"t-tags"],[4,"ngIf","ngIfElse"],["text",""],[1,"t-input-wrapper"],[1,"t-ghost"],["automation-id","tui-input-tag__native","type","text",1,"t-native",3,"disabled","id","ngModel","placeholder","readOnly","tuiFocusable","drop.prevent","keydown.arrowLeft","keydown.backspace","keydown.enter.prevent","ngModelChange","paste.prevent"],["focusableElement",""],[1,"t-value-content"],["class","t-icons t-icon-wrapper",4,"ngIf"],["errorIcon",""],[1,"t-icon","t-icon_left","t-textfield-icon","t-icon-wrapper"],["appearance","icon","tuiWrapper","",3,"src",4,"polymorpheusOutlet","polymorpheusOutletContext"],["appearance","icon","tuiWrapper","",3,"src"],["automation-id","tui-input-tag__placeholder",1,"t-placeholder"],["automation-id","tui-input-tag__tag","class","t-tag",3,"disabled","editable","hoverable","leftContent","maxLength","removable","separator","size","status","tuiFocusable","value","edited","keydown.arrowLeft.prevent","keydown.arrowRight.prevent",4,"ngFor","ngForOf","ngForTrackBy"],["automation-id","tui-input-tag__tag",1,"t-tag",3,"disabled","editable","hoverable","leftContent","maxLength","removable","separator","size","status","tuiFocusable","value","edited","keydown.arrowLeft.prevent","keydown.arrowRight.prevent"],["tag",""],["class","t-text",3,"t-text_comma","t-text_disabled","t-text_error","textContent",4,"ngFor","ngForOf"],[1,"t-text",3,"textContent"],[1,"t-icons","t-icon-wrapper"],["automation-id","tui-input-tag__tooltip","class","t-tooltip",3,"content","describeId",4,"ngIf"],["class","t-icon t-textfield-icon",4,"ngIf"],["appearance","icon","automation-id","tui-input-tag__cleaner","tuiWrapper","","class","t-cleaner",3,"src","click.stop",4,"polymorpheusOutlet","polymorpheusOutletContext"],["appearance","icon","automation-id","tui-input-tag__cleaner","tuiWrapper","",1,"t-cleaner",3,"src","click.stop"],["cleaner",""],["automation-id","tui-input-tag__tooltip",1,"t-tooltip",3,"content","describeId"],[1,"t-icon","t-textfield-icon"],[1,"t-error-icon",3,"src"]],template:function(e,i){if(e&1&&(oe(ad),C(0,Xc,1,0,"ng-container",0),Q(1,"async"),g(2,"tui-hosted-dropdown",1),f("openChange",function(r){return i.open=r})("tuiActiveZoneChange",function(r){return i.onActiveZone(r)}),g(3,"div",2),f("click.prevent.silent",function(r){return i.detectRetargetFromLabel(r)})("mousedown",function(r){return i.onMouseDown(r)}),g(4,"div",3),C(5,jc,2,4,"div",4),g(6,"div",5)(7,"div",6),C(8,Yc,2,2,"div",7),h(),g(9,"tui-scrollbar",8)(10,"div",9),C(11,Jc,2,2,"ng-container",10)(12,Kc,1,1,"ng-template",null,11,fe),g(14,"div",12)(15,"div",13),X(16),h(),g(17,"input",14,15),f("drop.prevent",function(r){return i.onDrop(r)})("keydown.arrowLeft",function(r){return i.onFieldKeyDownArrowLeft(r)})("keydown.backspace",function(r){return i.onFieldKeyDownBackspace(r)})("keydown.enter.prevent",function(){return i.onFieldKeyDownEnter()})("ngModelChange",function(r){return i.onInput(r)})("paste.prevent",function(r){return i.onPaste(r)}),h()()(),g(19,"div",16),Y(20),h()()(),Y(21,1),C(22,od,4,3,"div",17),h(),C(23,rd,1,1,"ng-template",null,18,fe),h()()),e&2){let o=K(13);u("ngIf",$(1,32,i.hintOptions==null?null:i.hintOptions.change$)),d(2),u("canOpen",i.canOpen)("content",i.datalist||"")("open",i.open),d(1),u("appearance",i.appearance)("disabled",i.computedDisabled)("focus",i.computedFocused)("hover",i.pseudoHover)("invalid",i.computedInvalid)("readOnly",i.readOnly),d(2),u("ngIf",i.iconLeft),d(3),u("ngIf",i.hasPlaceholder),d(1),ke("max-height",i.computeMaxHeight,"rem"),u("hidden",!i.expandable),d(1),S("t-tags_empty",(!i.focused||i.inputHidden)&&!(i.value!=null&&i.value.length)),d(1),u("ngIf",i.labelOutside)("ngIfElse",o),d(3),S("t-input-wrapper_collapsed",i.computedDisabled||i.readOnly||i.inputHidden),d(2),Fi(i.search),d(1),S("t-native_hidden",i.inputHidden),u("disabled",i.computedDisabled)("id",i.id)("ngModel",i.search)("placeholder",i.placeholder)("readOnly",i.readOnly||i.inputHidden)("tuiFocusable",i.computedFocusable),L("maxLength",i.maxLength),d(5),u("ngIf",i.hasRightIcons)}},dependencies:[ci,_e,xt,Us,Nn,re,Be,Ve,q,Gt,nt,Je,$e,Ee,ve],styles:['[_nghost-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;text-align:left;border-radius:var(--tui-radius-m);height:var(--tui-height);min-height:var(--tui-height);max-height:var(--tui-height)}[data-size=s][_nghost-%COMP%]{--tui-height: var(--tui-height-s)}[data-size=m][_nghost-%COMP%]{--tui-height: var(--tui-height-m)}[data-size=l][_nghost-%COMP%]{--tui-height: var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input[_ngcontent-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;border-style:solid;border-color:transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-input[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input[_ngcontent-%COMP%]:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-input[_ngcontent-%COMP%]::-webkit-caps-lock-indicator, .t-input[_ngcontent-%COMP%]::-webkit-contacts-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-credit-card-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-credentials-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}.t-input[_ngcontent-%COMP%]::placeholder{color:var(--tui-text-03);opacity:0}._focused[_nghost-%COMP%]:not(._readonly) .t-input[_ngcontent-%COMP%]::placeholder, tui-primitive-textfield._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-primitive-textfield._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-textarea._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-textarea._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-text-area._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-text-area._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder{opacity:1}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input [tuiWrapper][data-mode="onDark"][_nghost-%COMP%]:-webkit-autofill, [tuiWrapper][data-mode="onDark"] [_nghost-%COMP%]:-webkit-autofill, [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-input [tuiWrapper][data-mode="onDark"][_nghost-%COMP%]:-webkit-autofill:hover, [tuiWrapper][data-mode="onDark"] [_nghost-%COMP%]:-webkit-autofill:hover, [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill:focus, .t-input [tuiWrapper][data-mode="onDark"][_nghost-%COMP%]:-webkit-autofill:focus, [tuiWrapper][data-mode="onDark"] [_nghost-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, .t-input [tuiWrapper][data-mode="onDark"][_nghost-%COMP%]::placeholder, [tuiWrapper][data-mode="onDark"] [_nghost-%COMP%]::placeholder{color:var(--tui-text-03-night)}[data-size=s][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="s"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size="s"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size="s"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size="s"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size="s"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size="s"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-s)}[data-size=m][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="m"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size="m"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size="m"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size="m"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size="m"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size="m"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-m)}[data-size=l][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="l"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size="l"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size="l"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size="l"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size="l"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size="l"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-l)}._disabled[_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield._disabled[_nghost-%COMP%], tui-primitive-textfield._disabled [_nghost-%COMP%], .t-input tui-textarea._disabled[_nghost-%COMP%], tui-textarea._disabled [_nghost-%COMP%], .t-input tui-text-area._disabled[_nghost-%COMP%], tui-text-area._disabled [_nghost-%COMP%]{pointer-events:none}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="l"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size="l"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield){padding-top:1.25rem}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="l"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], tui-primitive-textfield[data-size="l"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="m"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size="m"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield){padding-top:1rem}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size="m"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], tui-primitive-textfield[data-size="m"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.69rem;transform:translateY(-.5rem)}._hidden[_nghost-%COMP%] input.t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield._hidden[_nghost-%COMP%], tui-primitive-textfield._hidden [_nghost-%COMP%]{opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;box-sizing:border-box;align-items:center;overflow:hidden}[data-size=s][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-s)}[data-size=m][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-m)}[data-size=l][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-l)}.t-wrapper[_ngcontent-%COMP%]{flex:1;min-width:0;-webkit-padding-end:.25rem;padding-inline-end:.25rem}.t-placeholder[_ngcontent-%COMP%]{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}@supports (-webkit-hyphens: none){.t-placeholder[_ngcontent-%COMP%]{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised[_ngcontent-%COMP%]{transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}._invalid[_nghost-%COMP%]:not(._focused) .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill)}._invalid[_nghost-%COMP%]:not(._focused) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill-night)}._focused[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-03)}[data-size=l][_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font:var(--tui-font-text-m);line-height:1.25rem}[data-size=l][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font-size:.8156rem}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01-night)}._focused[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}.t-cleaner[_ngcontent-%COMP%]{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}._readonly[_nghost-%COMP%] .t-cleaner[_ngcontent-%COMP%], ._disabled[_nghost-%COMP%] .t-cleaner[_ngcontent-%COMP%]{pointer-events:none}.t-icon[_ngcontent-%COMP%]{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}[data-size=s][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-start:-.375rem;margin-inline-start:-.375rem}[data-size=m][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-start:-.125rem;margin-inline-start:-.125rem;-webkit-margin-end:.375rem;margin-inline-end:.375rem}[data-size=l][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-end:.75rem;margin-inline-end:.75rem}.t-icons[_ngcontent-%COMP%]{display:flex;align-items:center}[data-size=m][_nghost-%COMP%] .t-icons[_ngcontent-%COMP%]{-webkit-margin-end:-.125rem;margin-inline-end:-.125rem}[data-size=s][_nghost-%COMP%] .t-icons[_ngcontent-%COMP%]{-webkit-margin-end:-.375rem;margin-inline-end:-.375rem}[_nghost-%COMP%]:not([data-size="s"]) .t-icons[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(:first-child){-webkit-margin-start:.25rem;margin-inline-start:.25rem}[_nghost-%COMP%]{cursor:text}._expandable[_nghost-%COMP%]{height:auto;max-height:none}._disabled[_nghost-%COMP%]{pointer-events:none}._readonly[_nghost-%COMP%]{cursor:default}[data-size=m][_nghost-%COMP%]{line-height:1rem}.t-hosted[_ngcontent-%COMP%]{display:block;border-radius:inherit}.t-scrollbar[_ngcontent-%COMP%]{scroll-behavior:smooth;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;min-width:100%}tui-root._reduced-motion[_nghost-%COMP%] .t-scrollbar[_ngcontent-%COMP%], tui-root._reduced-motion [_nghost-%COMP%] .t-scrollbar[_ngcontent-%COMP%]{scroll-behavior:auto}[_nghost-%COMP%]:not(._label-outside) .t-scrollbar[_ngcontent-%COMP%], ._label-outside._icon-left[_nghost-%COMP%] .t-scrollbar[_ngcontent-%COMP%]{margin:0}[data-size=s]._icon-left[_nghost-%COMP%] .t-scrollbar[_ngcontent-%COMP%]{-webkit-margin-start:.25rem;margin-inline-start:.25rem}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-scrollbar[_ngcontent-%COMP%]{border-top:1rem solid transparent}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-scrollbar[_ngcontent-%COMP%]{border-top:1.25rem solid transparent}.t-tags[_ngcontent-%COMP%]{display:flex;-webkit-padding-start:.25rem;padding-inline-start:.25rem}.t-tags_expandable[_ngcontent-%COMP%]{overflow:hidden}.t-tags_empty[_ngcontent-%COMP%]{height:0}._expandable[_nghost-%COMP%] .t-tags[_ngcontent-%COMP%]{flex-wrap:wrap;white-space:normal;overflow:hidden}._readonly[_nghost-%COMP%] .t-tags[_ngcontent-%COMP%]{pointer-events:none}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-tags[_ngcontent-%COMP%], [data-size=l][_nghost-%COMP%]:not(._label-outside) .t-tags[_ngcontent-%COMP%]{padding:0}.t-content[_ngcontent-%COMP%]{align-items:flex-start}[data-size=s][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{min-height:var(--tui-height-s)}[data-size=m][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{min-height:var(--tui-height-m)}[data-size=l][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{min-height:var(--tui-height-l)}[data-size=s][_nghost-%COMP%] .t-icon-wrapper[_ngcontent-%COMP%]{height:var(--tui-height-s)}[data-size=m][_nghost-%COMP%] .t-icon-wrapper[_ngcontent-%COMP%]{height:var(--tui-height-m)}[data-size=l][_nghost-%COMP%] .t-icon-wrapper[_ngcontent-%COMP%]{height:var(--tui-height-l)}.t-absolute-wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center}[data-size=m][_nghost-%COMP%] .t-absolute-wrapper[_ngcontent-%COMP%]{height:var(--tui-height-m)}[data-size=l][_nghost-%COMP%] .t-absolute-wrapper[_ngcontent-%COMP%]{height:var(--tui-height-l)}.t-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;padding:0;box-sizing:border-box}[data-size=s][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{min-height:var(--tui-height-s);padding:calc((var(--tui-height-s) - 1.5rem) / 2) 0}[data-size=m][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{min-height:var(--tui-height-m);padding:calc((var(--tui-height-m) - var(--tui-height-xs) - .25rem) / 2) 0}[data-size=l][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:calc((var(--tui-height-l) - var(--tui-height-s) - .25rem) / 2) 0}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-wrapper[_ngcontent-%COMP%]{padding:calc((var(--tui-height-m) - 2rem) / 2) 0}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-wrapper[_ngcontent-%COMP%]{padding:calc((var(--tui-height-l) - 2.5rem) / 2) 0}.t-tag[_ngcontent-%COMP%]{margin:.125rem .5rem .125rem -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem;max-width:100%;flex-shrink:0}[data-size=m][_nghost-%COMP%] .t-tag[_ngcontent-%COMP%]{-webkit-margin-start:-.125rem;margin-inline-start:-.125rem;-webkit-margin-end:.375rem;margin-inline-end:.375rem}.t-text[_ngcontent-%COMP%]:after{content:",\\a0"}.t-text_disabled[_ngcontent-%COMP%]{color:var(--tui-text-03)}.t-text_error[_ngcontent-%COMP%]{color:var(--tui-negative)}.t-text[_ngcontent-%COMP%]:not(.t-text_comma):last-of-type:after{content:""}[_nghost-%COMP%]:not(._expandable) .t-text[_ngcontent-%COMP%]{white-space:nowrap}.t-input-wrapper[_ngcontent-%COMP%], .t-value-content[_ngcontent-%COMP%]{position:relative;display:flex;flex:1;max-width:100%}[data-size=s][_nghost-%COMP%] .t-input-wrapper[_ngcontent-%COMP%], [data-size=s][_nghost-%COMP%] .t-value-content[_ngcontent-%COMP%]{min-height:1.5rem}[data-size=m][_nghost-%COMP%] .t-input-wrapper[_ngcontent-%COMP%], [data-size=m][_nghost-%COMP%] .t-value-content[_ngcontent-%COMP%]{min-height:calc(var(--tui-height-xs) + 2 * .125rem)}[data-size=l][_nghost-%COMP%] .t-input-wrapper[_ngcontent-%COMP%], [data-size=l][_nghost-%COMP%] .t-value-content[_ngcontent-%COMP%]{min-height:calc(var(--tui-height-s) + 2 * .125rem)}[_nghost-%COMP%]:not(._label-outside) .t-input-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%]:not(._label-outside) .t-value-content[_ngcontent-%COMP%]{min-height:1rem}.t-input-wrapper_collapsed[_ngcontent-%COMP%]{flex:0;-webkit-margin-start:-.5rem;margin-inline-start:-.5rem}.t-value-content[_ngcontent-%COMP%]:empty{display:none}.t-ghost[_ngcontent-%COMP%]{visibility:hidden;white-space:pre;text-overflow:clip;min-width:.125rem}[_nghost-%COMP%]:not(._expandable) .t-ghost[_ngcontent-%COMP%]{min-width:2rem}.t-native[_ngcontent-%COMP%]{margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;padding:0;cursor:inherit}.t-native[_ngcontent-%COMP%]:-webkit-autofill, .t-native[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-native[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-native_hidden[_ngcontent-%COMP%]{opacity:0;text-indent:-10em}.t-native[_ngcontent-%COMP%]::placeholder{color:var(--tui-text-03);opacity:0}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-native[_ngcontent-%COMP%]::placeholder{color:var(--tui-text-03-night)}._focused[_nghost-%COMP%] .t-native[_ngcontent-%COMP%]:not(:-moz-read-only)::placeholder{opacity:1}._focused[_nghost-%COMP%] .t-native[_ngcontent-%COMP%]:not(:read-only)::placeholder{opacity:1}.t-error-icon[_ngcontent-%COMP%]{display:block;color:var(--tui-error-fill);width:1rem;height:1rem}'],changeDetection:0}),t})(),Xs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({providers:[Tr],imports:[[R,Ke,ae,ot,Dt,jt,Ce,li,Vn,Rn,zs,Ge]]}),t})();var gd=["type","range","tuiSlider",""];var md={size:"m",trackColor:"var(--tui-base-03)"},hd=Z(md);var ko=(()=>{class t{constructor(e,i,o,r,s,c){var p;this.control=e,this.options=o,this.el=r,this.userAgent=s,this.injector=c,this.size=this.options.size,this.segments=1,e instanceof Ee&&((p=e.valueChanges)===null||p===void 0||p.pipe(Wi(i),No(1)).subscribe())}get min(){return Number(this.el.nativeElement.min)}get max(){return Number(this.el.nativeElement.max||100)}get step(){return Number(this.el.nativeElement.step)||1}get value(){let{el:e,control:i,hasKeySteps:o}=this;return!o&&i instanceof Ee?i.viewModel:Number(e.nativeElement.value)||0}set value(e){this.el.nativeElement.value="".concat(e)}get valueRatio(){return(this.value-this.min)/(this.max-this.min)||0}get valuePercentage(){return 100*this.valueRatio}get segmentWidth(){return 100/Math.max(1,this.segments)}get isOldEdge(){return Ko(jo,this.userAgent)}get hasKeySteps(){return!!this.injector.get(fd,null)}}return t.\u0275fac=function(e){return new(e||t)(l(De,10),l(ge),l(hd),l(E),l(Qi),l(ki))},t.\u0275cmp=k({type:t,selectors:[["input","type","range","tuiSlider",""]],hostVars:11,hostBindings:function(e,i){e&1&&f("input",function(){return 0}),e&2&&(L("data-size",i.size),ke("--tui-slider-track-color",i.options.trackColor)("--tui-slider-fill-ratio",i.valueRatio)("--tui-slider-fill-percentage",i.valuePercentage,"%")("--tui-slider-segment-width",i.segmentWidth,"%"),S("_old-edge",i.isOldEdge))},inputs:{size:"size",segments:"segments"},attrs:gd,decls:0,vars:0,template:function(e,i){},styles:['[_nghost-%COMP%]{position:relative;display:block;width:100%;color:var(--tui-primary);cursor:pointer}[_nghost-%COMP%]:active{cursor:ew-resize}[_nghost-%COMP%]:disabled{opacity:var(--tui-disabled-opacity);cursor:auto}[data-size=s][_nghost-%COMP%]:not(:disabled):before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.25rem;left:calc(var(--tui-slider-fill-percentage) - var(--tui-slider-fill-ratio) * .5rem);width:.5rem;height:.5rem;border-radius:50%;transform:var(--tui-slider-thumb-transform, scale(1));content:"";cursor:ew-resize;background:currentColor;opacity:0}[data-size=s][_nghost-%COMP%]:active:before{opacity:.2;transform:var(--tui-slider-thumb-transform, scale(1)) scale(2.33)}[data-size=m][_nghost-%COMP%]:not(:disabled):before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.125rem;left:calc(var(--tui-slider-fill-percentage) - var(--tui-slider-fill-ratio) * .75rem);width:.75rem;height:.75rem;border-radius:50%;transform:var(--tui-slider-thumb-transform, scale(1));content:"";cursor:ew-resize;background:currentColor;opacity:0}[data-size=m][_nghost-%COMP%]:active:before{opacity:.2;transform:var(--tui-slider-thumb-transform, scale(1)) scale(2.33)}[_nghost-%COMP%]:not(._old-edge){-webkit-appearance:none;-moz-appearance:none;appearance:none;height:.125rem;padding:.4375rem 0;background-color:transparent;background-clip:content-box;outline:none;border-radius:var(--tui-radius-m)}[_nghost-%COMP%]:not(._old-edge)::-webkit-slider-container{border-radius:inherit}[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-runnable-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .5rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor var(--tui-slider-fill-percentage),transparent var(--tui-slider-fill-percentage));background-position-x:0,.25rem,0;background-size:calc(100% - .75rem),calc(100% - .75rem),auto}[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-runnable-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor var(--tui-slider-fill-percentage),transparent var(--tui-slider-fill-percentage));background-position-x:0,.125rem,0;background-size:calc(100% - .5rem),calc(100% - .5rem),auto}[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .5rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.25rem;background-size:calc(100% - .75rem)}[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.125rem;background-size:calc(100% - .5rem)}[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb{-webkit-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;height:.75rem;width:.75rem;box-sizing:content-box;background-clip:content-box;border:.125rem solid transparent;border-left:0;border-right:0;transform:var(--tui-slider-thumb-transform, scale(1));margin-top:-.4375rem}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb:hover{background-color:var(--tui-primary-hover)}:active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb{background-color:var(--tui-primary-active)}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb:hover, :active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:focus-visible[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb{-webkit-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;height:.5rem;width:.5rem;box-sizing:content-box;background-clip:content-box;border:.25rem solid transparent;border-left:0;border-right:0;transform:var(--tui-slider-thumb-transform, scale(1));margin-top:-.4375rem}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb:hover{background-color:var(--tui-primary-hover)}:active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb{background-color:var(--tui-primary-active)}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb:hover, :active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.5)}:focus-visible[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb{-moz-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-moz-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;height:.75rem;width:.75rem;box-sizing:content-box;background-clip:content-box;border:.125rem solid transparent;border-left:0;border-right:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb{cursor:ew-resize}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb:hover{background-color:var(--tui-primary-hover)}:active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb{background-color:var(--tui-primary-active)}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb:hover, :active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:focus-visible[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb{-moz-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-moz-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;height:.5rem;width:.5rem;box-sizing:content-box;background-clip:content-box;border:.25rem solid transparent;border-left:0;border-right:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb{cursor:ew-resize}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb:hover{background-color:var(--tui-primary-hover)}:active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb{background-color:var(--tui-primary-active)}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb:hover, :active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.5)}:focus-visible[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}[_nghost-%COMP%]:not(._old-edge)::-moz-range-progress{border-radius:inherit}[_nghost-%COMP%]:not(._old-edge)::-moz-range-progress{height:.125rem;background:currentColor;border-top-right-radius:0;border-bottom-right-radius:0}._old-edge[_nghost-%COMP%]::-ms-thumb{background:currentColor;border-radius:50%}._old-edge[_nghost-%COMP%]::-ms-fill-lower{background:currentColor}._old-edge[_nghost-%COMP%]::-ms-track{background:var(--tui-slider-track-color);border:none}'],changeDetection:0}),Ie([Fe],t.prototype,"hasKeySteps",null),t})(),fd=(()=>{class t extends Zi{constructor(e,i,o,r){super(e,i),this.el=o,this.slider=r}get nativeFocusableElement(){return this.computedDisabled?null:this.el.nativeElement}get focused(){return Re(this.nativeFocusableElement)}get min(){return this.keySteps[0][1]}get max(){return this.keySteps[this.keySteps.length-1][1]}updateControlValue(){this.value=ls(this.slider.valuePercentage,this.keySteps)}writeValue(e){if(e===null)return;let i=_t(e,this.min,this.max);this.slider.value=this.transformToNativeValue(i)}getFallbackValue(){return 0}transformToNativeValue(e){let{min:i,max:o}=this.slider;return us(e,this.keySteps)*(o-i)/100+i}}return t.\u0275fac=function(e){return new(e||t)(l(De,10),l(ge),l(E),l(pe(()=>ko)))},t.\u0275dir=M({type:t,selectors:[["input","tuiSlider","","keySteps",""]],hostVars:4,hostBindings:function(e,i){e&1&&f("input",function(){return i.updateControlValue()})("change",function(){return i.updateControlValue()}),e&2&&(Xe("disabled",i.computedDisabled),L("aria-valuenow",i.safeCurrentValue)("aria-valuemin",i.min)("aria-valuemax",i.max))},inputs:{keySteps:"keySteps"},features:[P]}),t})();var Qs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R]]}),t})();var vd=["focusableElement"];function _d(t,n){if(t&1&&A(0,"tui-loader",7),t&2){let e=m();u("inheritColor",!0)("showLoader",e.value)("size",e.loaderSize)}}function Cd(t,n){if(t&1&&A(0,"tui-svg",10),t&2){let e=n.polymorpheusOutlet;u("src",e)}}var js=t=>({$implicit:t});function bd(t,n){if(t&1&&(g(0,"span",8),C(1,Cd,1,1,"tui-svg",9),h()),t&2){let e=m();d(1),u("polymorpheusOutlet",e.iconOn)("polymorpheusOutletContext",ue(2,js,e.size))}}function Id(t,n){if(t&1&&A(0,"tui-loader",7),t&2){let e=m();u("inheritColor",!0)("showLoader",!e.value)("size",e.loaderSize)}}function Md(t,n){if(t&1&&A(0,"tui-svg",12),t&2){let e=n.polymorpheusOutlet;u("src",e)}}function Td(t,n){if(t&1&&(g(0,"span",8),C(1,Md,1,1,"tui-svg",11),h()),t&2){let e=m();d(1),u("polymorpheusOutlet",e.iconOff)("polymorpheusOutletContext",ue(2,js,e.size))}}var yd={icons:{toggleOff({$implicit:t}){return t==="m"?"tuiIconToggleOff":"tuiIconToggleOffLarge"},toggleOn({$implicit:t}){return t==="m"?"tuiIconToggleOn":"tuiIconToggleOnLarge"}},appearances:{checked:dt.Primary,unchecked:dt.Secondary},singleColor:!1,showIcons:!1,size:"m"},Dd=Z(yd);var Ys=(()=>{class t extends Zi{constructor(e,i,o,r){super(e,i),this.modeDirective=o,this.options=r,this.singleColor=this.options.singleColor,this.showIcons=this.options.showIcons,this.showLoader=!1,this.size=this.options.size}get iconOn(){return this.options.icons.toggleOn}get iconOff(){return this.options.icons.toggleOff}get nativeFocusableElement(){var e,i;return(i=(e=this.focusableElement)===null||e===void 0?void 0:e.nativeElement)!==null&&i!==void 0?i:null}get focused(){return Re(this.nativeFocusableElement)}get appearance(){return this.singleColor||this.value?this.options.appearances.checked:this.options.appearances.unchecked}get sizeM(){return this.size==="m"}get loaderSize(){return this.sizeM?"xs":"s"}get hostMode(){var e,i;return(i=(e=this.modeDirective)===null||e===void 0?void 0:e.mode)!==null&&i!==void 0?i:null}onChecked(e){this.value=e}onFocused(e){this.updateFocused(e)}onFocusVisible(e){this.updateFocusVisible(e)}getFallbackValue(){return!1}}return t.\u0275fac=function(e){return new(e||t)(l(De,10),l(ge),l(Kt,8),l(Dd))},t.\u0275cmp=k({type:t,selectors:[["tui-toggle"]],viewQuery:function(e,i){if(e&1&&j(vd,5),e&2){let o;V(o=G())&&(i.focusableElement=o.first)}},hostVars:4,hostBindings:function(e,i){e&2&&(L("data-size",i.size)("data-mode",i.hostMode),S("_checked",i.value))},inputs:{singleColor:"singleColor",showIcons:"showIcons",showLoader:"showLoader",size:"size"},features:[T([Pe(t),qe(t)]),P],decls:9,vars:16,consts:[["tuiWrapper","",3,"active","appearance","disabled","focus","hover","invalid","readOnly"],[1,"t-toggle"],["class","t-loader",3,"inheritColor","showLoader","size",4,"ngIf"],["class","t-icon-wrapper",4,"ngIf"],[1,"t-circle"],["automation-id","tui-toggle__checkbox","role","switch","type","checkbox",1,"t-checkbox",3,"disabled","id","tuiFocusable","tuiChecked","tuiCheckedChange","tuiFocusedChange","tuiFocusVisibleChange"],["focusableElement",""],[1,"t-loader",3,"inheritColor","showLoader","size"],[1,"t-icon-wrapper"],["automation-id","tui-toggle__check-icon","class","t-icon",3,"src",4,"polymorpheusOutlet","polymorpheusOutletContext"],["automation-id","tui-toggle__check-icon",1,"t-icon",3,"src"],["automation-id","tui-toggle__cancel-icon","class","t-icon t-icon_off",3,"src",4,"polymorpheusOutlet","polymorpheusOutletContext"],["automation-id","tui-toggle__cancel-icon",1,"t-icon","t-icon_off",3,"src"]],template:function(e,i){e&1&&(g(0,"div",0)(1,"div",1),C(2,_d,1,3,"tui-loader",2)(3,bd,2,4,"span",3),A(4,"div",4),C(5,Id,1,3,"tui-loader",2)(6,Td,2,4,"span",3),h(),g(7,"input",5,6),f("tuiCheckedChange",function(r){return i.value=r})("tuiFocusedChange",function(r){return i.onFocused(r)})("tuiFocusVisibleChange",function(r){return i.onFocusVisible(r)}),h()()),e&2&&(u("active",i.pseudoActive)("appearance",i.appearance)("disabled",i.computedDisabled)("focus",i.computedFocusVisible)("hover",i.pseudoHover)("invalid",i.computedInvalid)("readOnly",i.readOnly),d(2),u("ngIf",i.showLoader),d(1),u("ngIf",i.showIcons&&!i.showLoader),d(2),u("ngIf",i.showLoader),d(1),u("ngIf",i.showIcons&&!i.showLoader),d(1),u("disabled",i.disabled)("id",i.id)("tuiFocusable",i.focusable)("tuiChecked",i.value),L("aria-checked",i.value))},dependencies:[pn,_e,Ve,re,q,vn,nt,In,Cn],styles:["[_nghost-%COMP%]{position:relative;display:inline-block;vertical-align:middle;overflow:hidden;border-radius:6.25rem}[data-size=m][_nghost-%COMP%]{width:2rem;height:1rem}[data-size=l][_nghost-%COMP%]{width:3rem;height:1.5rem}.t-checkbox[_ngcontent-%COMP%]{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;height:100%;width:100%;opacity:0;cursor:pointer}.t-checkbox[_ngcontent-%COMP%]:-webkit-autofill, .t-checkbox[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-checkbox[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}._disabled[_nghost-%COMP%] .t-checkbox[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.t-toggle[_ngcontent-%COMP%]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;align-items:center;justify-content:center}[data-size=m][_nghost-%COMP%] .t-toggle[_ngcontent-%COMP%]{width:3rem;height:1rem;transform:translate(-1rem)}[data-size=l][_nghost-%COMP%] .t-toggle[_ngcontent-%COMP%]{width:4.5rem;height:1.5rem;transform:translate(-1.5rem)}._checked[_nghost-%COMP%] .t-toggle[_ngcontent-%COMP%]{transform:translate(0)}.t-circle[_ngcontent-%COMP%]{margin:.125rem 0;flex-shrink:0;border-radius:100%;background-color:var(--tui-base-01)}._disabled[_nghost-%COMP%] .t-circle_light[_ngcontent-%COMP%]{opacity:.24}[data-size=m][_nghost-%COMP%] .t-circle[_ngcontent-%COMP%]{width:.75rem;height:.75rem}[data-size=l][_nghost-%COMP%] .t-circle[_ngcontent-%COMP%]{width:1rem;height:1rem}._disabled[_nghost-%COMP%] .t-circle[_ngcontent-%COMP%]{background-color:var(--tui-base-01)}.t-loader[_ngcontent-%COMP%]{min-width:auto}[_nghost-%COMP%]:not(._checked) .t-loader[_ngcontent-%COMP%]{color:var(--tui-base-06)}[_nghost-%COMP%]:not(._checked)._disabled .t-loader[_ngcontent-%COMP%]{color:var(--tui-base-05)}[_nghost-%COMP%]:not(._checked)[data-mode=onDark] .t-loader[_ngcontent-%COMP%]{color:var(--tui-text-03-night)}[_nghost-%COMP%]:not(._checked)[data-mode=onDark]._disabled .t-loader[_ngcontent-%COMP%]{color:var(--tui-clear-inverse-active)}[_nghost-%COMP%]:not(._checked)[data-mode=onLight] .t-loader[_ngcontent-%COMP%]{color:var(--tui-text-03)}[_nghost-%COMP%]:not(._checked)[data-mode=onLight]._disabled .t-loader[_ngcontent-%COMP%]{color:var(--tui-clear-active)}[data-size=m][_nghost-%COMP%] .t-loader[_ngcontent-%COMP%]{width:.75rem;margin:0 .2rem;transform:scale(.75)}[data-size=l][_nghost-%COMP%] .t-loader[_ngcontent-%COMP%]{width:1rem;margin:0 .25rem}.t-icon-wrapper[_ngcontent-%COMP%]{display:flex}.t-icon[_ngcontent-%COMP%]{opacity:.8}.t-icon_off[_ngcontent-%COMP%]{color:var(--tui-base-06)}._disabled[_nghost-%COMP%] .t-icon_off[_ngcontent-%COMP%]{color:var(--tui-base-05)}[data-mode=onDark][_nghost-%COMP%] .t-icon_off[_ngcontent-%COMP%]{color:var(--tui-text-03-night)}[data-mode=onDark]._disabled[_nghost-%COMP%] .t-icon_off[_ngcontent-%COMP%]{color:var(--tui-clear-inverse-active)}[data-mode=onLight][_nghost-%COMP%] .t-icon_off[_ngcontent-%COMP%]{color:var(--tui-text-03)}[data-mode=onLight]._disabled[_nghost-%COMP%] .t-icon_off[_ngcontent-%COMP%]{color:var(--tui-clear-active)}[data-size=m][_nghost-%COMP%] .t-icon[_ngcontent-%COMP%]{width:1rem;height:1rem;transform:scale(.75)}[data-size=l][_nghost-%COMP%] .t-icon[_ngcontent-%COMP%]{margin:0 .125rem;width:1.5rem;height:1.5rem}[_nghost-%COMP%]:hover .t-icon[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0}),t})(),Zs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=I({type:t}),t.\u0275inj=b({imports:[[R,Mn,ot,ii,bn,_n,Ge,Ce,gn,ae]]}),t})();function Od(t,n){if(t&1&&A(0,"span",17),t&2){let e=m();u("innerHtml",e.purify("Customizable for any use case"),Ei)}}function xd(t,n){if(t&1&&(g(0,"tui-checkbox-labeled",18),X(1),h()),t&2){let e=n.$implicit,i=m();u("ngModel",e===i.labels[1]),d(1),me(" ",e," ")}}function wd(t,n){if(t&1){let e=z();g(0,"div",19)(1,"div",20),A(2,"img",21),g(3,"h3"),X(4,"Aleksandr Inkin"),h()(),g(5,"div",22)(6,"button",23),f("click",function(){let r=O(e).$implicit;return x(r.complete())}),h(),g(7,"button",24),f("click",function(){let r=O(e).$implicit;return x(r.complete())}),h()()()}}function Pd(t,n){if(t&1){let e=z();g(0,"tui-push",25),f("close",function(){O(e);let o=m();return x(o.toggle(!1))}),A(1,"tui-svg",26),X(2," I have a bad feeling about this... "),g(3,"button",27),f("click",function(){O(e);let o=m();return x(o.toggle(!1))}),X(4," Fortune "),h(),g(5,"button",28),f("click",function(){O(e);let o=m();return x(o.toggle(!1))}),X(6," Glory "),h()()}}var vb=(()=>{let n=class n{constructor(){this.dompurifySanitizer=Pi(Jr),this.dialogs=Pi(fn),this.cd=Pi(ge),this.labels=["New","Read","Archived","Junk"],this.tags=["Angular","Open source"],this.date=null,this.notification=!1,this.slider=80}onDay(i){this.date=i}call(i){this.dialogs.open(i,{appearance:"call",closeable:!1,dismissible:!1}).subscribe()}toggle(i){this.notification=i,this.cd.detectChanges()}purify(i){return this.dompurifySanitizer.sanitize(Uo.HTML,i)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=k({type:n,selectors:[["home"]],standalone:!0,features:[zo],decls:26,vars:12,consts:[[1,"title"],[1,"tui-space_vertical-10",3,"tuiHintContent","tuiTextfieldLabelOutside","ngModel","ngModelChange"],["hint",""],[1,"flex"],[1,"date"],["required","",3,"ngModel","ngModelChange","click.capture.stop","keydown.capture.stop","mousedown.capture.stop"],[1,"calendar",3,"tuiDropdownOpen","value","dayClick","event.prevent.silent"],["size","l","class","tui-space_bottom-4",3,"ngModel",4,"ngFor","ngForOf"],[1,"controls"],["size","l",1,"tui-space_right-3",3,"showIcons","ngModel","ngModelChange"],["size","m","step","any","tuiSlider","","type","range",1,"tui-space_vertical-6",3,"max","ngModel","ngModelChange"],[1,"icons"],["appearance","","icon","tuiIconVolumeXLarge","shape","rounded","title","Mute speaker","tuiIconButton","","type","button",1,"button",3,"click"],["appearance","","icon","tuiIconMicOffLarge","shape","rounded","title","Mute microphone","tuiIconButton","","type","button",1,"button"],["appearance","","icon","tuiIconPhoneForwardedLarge","shape","rounded","title","Forward call","tuiIconButton","","type","button",1,"error",3,"click"],["callTemplate",""],["heading","Indiana Jones","type","Dr. Henry Walton Jones, Jr.",3,"close",4,"tuiPush"],[3,"innerHtml"],["size","l",1,"tui-space_bottom-4",3,"ngModel"],[1,"call","gradient-border"],[1,"person"],["alt","author","loading","lazy","src","https://avatars.githubusercontent.com/u/11832552"],[1,"buttons"],["appearance","custom","iconRight","tuiIconPhone","size","m","tuiIconButton","",1,"missed",3,"click"],["appearance","custom","iconRight","tuiIconPhone","size","m","tuiIconButton","",1,"income",3,"click"],["heading","Indiana Jones","type","Dr. Henry Walton Jones, Jr.",3,"close"],["src","tuiIconMessageSquareLarge"],["tuiButton","","type","button",3,"click"],["tuiLink","","type","button",3,"click"]],template:function(o,r){if(o&1){let s=z();g(0,"h2",0),X(1," Dozens of "),A(2,"br"),X(3," components\n"),h(),g(4,"tui-input-tag",1),f("ngModelChange",function(p){return r.tags=p}),h(),C(5,Od,1,1,"ng-template",null,2,fe),g(7,"div",3)(8,"div",4)(9,"tui-input-date",5),f("ngModelChange",function(p){return r.date=p})("click.capture.stop",function(){return 0})("keydown.capture.stop",function(){return 0})("mousedown.capture.stop",function(){return 0}),X(10," Choose date "),h(),g(11,"tui-calendar",6),f("dayClick",function(p){return r.onDay(p)})("event.prevent.silent",function(){return 0}),h()(),g(12,"div"),C(13,xd,2,2,"tui-checkbox-labeled",7),h(),g(14,"div",8)(15,"label")(16,"tui-toggle",9),f("ngModelChange",function(p){return r.notification=p}),h(),X(17," Push notification "),h(),g(18,"input",10),f("ngModelChange",function(p){return r.slider=p}),h(),g(19,"div",11)(20,"button",12),f("click",function(){return r.slider=0}),h(),A(21,"button",13),g(22,"button",14),f("click",function(){O(s);let p=K(24);return x(r.call(p))}),h()()()(),C(23,wd,8,0,"ng-template",null,15,fe)(25,Pd,7,0,"tui-push",16)}if(o&2){let s=K(6);d(4),u("tuiHintContent",s)("tuiTextfieldLabelOutside",!0)("ngModel",r.tags),d(5),u("ngModel",r.date),d(2),u("tuiDropdownOpen",!1)("value",r.date),d(2),u("ngForOf",r.labels),d(3),u("showIcons",!0)("ngModel",r.notification),d(2),u("max",140)("ngModel",r.slider),d(7),u("tuiPush",r.notification)}},dependencies:[R,Gt,Ke,Je,Xo,$e,Qo,Ee,Xs,Ws,Zs,Ys,Hn,Ln,Fn,Mo,Gs,Ns,Vs,Ps,ws,hn,mn,En,Pt,Qs,ko,Ce,_e,Zr,Qr,jr,Yr,ei,qt,Pn,vi,$r],styles:['.title{font-size:3.5rem;line-height:4.0625rem;margin:0}.t-overlay{display:none!important}.flex{display:flex}.date{width:18rem;margin-right:2.8125rem}.calendar{box-shadow:var(--tui-shadow-dropdown);border-radius:var(--tui-radius-m);border:.0625rem solid var(--tui-base-03);margin-top:.25rem;width:18rem;box-sizing:border-box;height:auto}.controls{flex:1;margin-left:2.8125rem}.icons{display:flex;justify-content:space-between}.button[data-size][data-shape],.error[data-size][data-shape]{transition-property:color,background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-base-02);color:var(--tui-primary)}.button[data-size][data-shape]:hover,.error[data-size][data-shape]:hover,.button[data-size][data-shape]:active,.error[data-size][data-shape]:active{background:var(--tui-base-03);color:var(--tui-primary-hover)}.error[data-size][data-shape]{color:var(--tui-negative)}.error[data-size][data-shape]:hover,.error[data-size][data-shape]:active{color:var(--tui-negative-hover)}tui-dialog[data-appearance=call][data-size]{border-radius:.25rem;width:25rem;padding:0;border:none;margin:1.25rem auto}tui-dialog[data-appearance=call][data-size]>.t-content{padding:.5rem 1rem;box-shadow:0 0 .1875rem #1f1f1f;--border-width: .1875rem}tui-dialog[data-appearance=call][data-size]>.t-content:after{position:absolute;content:"";top:calc(-1 * var(--border-width));left:calc(-1 * var(--border-width));z-index:-1;width:calc(100% + var(--border-width) * 2);height:calc(100% + var(--border-width) * 2);background:linear-gradient(60deg,hsl(224,85%,66%),hsl(269,85%,66%),hsl(314,85%,66%),hsl(359,85%,66%),hsl(44,85%,66%),hsl(89,85%,66%),hsl(134,85%,66%),hsl(179,85%,66%));background-size:300% 300%;background-position:0 50%;border-radius:calc(2 * var(--border-width));animation:moveGradient 4s alternate infinite}tui-dialog[data-appearance=call][data-size]>.t-filler,tui-dialog[data-appearance=call][data-size]:after{display:none}tui-dialog[data-appearance=call][data-size] .call{display:flex;align-items:center;justify-content:space-between}tui-dialog[data-appearance=call][data-size] .person{display:flex;align-items:center;gap:.625rem}tui-dialog[data-appearance=call][data-size] .person img{width:2.25rem;border-radius:.625rem;border:.0625rem solid var(--tui-base-05)}tui-dialog[data-appearance=call][data-size] .missed,tui-dialog[data-appearance=call][data-size] .income{border-radius:50%;color:#fff}tui-dialog[data-appearance=call][data-size] .missed [data-appearance=custom]{background:#d23a47;transform:rotate(135deg)}tui-dialog[data-appearance=call][data-size] .income [data-appearance=custom]{background:#27bb64}tui-dialog[data-appearance=call][data-size] .buttons{display:flex;gap:.625rem}@keyframes moveGradient{50%{background-position:100% 50%}}\n/*# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiYXBwcy9kZW1vL3NyYy9hcHAvaG9tZS9ob21lL3J1bm5lci93b3JrL3ByZXZpZXctbGFuZGluZy1jb21wb25lbnRzL3ByZXZpZXctbGFuZGluZy1jb21wb25lbnRzL2FwcHMvZGVtby9zcmMvYXBwL2hvbWUvaG9tZS5jb21wb25lbnQubGVzcyIsICJhcHBzL2RlbW8vc3JjL2FwcC9ob21lL2hvbWUvcnVubmVyL3dvcmsvcHJldmlldy1sYW5kaW5nLWNvbXBvbmVudHMvcHJldmlldy1sYW5kaW5nLWNvbXBvbmVudHMvbm9kZV9tb2R1bGVzL0B0YWlnYS11aS9jb3JlL3N0eWxlcy9taXhpbnMvbWl4aW5zLmxlc3MiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIkBpbXBvcnQgJ0B0YWlnYS11aS9jb3JlL3N0eWxlcy90YWlnYS11aS1sb2NhbCc7XG5cbi50aXRsZSB7XG4gICAgZm9udC1zaXplOiAzLjVyZW07XG4gICAgbGluZS1oZWlnaHQ6IDQuMDYyNXJlbTtcbiAgICBtYXJnaW46IDA7XG59XG5cbi50LW92ZXJsYXkge1xuICAgIGRpc3BsYXk6IG5vbmUgIWltcG9ydGFudDtcbn1cblxuLmZsZXgge1xuICAgIGRpc3BsYXk6IGZsZXg7XG59XG5cbi5kYXRlIHtcbiAgICB3aWR0aDogMThyZW07XG4gICAgbWFyZ2luLXJpZ2h0OiAyLjgxMjVyZW07XG59XG5cbi5jYWxlbmRhciB7XG4gICAgLnNoYWRvdygyKTtcbiAgICBib3JkZXItcmFkaXVzOiB2YXIoLS10dWktcmFkaXVzLW0pO1xuICAgIGJvcmRlcjogMC4wNjI1cmVtIHNvbGlkIHZhcigtLXR1aS1iYXNlLTAzKTtcbiAgICBtYXJ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aW46IDEuMjVyZW0gYXV0bztcblxuICAgICYgPiAudC1jb250ZW50IHtcbiAgICAgICAgcGFkZGluZzogMC41cmVtIDFyZW07XG4gICAgICAgIGJveC1zaGFkb3c6IDAgMCAwLjE4NzVyZW0gIzFmMWYxZjtcblxuICAgICAgICAtLWJvcmRlci13aWR0aDogMC4xODc1cmVtO1xuXG4gICAgICAgICY6OmFmdGVyIHtcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICAgICAgICAgIGNvbnRlbnQ6ICcnO1xuICAgICAgICAgICAgdG9wOiBjYWxjKC0xICogdmFyKC0tYm9yZGVyLXdpZHRoKSk7XG4gICAgICAgICAgICBsZWZ0OiBjYWxjKC0xICogdmFyKC0tYm9yZGVyLXdpZHRoKSk7XG4gICAgICAgICAgICB6LWluZGV4OiAtMTtcbiAgICAgICAgICAgIHdpZHRoOiBjYWxjKDEwMCUgKyB2YXIoLS1ib3JkZXItd2lkdGgpICogMik7XG4gICAgICAgICAgICBoZWlnaHQ6IGNhbGMoMTAwJSArIHZhcigtLWJvcmRlci13aWR0aCkgKiAyKTtcbiAgICAgICAgICAgIGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudChcbiAgICAgICAgICAgICAgICA2MGRlZyxcbiAgICAgICAgICAgICAgICBoc2woMjI0LCA4NSUsIDY2JSksXG4gICAgICAgICAgICAgICAgaHNsKDI2OSwgODUlLCA2NiUpLFxuICAgICAgICAgICAgICAgIGhzbCgzMTQsIDg1JSwgNjYlKSxcbiAgICAgICAgICAgICAgICBoc2woMzU5LCA4NSUsIDY2JSksXG4gICAgICAgICAgICAgICAgaHNsKDQ0LCA4NSUsIDY2JSksXG4gICAgICAgICAgICAgICAgaHNsKDg5LCA4NSUsIDY2JSksXG4gICAgICAgICAgICAgICAgaHNsKDEzNCwgODUlLCA2NiUpLFxuICAgICAgICAgICAgICAgIGhzbCgxNzksIDg1JSwgNjYlKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGJhY2tncm91bmQtc2l6ZTogMzAwJSAzMDAlO1xuICAgICAgICAgICAgYmFja2dyb3VuZC1wb3NpdGlvbjogMCA1MCU7XG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiBjYWxjKDIgKiB2YXIoLS1ib3JkZXItd2lkdGgpKTtcbiAgICAgICAgICAgIGFuaW1hdGlvbjogbW92ZUdyYWRpZW50IDRzIGFsdGVybmF0ZSBpbmZpbml0ZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgICYgPiAudC1maWxsZXIsXG4gICAgJjo6YWZ0ZXIge1xuICAgICAgICBkaXNwbGF5OiBub25lO1xuICAgIH1cblxuICAgIC5jYWxsIHtcbiAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuICAgIH1cblxuICAgIC5wZXJzb24ge1xuICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICBnYXA6IDAuNjI1cmVtO1xuXG4gICAgICAgIGltZyB7XG4gICAgICAgICAgICB3aWR0aDogMi4yNXJlbTtcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDAuNjI1cmVtO1xuICAgICAgICAgICAgYm9yZGVyOiAwLjA2MjVyZW0gc29saWQgdmFyKC0tdHVpLWJhc2UtMDUpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLm1pc3NlZCxcbiAgICAuaW5jb21lIHtcbiAgICAgICAgYm9yZGVyLXJhZGl1czogNTAlO1xuICAgICAgICBjb2xvcjogI2ZmZjtcbiAgICB9XG5cbiAgICAubWlzc2VkIFtkYXRhLWFwcGVhcmFuY2U9J2N1c3RvbSddIHtcbiAgICAgICAgYmFja2dyb3VuZDogcmdiKDIxMCwgNTgsIDcxKTtcbiAgICAgICAgdHJhbnNmb3JtOiByb3RhdGUoM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1BQUEsc0JBQ0EsUUFDQSxPQUFBLFNBQUEsTUFBd0IsSUFBQSxlQTFEcEMsVUFBVSxDQUFBLHFCQUF3QixDQUFBLFdBOEQ5QixDQUFBLE9BOURKLFVBQVUsQ0FBQSxxQkFBd0IsQ0FBQSxXQStEOUIsQ0FBQSxxQkFDSSxJQUNBLE1BQUEsS0FqRVIsVUFBVSxDQUFBLHFCQUF3QixDQUFBLFdBb0U5QixDQU5BLE9BTVEsQ0FBQSx3QkFDSixXQUFBLFFBQ0EsVUFBVyxPQUFBLFFBdEVuQixVQUFVLENBQUEscUJBQXdCLENBQUEsV0F5RTlCLENBVkEsT0FVUSxDQUFBLHdCQUNKLFdBQUEsUUExRVIsVUFBVSxDQUFBLHFCQUF3QixDQUFBLFdBNkU5QixDQUFBLFFBQ0ksUUFBQSxLQUNBLElBQUEsUUFJUixXQWhEWSxhQWlEUixJQUNJLG9CQUFBLEtBQUEiLAogICJuYW1lcyI6IFtdCn0K */\n'],encapsulation:2,changeDetection:0});let t=n;return t})();export{vb as HomeComponent}; -//# sourceMappingURL=chunk-MYKSZVPX.js.map diff --git a/chunk-MYKSZVPX.js.map b/chunk-MYKSZVPX.js.map deleted file mode 100644 index 5868b69e..00000000 --- a/chunk-MYKSZVPX.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-autofilled.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-checked.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-focus-visible.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-focusable.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-focused.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-hovered.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-obscured.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-pressed.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-prevent-default.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-repeat-times.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-date-time.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-scrollbar.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-directives-dropdown.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-directives-hint.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-directives-mask-accessor.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-directives-scroll-into-view.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-directives-textfield-controller.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-primitive-year-picker.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-primitive-spin-button.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-pipes-calendar-sheet.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-pipes-month.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-pipes-order-week-days.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-primitive-calendar.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-calendar.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-data-list.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-hosted-dropdown.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-primitive-checkbox.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-tooltip.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-primitive-textfield.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-utils-format.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-constants.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-utils-math.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-utils-miscellaneous.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-tokens.js","node_modules/@maskito/core/index.esm.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-providers.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-directives-value-accessor.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-checkbox.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-checkbox-labeled.js","node_modules/@maskito/kit/index.esm.js","node_modules/@maskito/angular/fesm2015/maskito-angular.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-input-date.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-tag.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-input-tag.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-slider.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-toggle.js","apps/demo/src/app/home/home.component.ts","apps/demo/src/app/home/home.component.html"],"sourcesContent":["import * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, EventEmitter, Directive, Inject, HostBinding, Output, HostListener, NgModule } from '@angular/core';\nimport * as i1 from '@taiga-ui/cdk/services';\nimport { TuiDirectiveStylesService } from '@taiga-ui/cdk/services';\nlet TuiAutofilledStyleComponent = /*#__PURE__*/(() => {\n class TuiAutofilledStyleComponent {}\n TuiAutofilledStyleComponent.ɵfac = function TuiAutofilledStyleComponent_Factory(t) {\n return new (t || TuiAutofilledStyleComponent)();\n };\n TuiAutofilledStyleComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiAutofilledStyleComponent,\n selectors: [[\"ng-component\"]],\n hostAttrs: [1, \"tui-autofilled-styles\"],\n decls: 0,\n vars: 0,\n template: function TuiAutofilledStyleComponent_Template(rf, ctx) {},\n styles: [\".tui-autofill input,input.tui-autofill{transition:box-shadow .01s}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiAutofilledStyleComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiAutofilledDirective = /*#__PURE__*/(() => {\n class TuiAutofilledDirective {\n constructor(directiveStyles) {\n this.autofilled = false;\n this.tuiAutofilledChange = new EventEmitter();\n directiveStyles.addComponent(TuiAutofilledStyleComponent);\n }\n transitionStartHandler({\n propertyName,\n target\n }) {\n var _a;\n const matchedAutofill = propertyName.includes('box-shadow') && ((_a = target) === null || _a === void 0 ? void 0 : _a.matches('input'));\n if (matchedAutofill) {\n this.autofilled = !this.autofilled;\n this.tuiAutofilledChange.emit(this.autofilled);\n }\n }\n }\n TuiAutofilledDirective.ɵfac = function TuiAutofilledDirective_Factory(t) {\n return new (t || TuiAutofilledDirective)(i0.ɵɵdirectiveInject(TuiDirectiveStylesService));\n };\n TuiAutofilledDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiAutofilledDirective,\n selectors: [[\"\", \"tuiAutofilledChange\", \"\"]],\n hostAttrs: [1, \"tui-autofill\"],\n hostVars: 2,\n hostBindings: function TuiAutofilledDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"transitionstart\", function TuiAutofilledDirective_transitionstart_HostBindingHandler($event) {\n return ctx.transitionStartHandler($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"_autofilled\", ctx.autofilled);\n }\n },\n outputs: {\n tuiAutofilledChange: \"tuiAutofilledChange\"\n }\n });\n return TuiAutofilledDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiAutofilledModule = /*#__PURE__*/(() => {\n class TuiAutofilledModule {}\n TuiAutofilledModule.ɵfac = function TuiAutofilledModule_Factory(t) {\n return new (t || TuiAutofilledModule)();\n };\n TuiAutofilledModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiAutofilledModule\n });\n TuiAutofilledModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiAutofilledModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiAutofilledDirective, TuiAutofilledModule, TuiAutofilledStyleComponent };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Directive, HostBinding, Input, Output, HostListener, NgModule } from '@angular/core';\nlet TuiCheckedDirective = /*#__PURE__*/(() => {\n class TuiCheckedDirective {\n constructor() {\n this.indeterminate = false;\n this.checked = false;\n this.tuiCheckedChange = new EventEmitter();\n }\n get isChecked() {\n return this.checked;\n }\n get isIndeterminate() {\n return this.indeterminate;\n }\n set tuiChecked(checked) {\n this.checked = checked || false;\n this.indeterminate = checked === null;\n }\n onChange({\n checked\n }) {\n this.checked = checked;\n this.indeterminate = false;\n this.tuiCheckedChange.emit(checked);\n }\n }\n TuiCheckedDirective.ɵfac = function TuiCheckedDirective_Factory(t) {\n return new (t || TuiCheckedDirective)();\n };\n TuiCheckedDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiCheckedDirective,\n selectors: [[\"input\", \"tuiChecked\", \"\"], [\"input\", \"tuiCheckedChange\", \"\"]],\n hostVars: 2,\n hostBindings: function TuiCheckedDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"change\", function TuiCheckedDirective_change_HostBindingHandler($event) {\n return ctx.onChange($event.target);\n });\n }\n if (rf & 2) {\n i0.ɵɵhostProperty(\"checked\", ctx.isChecked)(\"indeterminate\", ctx.isIndeterminate);\n }\n },\n inputs: {\n tuiChecked: \"tuiChecked\"\n },\n outputs: {\n tuiCheckedChange: \"tuiCheckedChange\"\n }\n });\n return TuiCheckedDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiCheckedModule = /*#__PURE__*/(() => {\n class TuiCheckedModule {}\n TuiCheckedModule.ɵfac = function TuiCheckedModule_Factory(t) {\n return new (t || TuiCheckedModule)();\n };\n TuiCheckedModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiCheckedModule\n });\n TuiCheckedModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiCheckedModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiCheckedDirective, TuiCheckedModule };\n","import * as i0 from '@angular/core';\nimport { Directive, Inject, NgModule } from '@angular/core';\nimport { TuiFocusVisibleService, TuiDestroyService } from '@taiga-ui/cdk/services';\nimport * as i1 from 'rxjs';\n\n/**\n * Directive to imitate :focus-visible\n * (https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible)\n * in browsers that do not support it\n */\nlet TuiFocusVisibleDirective = /*#__PURE__*/(() => {\n class TuiFocusVisibleDirective {\n constructor(tuiFocusVisibleChange) {\n this.tuiFocusVisibleChange = tuiFocusVisibleChange;\n }\n }\n TuiFocusVisibleDirective.ɵfac = function TuiFocusVisibleDirective_Factory(t) {\n return new (t || TuiFocusVisibleDirective)(i0.ɵɵdirectiveInject(TuiFocusVisibleService));\n };\n TuiFocusVisibleDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiFocusVisibleDirective,\n selectors: [[\"\", \"tuiFocusVisibleChange\", \"\"]],\n outputs: {\n tuiFocusVisibleChange: \"tuiFocusVisibleChange\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiFocusVisibleService])]\n });\n return TuiFocusVisibleDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFocusVisibleModule = /*#__PURE__*/(() => {\n class TuiFocusVisibleModule {}\n TuiFocusVisibleModule.ɵfac = function TuiFocusVisibleModule_Factory(t) {\n return new (t || TuiFocusVisibleModule)();\n };\n TuiFocusVisibleModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiFocusVisibleModule\n });\n TuiFocusVisibleModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiFocusVisibleModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiFocusVisibleDirective, TuiFocusVisibleModule };\n","import * as i0 from '@angular/core';\nimport { Directive, Input, HostBinding, NgModule } from '@angular/core';\n\n/**\n * Abstraction over `tabindex`\n */\nlet TuiFocusableDirective = /*#__PURE__*/(() => {\n class TuiFocusableDirective {\n constructor() {\n /**\n * Element can be focused with keyboard\n */\n this.focusable = true;\n }\n get tabIndex() {\n return this.focusable ? 0 : -1;\n }\n }\n TuiFocusableDirective.ɵfac = function TuiFocusableDirective_Factory(t) {\n return new (t || TuiFocusableDirective)();\n };\n TuiFocusableDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiFocusableDirective,\n selectors: [[\"\", \"tuiFocusable\", \"\"]],\n hostVars: 1,\n hostBindings: function TuiFocusableDirective_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵhostProperty(\"tabIndex\", ctx.tabIndex);\n }\n },\n inputs: {\n focusable: [\"tuiFocusable\", \"focusable\"]\n }\n });\n return TuiFocusableDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFocusableModule = /*#__PURE__*/(() => {\n class TuiFocusableModule {}\n TuiFocusableModule.ɵfac = function TuiFocusableModule_Factory(t) {\n return new (t || TuiFocusableModule)();\n };\n TuiFocusableModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiFocusableModule\n });\n TuiFocusableModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiFocusableModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiFocusableDirective, TuiFocusableModule };\n","import * as i0 from '@angular/core';\nimport { ElementRef, NgZone, Directive, Inject, Output, NgModule } from '@angular/core';\nimport { tuiTypedFromEvent, tuiZoneOptimized } from '@taiga-ui/cdk/observables';\nimport { tuiIsNativeFocused } from '@taiga-ui/cdk/utils/focus';\nimport { merge } from 'rxjs';\nimport { map, startWith, distinctUntilChanged, skip } from 'rxjs/operators';\n\n/**\n * Directive to monitor focus/blur status, works with focusIn/focus-out\n * instead of focus/blur to sync events order with Internet Explorer and\n * other focus related directives that require bubbling\n */\nlet TuiFocusedDirective = /*#__PURE__*/(() => {\n class TuiFocusedDirective {\n constructor({\n nativeElement\n }, zone) {\n this.tuiFocusedChange = merge(tuiTypedFromEvent(nativeElement, 'focusin'), tuiTypedFromEvent(nativeElement, 'focusout')).pipe(map(() => tuiIsNativeFocused(nativeElement)), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized(zone));\n }\n }\n TuiFocusedDirective.ɵfac = function TuiFocusedDirective_Factory(t) {\n return new (t || TuiFocusedDirective)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(NgZone));\n };\n TuiFocusedDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiFocusedDirective,\n selectors: [[\"\", \"tuiFocusedChange\", \"\"]],\n outputs: {\n tuiFocusedChange: \"tuiFocusedChange\"\n }\n });\n return TuiFocusedDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFocusedModule = /*#__PURE__*/(() => {\n class TuiFocusedModule {}\n TuiFocusedModule.ɵfac = function TuiFocusedModule_Factory(t) {\n return new (t || TuiFocusedModule)();\n };\n TuiFocusedModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiFocusedModule\n });\n TuiFocusedModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiFocusedModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiFocusedDirective, TuiFocusedModule };\n","import * as i0 from '@angular/core';\nimport { ElementRef, NgZone, Injectable, Inject, Directive, NgModule } from '@angular/core';\nimport { ALWAYS_TRUE_HANDLER, ALWAYS_FALSE_HANDLER } from '@taiga-ui/cdk/constants';\nimport { tuiTypedFromEvent, tuiZoneOptimized } from '@taiga-ui/cdk/observables';\nimport { tuiIsElement } from '@taiga-ui/cdk/utils';\nimport * as i1 from 'rxjs';\nimport { Observable, merge } from 'rxjs';\nimport { map, filter, distinctUntilChanged } from 'rxjs/operators';\nfunction movedOut({\n currentTarget,\n relatedTarget\n}) {\n return !tuiIsElement(relatedTarget) || !tuiIsElement(currentTarget) || !currentTarget.contains(relatedTarget);\n}\nlet TuiHoveredService = /*#__PURE__*/(() => {\n class TuiHoveredService extends Observable {\n constructor(el, zone) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.el = el;\n this.zone = zone;\n this.stream$ = merge(tuiTypedFromEvent(this.el.nativeElement, `mouseenter`).pipe(map(ALWAYS_TRUE_HANDLER)), tuiTypedFromEvent(this.el.nativeElement, `mouseleave`).pipe(map(ALWAYS_FALSE_HANDLER)),\n // Hello, Safari\n tuiTypedFromEvent(this.el.nativeElement, `mouseout`).pipe(filter(movedOut), map(ALWAYS_FALSE_HANDLER))).pipe(distinctUntilChanged(), tuiZoneOptimized(this.zone));\n }\n }\n TuiHoveredService.ɵfac = function TuiHoveredService_Factory(t) {\n return new (t || TuiHoveredService)(i0.ɵɵinject(ElementRef), i0.ɵɵinject(NgZone));\n };\n TuiHoveredService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiHoveredService,\n factory: TuiHoveredService.ɵfac\n });\n return TuiHoveredService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHoveredDirective = /*#__PURE__*/(() => {\n class TuiHoveredDirective {\n constructor(tuiHoveredChange) {\n this.tuiHoveredChange = tuiHoveredChange;\n }\n }\n TuiHoveredDirective.ɵfac = function TuiHoveredDirective_Factory(t) {\n return new (t || TuiHoveredDirective)(i0.ɵɵdirectiveInject(TuiHoveredService));\n };\n TuiHoveredDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHoveredDirective,\n selectors: [[\"\", \"tuiHoveredChange\", \"\"]],\n outputs: {\n tuiHoveredChange: \"tuiHoveredChange\"\n },\n features: [i0.ɵɵProvidersFeature([TuiHoveredService])]\n });\n return TuiHoveredDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHoveredModule = /*#__PURE__*/(() => {\n class TuiHoveredModule {}\n TuiHoveredModule.ɵfac = function TuiHoveredModule_Factory(t) {\n return new (t || TuiHoveredModule)();\n };\n TuiHoveredModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiHoveredModule\n });\n TuiHoveredModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiHoveredModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiHoveredDirective, TuiHoveredModule, TuiHoveredService };\n","import * as i0 from '@angular/core';\nimport { Directive, Optional, Inject, Self, Input, Output, NgModule } from '@angular/core';\nimport * as i1 from '@taiga-ui/cdk/directives/active-zone';\nimport { TuiActiveZoneDirective } from '@taiga-ui/cdk/directives/active-zone';\nimport { tuiIfMap } from '@taiga-ui/cdk/observables';\nimport * as i2 from '@taiga-ui/cdk/services';\nimport { TuiObscuredService, TuiParentsScrollService, TuiDestroyService } from '@taiga-ui/cdk/services';\nimport { Subject } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n/**\n * Directive that monitors element visibility\n */\nlet TuiObscuredDirective = /*#__PURE__*/(() => {\n class TuiObscuredDirective {\n constructor(activeZone, obscured$) {\n this.enabled$ = new Subject();\n const mapped$ = obscured$.pipe(map(obscuredBy => !!obscuredBy && (!activeZone || !obscuredBy.length || obscuredBy.every(element => !activeZone.contains(element)))));\n this.tuiObscured = this.enabled$.pipe(tuiIfMap(() => mapped$));\n }\n set tuiObscuredEnabled(enabled) {\n this.enabled$.next(enabled);\n }\n }\n TuiObscuredDirective.ɵfac = function TuiObscuredDirective_Factory(t) {\n return new (t || TuiObscuredDirective)(i0.ɵɵdirectiveInject(TuiActiveZoneDirective, 8), i0.ɵɵdirectiveInject(TuiObscuredService, 2));\n };\n TuiObscuredDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiObscuredDirective,\n selectors: [[\"\", \"tuiObscured\", \"\"]],\n inputs: {\n tuiObscuredEnabled: \"tuiObscuredEnabled\"\n },\n outputs: {\n tuiObscured: \"tuiObscured\"\n },\n features: [i0.ɵɵProvidersFeature([TuiObscuredService, TuiParentsScrollService, TuiDestroyService])]\n });\n return TuiObscuredDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiObscuredModule = /*#__PURE__*/(() => {\n class TuiObscuredModule {}\n TuiObscuredModule.ɵfac = function TuiObscuredModule_Factory(t) {\n return new (t || TuiObscuredModule)();\n };\n TuiObscuredModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiObscuredModule\n });\n TuiObscuredModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiObscuredModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiObscuredDirective, TuiObscuredModule };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Directive, Inject, Output, NgModule } from '@angular/core';\nimport { tuiPressedObservable } from '@taiga-ui/cdk/observables';\nimport { TUI_TAKE_ONLY_TRUSTED_EVENTS } from '@taiga-ui/cdk/tokens';\nlet TuiPressedDirective = /*#__PURE__*/(() => {\n class TuiPressedDirective {\n constructor(el, takeOnlyTrustedEvents) {\n this.el = el;\n this.takeOnlyTrustedEvents = takeOnlyTrustedEvents;\n this.tuiPressedChange = tuiPressedObservable(this.el.nativeElement, {\n onlyTrusted: this.takeOnlyTrustedEvents\n });\n }\n }\n TuiPressedDirective.ɵfac = function TuiPressedDirective_Factory(t) {\n return new (t || TuiPressedDirective)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_TAKE_ONLY_TRUSTED_EVENTS));\n };\n TuiPressedDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiPressedDirective,\n selectors: [[\"\", \"tuiPressedChange\", \"\"]],\n outputs: {\n tuiPressedChange: \"tuiPressedChange\"\n }\n });\n return TuiPressedDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPressedModule = /*#__PURE__*/(() => {\n class TuiPressedModule {}\n TuiPressedModule.ɵfac = function TuiPressedModule_Factory(t) {\n return new (t || TuiPressedModule)();\n };\n TuiPressedModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPressedModule\n });\n TuiPressedModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiPressedModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiPressedDirective, TuiPressedModule };\n","import * as i0 from '@angular/core';\nimport { ElementRef, NgZone, Directive, Inject, Self, Input, NgModule } from '@angular/core';\nimport { tuiZonefree, tuiPreventDefault } from '@taiga-ui/cdk/observables';\nimport { TuiDestroyService } from '@taiga-ui/cdk/services';\nimport * as i1 from 'rxjs';\nimport { fromEvent } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * @description:\n * Simple prevent default on event directive when you do not need anything\n * else on event and do not want to trigger change detection\n */\nlet TuiPreventDefaultDirective = /*#__PURE__*/(() => {\n class TuiPreventDefaultDirective {\n constructor(el, zone, destroy$) {\n this.el = el;\n this.zone = zone;\n this.destroy$ = destroy$;\n this.eventName = '';\n }\n ngOnInit() {\n fromEvent(this.el.nativeElement, this.eventName, {\n passive: false\n }).pipe(tuiZonefree(this.zone), tuiPreventDefault(), takeUntil(this.destroy$)).subscribe();\n }\n }\n TuiPreventDefaultDirective.ɵfac = function TuiPreventDefaultDirective_Factory(t) {\n return new (t || TuiPreventDefaultDirective)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(TuiDestroyService, 2));\n };\n TuiPreventDefaultDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiPreventDefaultDirective,\n selectors: [[\"\", \"tuiPreventDefault\", \"\"]],\n inputs: {\n eventName: [\"tuiPreventDefault\", \"eventName\"]\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])]\n });\n return TuiPreventDefaultDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @deprecated Use (event.prevent.silent)=(0) instead.\n */\nlet TuiPreventDefaultModule = /*#__PURE__*/(() => {\n class TuiPreventDefaultModule {}\n TuiPreventDefaultModule.ɵfac = function TuiPreventDefaultModule_Factory(t) {\n return new (t || TuiPreventDefaultModule)();\n };\n TuiPreventDefaultModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPreventDefaultModule\n });\n TuiPreventDefaultModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiPreventDefaultModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiPreventDefaultDirective, TuiPreventDefaultModule };\n","import * as i0 from '@angular/core';\nimport { ViewContainerRef, TemplateRef, Directive, Inject, Input, NgModule } from '@angular/core';\nimport { tuiClamp } from '@taiga-ui/cdk/utils/math';\nconst MAX_VALUE = 0x10000;\nclass TuiRepeatTimesContext {\n constructor($implicit) {\n this.$implicit = $implicit;\n }\n}\n/**\n * Directive similar to ngFor but using a number of repetitions rather than an array\n *\n * {@link TuiRepeatTimesDirective.tuiRepeatTimesOf requested number of times}.\n * {@link TuiRepeatTimesContext context} for every instance of the template inherits outer context and stores\n * {@link TuiRepeatTimesContext.$implicit index} of a template instance.\n */\nlet TuiRepeatTimesDirective = /*#__PURE__*/(() => {\n class TuiRepeatTimesDirective {\n constructor(viewContainer, templateRef) {\n this.viewContainer = viewContainer;\n this.templateRef = templateRef;\n }\n set tuiRepeatTimesOf(count) {\n const safeCount = Math.floor(tuiClamp(count, 0, MAX_VALUE));\n const {\n length\n } = this.viewContainer;\n if (count < length) {\n this.removeContainers(length - count);\n } else {\n this.addContainers(safeCount);\n }\n }\n addContainers(count) {\n for (let index = this.viewContainer.length; index < count; index++) {\n this.viewContainer.createEmbeddedView(this.templateRef, new TuiRepeatTimesContext(index));\n }\n }\n removeContainers(amount) {\n for (let index = 0; index < amount; index++) {\n this.viewContainer.remove();\n }\n }\n }\n TuiRepeatTimesDirective.ɵfac = function TuiRepeatTimesDirective_Factory(t) {\n return new (t || TuiRepeatTimesDirective)(i0.ɵɵdirectiveInject(ViewContainerRef), i0.ɵɵdirectiveInject(TemplateRef));\n };\n TuiRepeatTimesDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiRepeatTimesDirective,\n selectors: [[\"\", \"tuiRepeatTimes\", \"\", \"tuiRepeatTimesOf\", \"\"]],\n inputs: {\n tuiRepeatTimesOf: \"tuiRepeatTimesOf\"\n }\n });\n return TuiRepeatTimesDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiRepeatTimesModule = /*#__PURE__*/(() => {\n class TuiRepeatTimesModule {}\n TuiRepeatTimesModule.ɵfac = function TuiRepeatTimesModule_Factory(t) {\n return new (t || TuiRepeatTimesModule)();\n };\n TuiRepeatTimesModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiRepeatTimesModule\n });\n TuiRepeatTimesModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiRepeatTimesModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiRepeatTimesContext, TuiRepeatTimesDirective, TuiRepeatTimesModule };\n","import { CHAR_NO_BREAK_SPACE, CHAR_EN_DASH } from '@taiga-ui/cdk/constants';\nimport { tuiCreateToken } from '@taiga-ui/cdk/utils';\nimport { tuiAssert } from '@taiga-ui/cdk/classes';\nimport { TuiMonthNumber, TuiDayOfWeek } from '@taiga-ui/cdk/enums';\nimport { TuiInvalidYearException, TuiInvalidMonthException, TuiInvalidDayException } from '@taiga-ui/cdk/exceptions';\nimport { tuiInRange, tuiNormalizeToIntNumber } from '@taiga-ui/cdk/utils/math';\nfunction tuiDateClamp(date, min, max) {\n if (max && max < date) {\n return max;\n }\n if (min && min > date) {\n return min;\n }\n return date;\n}\nconst DAYS_IN_WEEK = 7;\nconst DAYS_IN_NORMAL_YEAR = 365;\nconst DAYS_IN_LEAP_YEAR = 366;\nconst MONTHS_IN_YEAR = 12;\nconst MIN_DAY = 1;\nconst MIN_MONTH = 0;\nconst MAX_MONTH = 11;\nconst MIN_YEAR = 0;\nconst MAX_YEAR = 9999;\nconst RANGE_SEPARATOR_CHAR = `${CHAR_NO_BREAK_SPACE}${CHAR_EN_DASH}${CHAR_NO_BREAK_SPACE}`;\nconst MILLISECONDS_IN_SECOND = 1000;\nconst SECONDS_IN_MINUTE = 60;\nconst MINUTES_IN_HOUR = 60;\nconst HOURS_IN_DAY = 24;\nconst MILLISECONDS_IN_MINUTE = MILLISECONDS_IN_SECOND * SECONDS_IN_MINUTE;\nconst MILLISECONDS_IN_HOUR = MILLISECONDS_IN_MINUTE * MINUTES_IN_HOUR;\nconst MILLISECONDS_IN_DAY = MILLISECONDS_IN_HOUR * HOURS_IN_DAY;\n\n/**\n * @internal 'dd.mm.yyyy'.length\n * Used in:\n * - {@link TuiInputDateComponent}\n * - {@link TuiInputDateRangeComponent}\n * - {@link TuiInputDateTimeComponent}\n */\nconst DATE_FILLER_LENGTH = 10;\n/**\n * @internal\n * Used in {@link TuiInputDateRangeComponent}\n */\nconst DATE_RANGE_FILLER_LENGTH = 2 * DATE_FILLER_LENGTH + RANGE_SEPARATOR_CHAR.length;\n\n/**\n * Active date format for Taiga UI\n */\nconst TUI_DATE_FORMAT = tuiCreateToken(`DMY`);\n\n/**\n * Date separator for Taiga UI components\n */\nconst TUI_DATE_SEPARATOR = tuiCreateToken(`.`);\nconst changeDateSeparator = (dateString, newDateSeparator) => dateString.replace(/[^0-9A-Za-zА-Яа-я]/gi, newDateSeparator);\n\n/**\n * Immutable year object\n * @nosideeffects\n */\nclass TuiYear {\n constructor(year) {\n this.year = year;\n ngDevMode && tuiAssert.assert(TuiYear.isValidYear(year));\n }\n /**\n * Checks year for validity\n */\n static isValidYear(year) {\n return Number.isInteger(year) && tuiInRange(year, MIN_YEAR, MAX_YEAR + 1);\n }\n /**\n * Check if passed year is a leap year\n */\n static isLeapYear(year) {\n ngDevMode && tuiAssert.assert(TuiYear.isValidYear(year));\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n }\n /**\n * Returns amount of leap years from year 0 to the passed one\n */\n static getAbsoluteLeapYears(year) {\n ngDevMode && tuiAssert.assert(TuiYear.isValidYear(year));\n return Math.ceil(year / 400) + (Math.ceil(year / 4) - Math.ceil(year / 100));\n }\n static lengthBetween(from, to) {\n return to.year - from.year;\n }\n /**\n * Normalizes year by clamping it between min and max years\n */\n static normalizeYearPart(year) {\n return tuiNormalizeToIntNumber(year, MIN_YEAR, MAX_YEAR);\n }\n get formattedYear() {\n return String(this.year).padStart(4, `0`);\n }\n get isLeapYear() {\n return TuiYear.isLeapYear(this.year);\n }\n /**\n * Returns amount of leap years from year 0 to current\n */\n get absoluteLeapYears() {\n return TuiYear.getAbsoluteLeapYears(this.year);\n }\n /**\n * Passed year is after current\n */\n yearBefore({\n year\n }) {\n return this.year < year;\n }\n /**\n * Passed year is the same or after current\n */\n yearSameOrBefore({\n year\n }) {\n return this.year <= year;\n }\n /**\n * Passed year is the same as current\n */\n yearSame({\n year\n }) {\n return this.year === year;\n }\n /**\n * Passed year is either the same of before the current\n */\n yearSameOrAfter({\n year\n }) {\n return this.year >= year;\n }\n /**\n * Passed year is before current\n */\n yearAfter({\n year\n }) {\n return this.year > year;\n }\n /**\n * Immutably offsets year\n */\n append({\n year = 0\n }) {\n ngDevMode && tuiAssert.assert(Number.isInteger(year));\n const resultYear = this.year + year;\n ngDevMode && tuiAssert.assert(TuiYear.isValidYear(resultYear));\n return new TuiYear(resultYear);\n }\n toString() {\n return this.formattedYear;\n }\n valueOf() {\n return this.year;\n }\n /**\n * Returns the primitive value of the given Date object.\n * Depending on the argument, the method can return either a string or a number.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/@@toPrimitive\n */\n [Symbol.toPrimitive](hint) {\n return Date.prototype[Symbol.toPrimitive].call(this, hint);\n }\n toJSON() {\n return this.formattedYear;\n }\n}\n\n/**\n * Immutable object consisting of year and month\n */\nclass TuiMonth extends TuiYear {\n /**\n * @param year\n * @param month (starting with 0)\n */\n constructor(year, month) {\n super(year);\n this.month = month;\n ngDevMode && tuiAssert.assert(TuiMonth.isValidMonth(year, month));\n }\n /**\n * Tests month and year for validity\n */\n static isValidMonth(year, month) {\n return TuiYear.isValidYear(year) && TuiMonth.isValidMonthPart(month);\n }\n /**\n * Returns number of days in a month\n */\n static getMonthDaysCount(month, isLeapYear) {\n ngDevMode && tuiAssert.assert(TuiMonth.isValidMonthPart(month));\n switch (month) {\n case TuiMonthNumber.February:\n return isLeapYear ? 29 : 28;\n case TuiMonthNumber.April:\n case TuiMonthNumber.June:\n case TuiMonthNumber.September:\n case TuiMonthNumber.November:\n return 30;\n default:\n return 31;\n }\n }\n /**\n * Returns current month and year based on local time zone\n * @nosideeffects\n */\n static currentLocal() {\n const nativeDate = new Date();\n return new TuiMonth(nativeDate.getFullYear(), nativeDate.getMonth());\n }\n /**\n * Returns current month and year based on UTC\n */\n static currentUtc() {\n const nativeDate = new Date();\n return new TuiMonth(nativeDate.getUTCFullYear(), nativeDate.getUTCMonth());\n }\n static lengthBetween(from, to) {\n const absoluteFrom = from.month + from.year * 12;\n const absoluteTo = to.month + to.year * 12;\n return absoluteTo - absoluteFrom;\n }\n /**\n * Normalizes number by clamping it between min and max month\n */\n static normalizeMonthPart(month) {\n return tuiNormalizeToIntNumber(month, MIN_MONTH, MAX_MONTH);\n }\n /**\n * Tests month for validity\n */\n static isValidMonthPart(month) {\n return Number.isInteger(month) && tuiInRange(month, MIN_MONTH, MAX_MONTH + 1);\n }\n get formattedMonthPart() {\n return String(this.month + 1).padStart(2, `0`);\n }\n /**\n * Returns days in a month\n */\n get daysCount() {\n return TuiMonth.getMonthDaysCount(this.month, this.isLeapYear);\n }\n /**\n * Passed month and year are after current\n */\n monthBefore(another) {\n return this.yearBefore(another) || this.yearSame(another) && this.month < another.month;\n }\n /**\n * Passed month and year are after or the same as current\n */\n monthSameOrBefore(another) {\n return this.yearBefore(another) || this.yearSame(another) && this.month <= another.month;\n }\n /**\n * Passed month and year are the same as current\n */\n monthSame(another) {\n return this.yearSame(another) && this.month === another.month;\n }\n /**\n * Passed month and year are either before or equal to current\n */\n monthSameOrAfter(another) {\n return this.yearAfter(another) || this.yearSame(another) && this.month >= another.month;\n }\n /**\n * Passed month and year are before current\n */\n monthAfter(another) {\n return this.yearAfter(another) || this.yearSame(another) && this.month > another.month;\n }\n /**\n * Immutably alters current month and year by passed offset\n *\n * @param offset\n * @return new month and year object as a result of offsetting current\n */\n append({\n year = 0,\n month = 0\n }) {\n const totalMonths = (this.year + year) * MONTHS_IN_YEAR + this.month + month;\n return new TuiMonth(Math.floor(totalMonths / MONTHS_IN_YEAR), totalMonths % MONTHS_IN_YEAR);\n }\n toString() {\n return `${this.formattedMonthPart}.${this.formattedYear}`;\n }\n valueOf() {\n return this.toLocalNativeDate().valueOf();\n }\n toJSON() {\n return `${super.toJSON()}-${this.formattedMonthPart}`;\n }\n /**\n * Returns native {@link Date} based on local time zone\n */\n toLocalNativeDate() {\n return new Date(this.year, this.month);\n }\n /**\n * Returns native {@link Date} based on UTC\n */\n toUtcNativeDate() {\n return new Date(Date.UTC(this.year, this.month));\n }\n}\n\n// TODO: Localized formatting\n/**\n * Immutable date object, consisting of day, month and year\n */\nclass TuiDay extends TuiMonth {\n constructor(year, month, day) {\n super(year, month);\n this.day = day;\n ngDevMode && tuiAssert.assert(TuiDay.isValidDay(year, month, day));\n }\n /**\n * Creates {@link TuiDay} from native {@link Date} based on local time zone\n */\n static fromLocalNativeDate(date) {\n return new TuiDay(date.getFullYear(), date.getMonth(), date.getDate());\n }\n /**\n * Creates {@link TuiDay} from native {@link Date} using UTC\n */\n static fromUtcNativeDate(date) {\n return new TuiDay(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n }\n /**\n * Check validity of year, month and day\n *\n * @param year\n * @param month\n * @param day\n * @return boolean validity\n */\n static isValidDay(year, month, day) {\n return TuiMonth.isValidMonth(year, month) && Number.isInteger(day) && tuiInRange(day, MIN_DAY, TuiMonth.getMonthDaysCount(month, TuiYear.isLeapYear(year)) + 1);\n }\n /**\n * Current day based on local time zone\n */\n static currentLocal() {\n const nativeDate = new Date();\n const year = nativeDate.getFullYear();\n const month = nativeDate.getMonth();\n const day = nativeDate.getDate();\n return new TuiDay(year, month, day);\n }\n /**\n * Returns current day based on UTC\n */\n static currentUtc() {\n const nativeDate = new Date();\n const year = nativeDate.getUTCFullYear();\n const month = nativeDate.getUTCMonth();\n const day = nativeDate.getUTCDate();\n return new TuiDay(year, month, day);\n }\n /**\n * Calculates {@link TuiDay} normalizing year, month and day. {@link NaN} is turned into minimal value.\n *\n * @param year any year value, including invalid\n * @param month any month value, including invalid (months start with 0)\n * @param day any day value, including invalid\n * @return normalized date\n */\n static normalizeOf(year, month, day) {\n const normalizedYear = TuiYear.normalizeYearPart(year);\n const normalizedMonth = TuiMonth.normalizeMonthPart(month);\n const normalizedDay = TuiDay.normalizeDayPart(day, normalizedMonth, normalizedYear);\n return new TuiDay(normalizedYear, normalizedMonth, normalizedDay);\n }\n static lengthBetween(from, to) {\n return Math.round((to.toLocalNativeDate().getTime() - from.toLocalNativeDate().getTime()) / (1000 * 60 * 60 * 24));\n }\n static parseRawDateString(date, dateMode = `DMY`) {\n ngDevMode && tuiAssert.assert(date.length === DATE_FILLER_LENGTH, `[parseRawDateString]: wrong date string length`);\n switch (dateMode) {\n case `YMD`:\n return {\n day: parseInt(date.slice(8, 10), 10),\n month: parseInt(date.slice(5, 7), 10) - 1,\n year: parseInt(date.slice(0, 4), 10)\n };\n case `MDY`:\n return {\n day: parseInt(date.slice(3, 5), 10),\n month: parseInt(date.slice(0, 2), 10) - 1,\n year: parseInt(date.slice(6, 10), 10)\n };\n case `DMY`:\n default:\n return {\n day: parseInt(date.slice(0, 2), 10),\n month: parseInt(date.slice(3, 5), 10) - 1,\n year: parseInt(date.slice(6, 10), 10)\n };\n }\n }\n // TODO: Move month and year related code corresponding classes\n /**\n * Parsing a string with date with normalization\n *\n * @param rawDate date string\n * @param dateMode date format of the date string (DMY | MDY | YMD)\n * @return normalized date\n */\n static normalizeParse(rawDate, dateMode = `DMY`) {\n const {\n day,\n month,\n year\n } = this.parseRawDateString(rawDate, dateMode);\n return TuiDay.normalizeOf(year, month, day);\n }\n /**\n * Parsing a date stringified in a toJSON format\n * @param yearMonthDayString date string in format of YYYY-MM-DD\n * @return date\n * @throws exceptions if any part of the date is invalid\n */\n static jsonParse(yearMonthDayString) {\n const {\n day,\n month,\n year\n } = this.parseRawDateString(yearMonthDayString, `YMD`);\n if (!TuiYear.isValidYear(year)) {\n throw new TuiInvalidYearException(year);\n }\n if (!TuiMonth.isValidMonth(year, month)) {\n throw new TuiInvalidMonthException(month);\n }\n if (!Number.isInteger(day) || !tuiInRange(day, MIN_DAY, TuiMonth.getMonthDaysCount(month, TuiYear.isLeapYear(year)) + 1)) {\n throw new TuiInvalidDayException(day);\n }\n return new TuiDay(year, month, day);\n }\n static normalizeDayPart(day, month, year) {\n ngDevMode && tuiAssert.assert(TuiMonth.isValidMonth(year, month));\n const monthDaysCount = TuiMonth.getMonthDaysCount(month, TuiYear.isLeapYear(year));\n return tuiNormalizeToIntNumber(day, 1, monthDaysCount);\n }\n get formattedDayPart() {\n return String(this.day).padStart(2, `0`);\n }\n get isWeekend() {\n const dayOfWeek = this.dayOfWeek(false);\n return dayOfWeek === TuiDayOfWeek.Saturday || dayOfWeek === TuiDayOfWeek.Sunday;\n }\n /**\n * Returns day of week\n *\n * @param startFromMonday whether week starts from Monday and not from Sunday\n * @return day of week (from 0 to 6)\n */\n dayOfWeek(startFromMonday = true) {\n const dayOfWeek = startFromMonday ? this.toLocalNativeDate().getDay() - 1 : this.toLocalNativeDate().getDay();\n return dayOfWeek < 0 ? 6 : dayOfWeek;\n }\n /**\n * Passed date is after current\n */\n dayBefore(another) {\n return this.monthBefore(another) || this.monthSame(another) && this.day < another.day;\n }\n /**\n * Passed date is after or equals to current\n */\n daySameOrBefore(another) {\n return this.monthBefore(another) || this.monthSame(another) && this.day <= another.day;\n }\n /**\n * Passed date is the same as current\n */\n daySame(another) {\n return this.monthSame(another) && this.day === another.day;\n }\n /**\n * Passed date is either before or the same as current\n */\n daySameOrAfter(another) {\n return this.monthAfter(another) || this.monthSame(another) && this.day >= another.day;\n }\n /**\n * Passed date is before current\n */\n dayAfter(another) {\n return this.monthAfter(another) || this.monthSame(another) && this.day > another.day;\n }\n /**\n * Clamping date between two limits\n *\n * @param min\n * @param max\n * @return clamped date\n */\n dayLimit(min, max) {\n if (min !== null && this.dayBefore(min)) {\n return min;\n }\n if (max !== null && this.dayAfter(max)) {\n return max;\n }\n return this;\n }\n /**\n * Immutably alters current day by passed offset\n *\n * If resulting month has more days than original one, date is rounded to the maximum day\n * in the resulting month. Offset of days will be calculated based on the resulted year and month\n * to not interfere with parent classes methods\n *\n * @param offset\n * @return new date object as a result of offsetting current\n */\n append({\n year = 0,\n month = 0,\n day = 0\n }) {\n const totalMonths = (this.year + year) * MONTHS_IN_YEAR + this.month + month;\n let years = Math.floor(totalMonths / MONTHS_IN_YEAR);\n let months = totalMonths % MONTHS_IN_YEAR;\n let days = Math.min(this.day, TuiMonth.getMonthDaysCount(months, TuiYear.isLeapYear(years))) + day;\n while (days > TuiMonth.getMonthDaysCount(months, TuiYear.isLeapYear(years))) {\n days -= TuiMonth.getMonthDaysCount(months, TuiYear.isLeapYear(years));\n if (months === TuiMonthNumber.December) {\n years++;\n months = TuiMonthNumber.January;\n } else {\n months++;\n }\n }\n while (days < MIN_DAY) {\n if (months === TuiMonthNumber.January) {\n years--;\n months = TuiMonthNumber.December;\n } else {\n months--;\n }\n days += TuiMonth.getMonthDaysCount(months, TuiYear.isLeapYear(years));\n }\n return new TuiDay(years, months, days);\n }\n /**\n * Returns formatted whole date\n */\n getFormattedDay(dateFormat, separator) {\n ngDevMode && tuiAssert.assert(separator.length === 1, `Separator should consist of only 1 symbol`);\n const dd = this.formattedDayPart;\n const mm = this.formattedMonthPart;\n const yyyy = this.formattedYear;\n switch (dateFormat) {\n case `YMD`:\n return `${yyyy}${separator}${mm}${separator}${dd}`;\n case `MDY`:\n return `${mm}${separator}${dd}${separator}${yyyy}`;\n case `DMY`:\n default:\n return `${dd}${separator}${mm}${separator}${yyyy}`;\n }\n }\n toString(dateFormat = `DMY`, separator = `.`) {\n return this.getFormattedDay(dateFormat, separator);\n }\n toJSON() {\n return `${super.toJSON()}-${this.formattedDayPart}`;\n }\n /**\n * Returns native {@link Date} based on local time zone\n */\n toLocalNativeDate() {\n return new Date(this.year, this.month, this.day);\n }\n /**\n * Returns native {@link Date} based on UTC\n */\n toUtcNativeDate() {\n return new Date(Date.UTC(this.year, this.month, this.day));\n }\n}\n\n/**\n * An immutable range of two {@link TuiMonth} objects\n */\nclass TuiMonthRange {\n constructor(from, to) {\n this.from = from;\n this.to = to;\n ngDevMode && tuiAssert.assert(from.monthSameOrBefore(to));\n }\n static sort(month1, month2) {\n return month1.monthSameOrBefore(month2) ? new TuiMonthRange(month1, month2) : new TuiMonthRange(month2, month1);\n }\n get isSingleMonth() {\n return this.from.monthSame(this.to);\n }\n monthSame(another) {\n return this.from.monthSame(another.from) && this.to.monthSame(another.to);\n }\n toString() {\n return `${this.from}${RANGE_SEPARATOR_CHAR}${this.to}`;\n }\n}\n\n/**\n * An immutable range of two {@link TuiDay} objects\n */\nclass TuiDayRange extends TuiMonthRange {\n constructor(from, to) {\n super(from, to);\n this.from = from;\n this.to = to;\n ngDevMode && tuiAssert.assert(from.daySameOrBefore(to));\n }\n /**\n * Creates range from two days after sorting them\n *\n * @param day1\n * @param day2\n * @return new range with sorted days\n */\n static sort(day1, day2) {\n return day1.daySameOrBefore(day2) ? new TuiDayRange(day1, day2) : new TuiDayRange(day2, day1);\n }\n /**\n * Parse and correct a day range in string format\n *\n * @param rangeString a string of dates in a format dd.mm.yyyy - dd.mm.yyyy\n * @param dateMode {@link TuiDateMode}\n * @return normalized day range object\n */\n static normalizeParse(rangeString, dateMode = `DMY`) {\n const leftDay = TuiDay.normalizeParse(rangeString.slice(0, DATE_FILLER_LENGTH), dateMode);\n if (rangeString.length < DATE_RANGE_FILLER_LENGTH) {\n return new TuiDayRange(leftDay, leftDay);\n }\n return TuiDayRange.sort(leftDay, TuiDay.normalizeParse(rangeString.slice(DATE_FILLER_LENGTH + RANGE_SEPARATOR_CHAR.length), dateMode));\n }\n get isSingleDay() {\n return this.from.daySame(this.to);\n }\n /**\n * Tests ranges for identity\n *\n * @param another second range to test against current\n * @return `true` if days are identical\n */\n daySame(another) {\n return this.from.daySame(another.from) && this.to.daySame(another.to);\n }\n /**\n * Locks range between two days included, or limits from one side if the other is null\n *\n * @param min\n * @param max\n * @return range — clamped range\n */\n dayLimit(min, max) {\n return new TuiDayRange(this.from.dayLimit(min, max), this.to.dayLimit(min, max));\n }\n /**\n * Human readable format.\n */\n getFormattedDayRange(dateFormat, dateSeparator) {\n const from = this.from.getFormattedDay(dateFormat, dateSeparator);\n const to = this.to.getFormattedDay(dateFormat, dateSeparator);\n return `${from}${RANGE_SEPARATOR_CHAR}${to}`;\n }\n toString(dateFormat = `DMY`, dateSeparator = `.`) {\n return this.getFormattedDayRange(dateFormat, dateSeparator);\n }\n}\nconst TUI_FIRST_DAY = new TuiDay(MIN_YEAR, MIN_MONTH, MIN_DAY);\nconst TUI_LAST_DAY = new TuiDay(MAX_YEAR, MAX_MONTH, 31);\n\n/**\n * Immutable time object with hours, minutes, seconds and ms\n */\nclass TuiTime {\n constructor(hours, minutes, seconds = 0, ms = 0) {\n this.hours = hours;\n this.minutes = minutes;\n this.seconds = seconds;\n this.ms = ms;\n ngDevMode && tuiAssert.assert(TuiTime.isValidTime(hours, minutes, seconds, ms), `Time must be real, but got:`, hours, minutes, seconds, ms);\n }\n /**\n * Checks if time is valid\n */\n static isValidTime(hours, minutes, seconds = 0, ms = 0) {\n return Number.isInteger(hours) && tuiInRange(hours, 0, HOURS_IN_DAY) && Number.isInteger(minutes) && tuiInRange(minutes, 0, MINUTES_IN_HOUR) && Number.isInteger(seconds) && tuiInRange(seconds, 0, SECONDS_IN_MINUTE) && Number.isInteger(ms) && tuiInRange(ms, 0, 1000);\n }\n /**\n * Current UTC time.\n */\n static current() {\n return TuiTime.fromAbsoluteMilliseconds(Date.now() % MILLISECONDS_IN_DAY);\n }\n /**\n * Current time in local timezone\n */\n static currentLocal() {\n const date = new Date();\n return TuiTime.fromAbsoluteMilliseconds((Date.now() - date.getTimezoneOffset() * MILLISECONDS_IN_MINUTE) % MILLISECONDS_IN_DAY);\n }\n /**\n * Calculates TuiTime from milliseconds\n */\n static fromAbsoluteMilliseconds(milliseconds) {\n ngDevMode && tuiAssert.assert(Number.isInteger(milliseconds));\n ngDevMode && tuiAssert.assert(tuiInRange(milliseconds, 0, MILLISECONDS_IN_DAY), `Milliseconds must be below ${MILLISECONDS_IN_DAY} (milliseconds in a day).`);\n const hours = Math.floor(milliseconds / MILLISECONDS_IN_HOUR);\n const minutes = Math.floor(milliseconds % MILLISECONDS_IN_HOUR / MILLISECONDS_IN_MINUTE);\n const seconds = Math.floor(milliseconds % MILLISECONDS_IN_HOUR % MILLISECONDS_IN_MINUTE / 1000) || 0;\n const ms = Math.floor(milliseconds % MILLISECONDS_IN_HOUR % MILLISECONDS_IN_MINUTE % 1000) || 0;\n return new TuiTime(hours, minutes, seconds, ms);\n }\n /**\n * Parses string into TuiTime object\n */\n static fromString(time) {\n const hours = Number(time.slice(0, 2));\n const minutes = Number(time.slice(3, 5));\n const seconds = Number(time.slice(6, 8)) || 0;\n const ms = Number(time.slice(9, 12)) || 0;\n return new TuiTime(hours, minutes, seconds, ms);\n }\n /**\n * Converts Date object into TuiTime\n * @param date\n */\n static fromLocalNativeDate(date) {\n return new TuiTime(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n }\n /**\n * Shifts time by hours and minutes\n */\n shift({\n hours = 0,\n minutes = 0,\n seconds = 0,\n ms = 0\n }) {\n const newMs = (1000 + this.ms + ms % 1000) % 1000;\n const secondsInMs = ms < 0 ? Math.ceil(ms / 1000) : Math.floor(ms / 1000);\n const secondsToAdd = secondsInMs + seconds;\n const newSeconds = (60 + this.seconds + secondsToAdd % 60) % 60;\n const minutesInSeconds = secondsToAdd < 0 ? Math.ceil(secondsToAdd / 60) : Math.floor(secondsToAdd / 60);\n const minutesToAdd = minutesInSeconds + minutes;\n const newMinutes = (60 + this.minutes + minutesToAdd % 60) % 60;\n const hoursInMinutes = minutesToAdd < 0 ? Math.ceil(minutesToAdd / 60) : Math.floor(minutesToAdd / 60);\n const hoursToAdd = hoursInMinutes + hours;\n const newHours = (24 + this.hours + hoursToAdd % 24) % 24;\n return new TuiTime(newHours, newMinutes, newSeconds, newMs);\n }\n /**\n * Converts TuiTime to string\n */\n toString(mode) {\n const needAddMs = mode === `HH:MM:SS.MSS` || !mode && this.ms > 0;\n const needAddSeconds = needAddMs || mode === `HH:MM:SS` || !mode && this.seconds > 0;\n return `${this.formatTime(this.hours)}:${this.formatTime(this.minutes)}` + `${needAddSeconds ? `:${this.formatTime(this.seconds)}` : ``}` + `${needAddMs ? `.${this.formatTime(this.ms, 3)}` : ``}`;\n }\n valueOf() {\n return this.toAbsoluteMilliseconds();\n }\n /**\n * Returns the primitive value of the given Date object.\n * Depending on the argument, the method can return either a string or a number.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/@@toPrimitive\n */\n [Symbol.toPrimitive](hint) {\n return Date.prototype[Symbol.toPrimitive].call(this, hint);\n }\n /**\n * Converts TuiTime to milliseconds\n */\n toAbsoluteMilliseconds() {\n return this.hours * MILLISECONDS_IN_HOUR + this.minutes * MILLISECONDS_IN_MINUTE + this.seconds * 1000 + this.ms;\n }\n formatTime(time, digits = 2) {\n return String(time).padStart(digits, `0`);\n }\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DATE_FILLER_LENGTH, DATE_RANGE_FILLER_LENGTH, DAYS_IN_LEAP_YEAR, DAYS_IN_NORMAL_YEAR, DAYS_IN_WEEK, HOURS_IN_DAY, MAX_MONTH, MAX_YEAR, MILLISECONDS_IN_DAY, MILLISECONDS_IN_HOUR, MILLISECONDS_IN_MINUTE, MILLISECONDS_IN_SECOND, MINUTES_IN_HOUR, MIN_DAY, MIN_MONTH, MIN_YEAR, MONTHS_IN_YEAR, RANGE_SEPARATOR_CHAR, SECONDS_IN_MINUTE, TUI_DATE_FORMAT, TUI_DATE_SEPARATOR, TUI_FIRST_DAY, TUI_LAST_DAY, TuiDay, TuiDayRange, TuiMonth, TuiMonthRange, TuiTime, TuiYear, changeDateSeparator, tuiDateClamp };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Directive, Inject, Component, ChangeDetectionStrategy, Input, HostBinding, HostListener, NgModule } from '@angular/core';\nimport * as i1 from '@taiga-ui/cdk';\nimport { TUI_SCROLL_REF, tuiIsFirefox, tuiGetElementOffset, TUI_IS_IOS, TuiScrollControlsModule } from '@taiga-ui/cdk';\nimport { TUI_SCROLLABLE, TUI_SCROLL_INTO_VIEW } from '@taiga-ui/core/constants';\nimport { CSS, USER_AGENT } from '@ng-web-apis/common';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\n\n/** @deprecated import from `@taiga-ui/cdk` instead */\nfunction TuiScrollbarComponent_tui_scroll_controls_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-scroll-controls\", 2);\n }\n}\nconst _c0 = [\"*\"];\nconst SCROLL_REF_SELECTOR = '[tuiScrollRef]';\n/** @deprecated import from `@taiga-ui/cdk` instead */\nlet TuiScrollRefDirective = /*#__PURE__*/(() => {\n class TuiScrollRefDirective {}\n TuiScrollRefDirective.ɵfac = function TuiScrollRefDirective_Factory(t) {\n return new (t || TuiScrollRefDirective)();\n };\n TuiScrollRefDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiScrollRefDirective,\n selectors: [[\"\", \"tuiScrollRef\", \"\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_SCROLL_REF,\n useExisting: ElementRef\n }])]\n });\n return TuiScrollRefDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiScrollableDirective = /*#__PURE__*/(() => {\n class TuiScrollableDirective {\n constructor(el) {\n this.el = el;\n }\n ngOnInit() {\n this.el.nativeElement.dispatchEvent(new CustomEvent(TUI_SCROLLABLE, {\n bubbles: true,\n detail: this.el.nativeElement\n }));\n }\n }\n TuiScrollableDirective.ɵfac = function TuiScrollableDirective_Factory(t) {\n return new (t || TuiScrollableDirective)(i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiScrollableDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiScrollableDirective,\n selectors: [[\"\", \"tuiScrollable\", \"\"]]\n });\n return TuiScrollableDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// TODO: Remove all legacy code in 4.0\nlet TuiScrollbarComponent = /*#__PURE__*/(() => {\n class TuiScrollbarComponent {\n constructor(cssRef, el, userAgent, isIos) {\n this.cssRef = cssRef;\n this.el = el;\n this.userAgent = userAgent;\n this.isIos = isIos;\n this.delegated = false;\n this.isLegacy = !this.cssRef.supports('position', 'sticky') || tuiIsFirefox(this.userAgent) && !this.cssRef.supports('scrollbar-width', 'none');\n this.hidden = false;\n this.browserScrollRef = new ElementRef(this.el.nativeElement);\n }\n get showScrollbars() {\n return !this.hidden && !this.isIos && (!this.isLegacy || this.delegated);\n }\n get showNative() {\n return this.isLegacy && !this.hidden && !this.delegated;\n }\n onScrollable(element) {\n this.delegated = true;\n this.browserScrollRef.nativeElement = element;\n }\n scrollIntoView(detail) {\n var _a;\n if (this.delegated) {\n return;\n }\n const {\n nativeElement\n } = this.browserScrollRef;\n const {\n offsetTop,\n offsetLeft\n } = tuiGetElementOffset(nativeElement, detail);\n const {\n clientHeight,\n clientWidth\n } = nativeElement;\n const {\n offsetHeight,\n offsetWidth\n } = detail;\n const scrollTop = offsetTop + offsetHeight / 2 - clientHeight / 2;\n const scrollLeft = offsetLeft + offsetWidth / 2 - clientWidth / 2;\n // ?. for our clients on Windows XP and Chrome 49\n (_a = nativeElement.scrollTo) === null || _a === void 0 ? void 0 : _a.call(nativeElement, scrollLeft, scrollTop);\n }\n }\n TuiScrollbarComponent.ɵfac = function TuiScrollbarComponent_Factory(t) {\n return new (t || TuiScrollbarComponent)(i0.ɵɵdirectiveInject(CSS), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(USER_AGENT), i0.ɵɵdirectiveInject(TUI_IS_IOS));\n };\n TuiScrollbarComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiScrollbarComponent,\n selectors: [[\"tui-scrollbar\"]],\n hostVars: 2,\n hostBindings: function TuiScrollbarComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"tui-scrollable.stop\", function TuiScrollbarComponent_tui_scrollable_stop_HostBindingHandler($event) {\n return ctx.onScrollable($event.detail);\n })(\"tui-scroll-into-view.stop\", function TuiScrollbarComponent_tui_scroll_into_view_stop_HostBindingHandler($event) {\n return ctx.scrollIntoView($event.detail);\n });\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"_legacy\", ctx.showNative);\n }\n },\n inputs: {\n hidden: \"hidden\"\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_SCROLL_REF,\n deps: [TuiScrollbarComponent],\n useFactory: ({\n browserScrollRef\n }) => browserScrollRef\n }])],\n ngContentSelectors: _c0,\n decls: 3,\n vars: 1,\n consts: [[\"class\", \"t-bars\", 4, \"ngIf\"], [1, \"t-content\"], [1, \"t-bars\"]],\n template: function TuiScrollbarComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, TuiScrollbarComponent_tui_scroll_controls_0_Template, 1, 0, \"tui-scroll-controls\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵprojection(2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.showScrollbars);\n }\n },\n dependencies: [i1.TuiScrollControlsComponent, i2.NgIf],\n styles: [\"[_nghost-%COMP%]{position:relative;display:flex;isolation:isolate;overflow:auto}[_nghost-%COMP%]:not(._legacy){scrollbar-width:none;-ms-overflow-style:none}[_nghost-%COMP%]:not(._legacy)::-webkit-scrollbar, [_nghost-%COMP%]:not(._legacy)::-webkit-scrollbar-thumb{background:transparent;width:0;height:0}._legacy[_nghost-%COMP%]{overflow:overlay}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){._legacy[_nghost-%COMP%]::-webkit-scrollbar, ._legacy[_nghost-%COMP%]::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}._legacy[_nghost-%COMP%]::-webkit-scrollbar{background-color:transparent}._legacy[_nghost-%COMP%]::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}._legacy[_nghost-%COMP%]::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}._legacy[_nghost-%COMP%]::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}.t-content[_ngcontent-%COMP%]{isolation:isolate;flex:1;flex-basis:auto;width:100%;height:-webkit-max-content;height:max-content}.t-bars[_ngcontent-%COMP%]{color:var(--tui-text-01)}\"],\n changeDetection: 0\n });\n return TuiScrollbarComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiScrollbarModule = /*#__PURE__*/(() => {\n class TuiScrollbarModule {}\n TuiScrollbarModule.ɵfac = function TuiScrollbarModule_Factory(t) {\n return new (t || TuiScrollbarModule)();\n };\n TuiScrollbarModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiScrollbarModule\n });\n TuiScrollbarModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiScrollControlsModule]]\n });\n return TuiScrollbarModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { SCROLL_REF_SELECTOR, TuiScrollRefDirective, TuiScrollableDirective, TuiScrollbarComponent, TuiScrollbarModule };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Directive, Input, Output, ElementRef, INJECTOR, Self, Inject, Optional, SkipSelf, forwardRef, Component, ChangeDetectionStrategy, HostListener, ViewContainerRef, NgModule } from '@angular/core';\nimport { WINDOW } from '@ng-web-apis/common';\nimport * as i2 from '@taiga-ui/cdk';\nimport { tuiCreateTokenFromFactory, TuiDestroyService, TuiDropdownPortalService, tuiPure, tuiCreateToken, tuiProvideOptions, TuiHoveredService, tuiPx, tuiGetClosestFocusable, EMPTY_CLIENT_RECT, tuiPointToClientRect, TuiActiveZoneDirective, ALWAYS_TRUE_HANDLER, tuiIsTextNode, tuiIsString, tuiIsElement, tuiGetNativeFocused, tuiIsTextfield, CHAR_ZERO_WIDTH_SPACE, CHAR_NO_BREAK_SPACE, TUI_RANGE, TuiActiveZoneModule, TuiOverscrollModule, TuiHoveredModule } from '@taiga-ui/cdk';\nimport * as i1$2 from '@taiga-ui/core/abstract';\nimport { tuiAsRectAccessor, tuiAsVehicle, TuiDriver, tuiAsDriver, TuiRectAccessor, tuiPositionAccessorFor, tuiRectAccessorFor, AbstractTuiDriverDirective, TuiVehicle, TuiPositionAccessor, tuiFallbackRectAccessor, tuiAsPositionAccessor } from '@taiga-ui/core/abstract';\nimport { tuiDropdownAnimation } from '@taiga-ui/core/animations';\nimport { MODE_PROVIDER } from '@taiga-ui/core/providers';\nimport * as i4 from '@taiga-ui/core/services';\nimport { TuiVisualViewportService, TuiPositionService } from '@taiga-ui/core/services';\nimport { TUI_ANIMATION_OPTIONS, TUI_MODE, TUI_VIEWPORT, TUI_SELECTION_STREAM } from '@taiga-ui/core/tokens';\nimport { throttleTime, takeUntil, switchMap, delay, tap, share, map, distinctUntilChanged } from 'rxjs/operators';\nimport { __decorate } from 'tslib';\nimport { tuiCheckFixedPosition, tuiOverrideOptions, tuiGetWordRange } from '@taiga-ui/core/utils';\nimport * as i3 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport * as i1 from 'rxjs';\nimport { Subject, merge, of, BehaviorSubject, combineLatest } from 'rxjs';\nimport * as i1$1 from '@taiga-ui/core/components/scrollbar';\nimport { TuiScrollbarModule } from '@taiga-ui/core/components/scrollbar';\nimport { shouldCall } from '@tinkoff/ng-event-plugins';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * A component to display a dropdown\n */\nfunction TuiDropdownComponent_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 4);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const text_r2 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", text_r2, \" \");\n }\n}\nconst _c0 = a0 => ({\n $implicit: a0\n});\nconst TUI_DROPDOWN_COMPONENT = tuiCreateTokenFromFactory(() => TuiDropdownComponent);\nlet TuiDropdownOpenDirective = /*#__PURE__*/(() => {\n class TuiDropdownOpenDirective {\n constructor() {\n this.tuiDropdownOpen = false;\n this.tuiDropdownOpenChange = new EventEmitter();\n }\n update(open) {\n this.tuiDropdownOpen = open;\n this.tuiDropdownOpenChange.emit(open);\n }\n ngOnChanges() {\n var _a;\n (_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.toggle(this.tuiDropdownOpen);\n }\n }\n TuiDropdownOpenDirective.ɵfac = function TuiDropdownOpenDirective_Factory(t) {\n return new (t || TuiDropdownOpenDirective)();\n };\n TuiDropdownOpenDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownOpenDirective,\n selectors: [[\"\", \"tuiDropdownOpen\", \"\"], [\"\", \"tuiDropdownOpenChange\", \"\"]],\n inputs: {\n tuiDropdownOpen: \"tuiDropdownOpen\"\n },\n outputs: {\n tuiDropdownOpenChange: \"tuiDropdownOpenChange\"\n },\n features: [i0.ɵɵNgOnChangesFeature]\n });\n return TuiDropdownOpenDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDropdownDirective = /*#__PURE__*/(() => {\n class TuiDropdownDirective {\n constructor(destroy$, el, dropdown, injector, dropdownService, open) {\n this.el = el;\n this.dropdown = dropdown;\n this.injector = injector;\n this.dropdownService = dropdownService;\n this.open = open;\n this.refresh$ = new Subject();\n this.dropdownBoxRef = null;\n this.type = 'dropdown';\n this.component = new PolymorpheusComponent(this.dropdown, this.injector);\n if (this.open && !this.open.dropdown) {\n this.open.dropdown = this;\n } else {\n this.open = null;\n }\n // Ignore multiple change detection triggers at the same frame\n this.refresh$.pipe(throttleTime(0), takeUntil(destroy$)).subscribe(() => {\n var _a, _b;\n (_a = this.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.changeDetectorRef.detectChanges();\n (_b = this.dropdownBoxRef) === null || _b === void 0 ? void 0 : _b.changeDetectorRef.markForCheck();\n });\n }\n get position() {\n return tuiCheckFixedPosition(this.el.nativeElement) ? 'fixed' : 'absolute';\n }\n ngAfterViewChecked() {\n this.refresh$.next();\n }\n ngAfterViewInit() {\n if (this.open) {\n this.toggle(this.open.tuiDropdownOpen);\n }\n }\n ngOnChanges() {\n if (!this.content) {\n this.toggle(false);\n }\n }\n ngOnDestroy() {\n this.toggle(false);\n if (this.open) {\n this.open.dropdown = undefined;\n }\n }\n getClientRect() {\n return this.el.nativeElement.getBoundingClientRect();\n }\n toggle(show) {\n var _a, _b;\n if (show && this.content && !this.dropdownBoxRef) {\n this.dropdownBoxRef = this.dropdownService.add(this.component);\n (_a = this.open) === null || _a === void 0 ? void 0 : _a.update(true);\n } else if (!show && this.dropdownBoxRef) {\n this.dropdownService.remove(this.dropdownBoxRef);\n this.dropdownBoxRef = null;\n (_b = this.open) === null || _b === void 0 ? void 0 : _b.update(false);\n }\n }\n }\n TuiDropdownDirective.ɵfac = function TuiDropdownDirective_Factory(t) {\n return new (t || TuiDropdownDirective)(i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_DROPDOWN_COMPONENT), i0.ɵɵdirectiveInject(INJECTOR), i0.ɵɵdirectiveInject(TuiDropdownPortalService), i0.ɵɵdirectiveInject(TuiDropdownOpenDirective, 8));\n };\n TuiDropdownDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownDirective,\n selectors: [[\"\", \"tuiDropdown\", \"\", 5, \"ng-container\"]],\n inputs: {\n content: [\"tuiDropdown\", \"content\"]\n },\n exportAs: [\"tuiDropdown\"],\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, tuiAsRectAccessor(TuiDropdownDirective), tuiAsVehicle(TuiDropdownDirective)]), i0.ɵɵNgOnChangesFeature]\n });\n __decorate([tuiPure], TuiDropdownDirective.prototype, \"position\", null);\n return TuiDropdownDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Default values for hint options */\nconst TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = {\n showDelay: 200,\n hideDelay: 500\n};\n/**\n * Default parameters for dropdown hover directive\n */\nconst TUI_DROPDOWN_HOVER_OPTIONS = tuiCreateToken(TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS);\nfunction tuiDropdownHoverOptionsProvider(options) {\n return tuiProvideOptions(TUI_DROPDOWN_HOVER_OPTIONS, options, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS);\n}\nlet TuiDropdownHoverDirective = /*#__PURE__*/(() => {\n class TuiDropdownHoverDirective extends TuiDriver {\n constructor(hovered$, options, parentHover) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.hovered$ = hovered$;\n this.options = options;\n this.parentHover = parentHover;\n this.toggle$ = new Subject();\n this.stream$ = merge(this.toggle$, this.hovered$).pipe(switchMap(visible => of(visible).pipe(delay(visible ? this.showDelay : this.hideDelay))), tap(visible => {\n this.hovered = visible;\n }), share());\n this.showDelay = this.options.showDelay;\n this.hideDelay = this.options.hideDelay;\n this.hovered = false;\n this.type = 'dropdown';\n }\n toggle(visible) {\n var _a;\n (_a = this.parentHover) === null || _a === void 0 ? void 0 : _a.toggle(visible);\n this.toggle$.next(visible);\n }\n }\n TuiDropdownHoverDirective.ɵfac = function TuiDropdownHoverDirective_Factory(t) {\n return new (t || TuiDropdownHoverDirective)(i0.ɵɵdirectiveInject(TuiHoveredService), i0.ɵɵdirectiveInject(TUI_DROPDOWN_HOVER_OPTIONS), i0.ɵɵdirectiveInject(TuiDropdownHoverDirective, 12));\n };\n TuiDropdownHoverDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownHoverDirective,\n selectors: [[\"\", \"tuiDropdownHover\", \"\", 5, \"ng-container\"]],\n inputs: {\n showDelay: [\"tuiDropdownShowDelay\", \"showDelay\"],\n hideDelay: [\"tuiDropdownHideDelay\", \"hideDelay\"]\n },\n features: [i0.ɵɵProvidersFeature([tuiAsDriver(TuiDropdownHoverDirective), TuiHoveredService]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiDropdownHoverDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Default values for dropdown options */\nconst TUI_DROPDOWN_DEFAULT_OPTIONS = {\n align: 'left',\n direction: null,\n limitWidth: 'auto',\n maxHeight: 400,\n minHeight: 80,\n offset: 4,\n appearance: ''\n};\n/**\n * Default parameters for dropdown directive\n */\nconst TUI_DROPDOWN_OPTIONS = tuiCreateToken(TUI_DROPDOWN_DEFAULT_OPTIONS);\nconst tuiDropdownOptionsProvider = override => ({\n provide: TUI_DROPDOWN_OPTIONS,\n deps: [[new Optional(), TuiDropdownOptionsDirective], [new Optional(), new SkipSelf(), TUI_DROPDOWN_OPTIONS]],\n useFactory: tuiOverrideOptions(override, TUI_DROPDOWN_DEFAULT_OPTIONS)\n});\nlet TuiDropdownOptionsDirective = /*#__PURE__*/(() => {\n class TuiDropdownOptionsDirective {\n constructor(options) {\n this.options = options;\n this.align = this.options.align;\n this.appearance = this.options.appearance;\n this.direction = this.options.direction;\n this.limitWidth = this.options.limitWidth;\n this.minHeight = this.options.minHeight;\n this.maxHeight = this.options.maxHeight;\n this.offset = this.options.offset;\n }\n }\n TuiDropdownOptionsDirective.ɵfac = function TuiDropdownOptionsDirective_Factory(t) {\n return new (t || TuiDropdownOptionsDirective)(i0.ɵɵdirectiveInject(TUI_DROPDOWN_OPTIONS, 4));\n };\n TuiDropdownOptionsDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownOptionsDirective,\n selectors: [[\"\", \"tuiDropdownAlign\", \"\"], [\"\", \"tuiDropdownAppearance\", \"\"], [\"\", \"tuiDropdownDirection\", \"\"], [\"\", \"tuiDropdownLimitWidth\", \"\"], [\"\", \"tuiDropdownMinHeight\", \"\"], [\"\", \"tuiDropdownMaxHeight\", \"\"], [\"\", \"tuiDropdownOffset\", \"\"]],\n inputs: {\n align: [\"tuiDropdownAlign\", \"align\"],\n appearance: [\"tuiDropdownAppearance\", \"appearance\"],\n direction: [\"tuiDropdownDirection\", \"direction\"],\n limitWidth: [\"tuiDropdownLimitWidth\", \"limitWidth\"],\n minHeight: [\"tuiDropdownMinHeight\", \"minHeight\"],\n maxHeight: [\"tuiDropdownMaxHeight\", \"maxHeight\"],\n offset: [\"tuiDropdownOffset\", \"offset\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_DROPDOWN_OPTIONS,\n useExisting: forwardRef(() => TuiDropdownOptionsDirective)\n }])]\n });\n return TuiDropdownOptionsDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @description:\n * This component is used to show template in a portal\n * using default style of white rounded box with a shadow\n */\nlet TuiDropdownComponent = /*#__PURE__*/(() => {\n class TuiDropdownComponent {\n constructor(visualViewportService, position$, destroy$, directive, animation, el, accessor, win, mode$, options, hoverDirective) {\n this.directive = directive;\n this.animation = animation;\n this.el = el;\n this.accessor = accessor;\n this.win = win;\n this.mode$ = mode$;\n this.options = options;\n this.hoverDirective = hoverDirective;\n position$.pipe(map(point => this.directive.position === 'fixed' ? visualViewportService.correct(point) : point), takeUntil(destroy$)).subscribe(([top, left]) => {\n this.update(top, left);\n });\n this.updateWidth(this.accessor.getClientRect().width);\n }\n onHoveredChange(hovered) {\n var _a;\n (_a = this.hoverDirective) === null || _a === void 0 ? void 0 : _a.toggle(hovered);\n }\n onTopFocus() {\n this.moveFocusOutside(true);\n }\n onBottomFocus() {\n this.moveFocusOutside(false);\n }\n update(top, left) {\n var _a;\n const {\n style\n } = this.el.nativeElement;\n const {\n right\n } = this.el.nativeElement.getBoundingClientRect();\n const {\n maxHeight,\n offset\n } = this.options;\n const {\n innerHeight\n } = this.win;\n const clientRect = (_a = this.el.nativeElement.offsetParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();\n const {\n position\n } = this.directive;\n const rect = this.accessor.getClientRect();\n const offsetX = position === 'fixed' ? 0 : -((clientRect === null || clientRect === void 0 ? void 0 : clientRect.left) || 0);\n const offsetY = position === 'fixed' ? 0 : -((clientRect === null || clientRect === void 0 ? void 0 : clientRect.top) || 0);\n top += offsetY;\n left += offsetX;\n const isIntersecting = left < rect.right && right > rect.left && top < offsetY + 2 * offset;\n const available = isIntersecting ? rect.top - 2 * offset : offsetY + innerHeight - top - offset;\n style.position = position;\n style.top = tuiPx(Math.max(top, offsetY + offset));\n style.left = tuiPx(left);\n style.maxHeight = tuiPx(Math.min(maxHeight, available));\n style.width = '';\n style.minWidth = '';\n this.updateWidth(rect.width);\n }\n updateWidth(width) {\n const {\n style\n } = this.el.nativeElement;\n switch (this.options.limitWidth) {\n case 'min':\n style.minWidth = tuiPx(width);\n break;\n case 'fixed':\n style.width = tuiPx(width);\n break;\n case 'auto':\n break;\n }\n }\n moveFocusOutside(previous) {\n const {\n nativeElement\n } = this.directive.el;\n const {\n ownerDocument\n } = nativeElement;\n const root = ownerDocument ? ownerDocument.body : nativeElement;\n let focusable = tuiGetClosestFocusable({\n initial: nativeElement,\n root,\n previous\n });\n while (focusable !== null && nativeElement.contains(focusable)) {\n focusable = tuiGetClosestFocusable({\n initial: focusable,\n root,\n previous\n });\n }\n focusable === null || focusable === void 0 ? void 0 : focusable.focus();\n }\n }\n TuiDropdownComponent.ɵfac = function TuiDropdownComponent_Factory(t) {\n return new (t || TuiDropdownComponent)(i0.ɵɵdirectiveInject(TuiVisualViewportService), i0.ɵɵdirectiveInject(TuiPositionService), i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(TuiDropdownDirective), i0.ɵɵdirectiveInject(TUI_ANIMATION_OPTIONS), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TuiRectAccessor), i0.ɵɵdirectiveInject(WINDOW), i0.ɵɵdirectiveInject(TUI_MODE), i0.ɵɵdirectiveInject(TUI_DROPDOWN_OPTIONS), i0.ɵɵdirectiveInject(TuiDropdownHoverDirective, 8));\n };\n TuiDropdownComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiDropdownComponent,\n selectors: [[\"tui-dropdown\"]],\n hostVars: 2,\n hostBindings: function TuiDropdownComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"$.data-mode.attr\", function TuiDropdownComponent___data_mode_attr_HostBindingHandler() {\n return ctx.mode$;\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-appearance\", ctx.options.appearance);\n i0.ɵɵsyntheticHostProperty(\"@tuiDropdownAnimation\", ctx.animation);\n }\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPositionService, tuiPositionAccessorFor('dropdown'), tuiRectAccessorFor('dropdown', TuiDropdownDirective), MODE_PROVIDER])],\n decls: 5,\n vars: 4,\n consts: [[\"tuiActiveZone\", \"\", \"tuiOverscroll\", \"all\", 1, \"t-scroll\", 3, \"tuiHoveredChange\"], [\"activeZone\", \"tuiActiveZone\"], [\"tabindex\", \"0\", 3, \"focus\"], [\"class\", \"t-primitive\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [1, \"t-primitive\"]],\n template: function TuiDropdownComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-scrollbar\", 0, 1);\n i0.ɵɵlistener(\"tuiHoveredChange\", function TuiDropdownComponent_Template_tui_scrollbar_tuiHoveredChange_0_listener($event) {\n return ctx.onHoveredChange($event);\n });\n i0.ɵɵelementStart(2, \"div\", 2);\n i0.ɵɵlistener(\"focus\", function TuiDropdownComponent_Template_div_focus_2_listener() {\n return ctx.onTopFocus();\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(3, TuiDropdownComponent_div_3_Template, 2, 1, \"div\", 3);\n i0.ɵɵelementStart(4, \"div\", 2);\n i0.ɵɵlistener(\"focus\", function TuiDropdownComponent_Template_div_focus_4_listener() {\n return ctx.onBottomFocus();\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const _r0 = i0.ɵɵreference(1);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.directive.content)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c0, _r0));\n }\n },\n dependencies: [i1$1.TuiScrollbarComponent, i2.TuiActiveZoneDirective, i2.TuiOverscrollDirective, i2.TuiHoveredDirective, i3.PolymorpheusOutletDirective],\n styles: [\"[_nghost-%COMP%]{position:absolute;display:flex;box-shadow:var(--tui-shadow-dropdown);background:var(--tui-elevation-02);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-base-04);box-sizing:border-box;max-width:calc(100% - 8px);isolation:isolate;pointer-events:auto}.ng-animating[_nghost-%COMP%]{pointer-events:none}[_nghost-%COMP%]:not([style*=\\\"top\\\"]){visibility:hidden}[data-mode=onDark][_nghost-%COMP%]{--tui-text-01: var(--tui-text-01-night);--tui-clear: var(--tui-clear-inverse);background:#222;border:1px solid #808080}.t-scroll[_ngcontent-%COMP%]{flex-grow:1;max-width:100%}.t-primitive[_ngcontent-%COMP%]{padding:1rem}\"],\n data: {\n animation: [tuiDropdownAnimation]\n }\n });\n return TuiDropdownComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction activeZoneFilter(target) {\n return !this.activeZone.contains(target);\n}\nlet TuiDropdownContextDirective = /*#__PURE__*/(() => {\n class TuiDropdownContextDirective extends TuiDriver {\n constructor(activeZone) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.activeZone = activeZone;\n this.stream$ = new Subject();\n this.currentRect = EMPTY_CLIENT_RECT;\n this.type = 'dropdown';\n }\n onContextMenu(x, y) {\n this.currentRect = tuiPointToClientRect(x, y);\n this.stream$.next(true);\n }\n closeDropdown() {\n this.stream$.next(false);\n }\n getClientRect() {\n return this.currentRect;\n }\n }\n TuiDropdownContextDirective.ɵfac = function TuiDropdownContextDirective_Factory(t) {\n return new (t || TuiDropdownContextDirective)(i0.ɵɵdirectiveInject(TuiActiveZoneDirective));\n };\n TuiDropdownContextDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownContextDirective,\n selectors: [[\"\", \"tuiDropdown\", \"\", \"tuiDropdownContext\", \"\"]],\n hostBindings: function TuiDropdownContextDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"contextmenu.prevent.stop\", function TuiDropdownContextDirective_contextmenu_prevent_stop_HostBindingHandler($event) {\n return ctx.onContextMenu($event.clientX, $event.clientY);\n })(\"click.silent\", function TuiDropdownContextDirective_click_silent_HostBindingHandler($event) {\n return ctx.closeDropdown($event.target);\n }, false, i0.ɵɵresolveDocument)(\"contextmenu.capture.silent\", function TuiDropdownContextDirective_contextmenu_capture_silent_HostBindingHandler($event) {\n return ctx.closeDropdown($event.target);\n }, false, i0.ɵɵresolveDocument)(\"keydown.esc\", function TuiDropdownContextDirective_keydown_esc_HostBindingHandler($event) {\n return ctx.closeDropdown($event.currentTarget);\n }, false, i0.ɵɵresolveDocument);\n }\n },\n features: [i0.ɵɵProvidersFeature([TuiActiveZoneDirective, tuiAsDriver(TuiDropdownContextDirective), tuiAsRectAccessor(TuiDropdownContextDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n __decorate([shouldCall(activeZoneFilter)], TuiDropdownContextDirective.prototype, \"closeDropdown\", null);\n return TuiDropdownContextDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDropdownDriverDirective = /*#__PURE__*/(() => {\n class TuiDropdownDriverDirective extends AbstractTuiDriverDirective {\n // TODO: Figure out why this is necessary under nx test runner\n constructor(destroy$, drivers, vehicles) {\n super(destroy$, drivers, vehicles);\n this.type = 'dropdown';\n }\n }\n TuiDropdownDriverDirective.ɵfac = function TuiDropdownDriverDirective_Factory(t) {\n return new (t || TuiDropdownDriverDirective)(i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(TuiDriver), i0.ɵɵdirectiveInject(TuiVehicle));\n };\n TuiDropdownDriverDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownDriverDirective,\n selectors: [[\"\", \"tuiDropdown\", \"\"]],\n features: [i0.ɵɵProvidersFeature([TuiDestroyService]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiDropdownDriverDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDropdownHostDirective = /*#__PURE__*/(() => {\n class TuiDropdownHostDirective extends TuiRectAccessor {\n constructor() {\n super(...arguments);\n this.type = 'dropdown';\n }\n getClientRect() {\n var _a;\n return ((_a = this.tuiDropdownHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || EMPTY_CLIENT_RECT;\n }\n }\n TuiDropdownHostDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiDropdownHostDirective_BaseFactory;\n return function TuiDropdownHostDirective_Factory(t) {\n return (ɵTuiDropdownHostDirective_BaseFactory || (ɵTuiDropdownHostDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiDropdownHostDirective)))(t || TuiDropdownHostDirective);\n };\n })();\n TuiDropdownHostDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownHostDirective,\n selectors: [[\"\", \"tuiDropdown\", \"\", \"tuiDropdownHost\", \"\"]],\n inputs: {\n tuiDropdownHost: \"tuiDropdownHost\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsRectAccessor(TuiDropdownHostDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiDropdownHostDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDropdownManualDirective = /*#__PURE__*/(() => {\n class TuiDropdownManualDirective extends TuiDriver {\n constructor() {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.stream$ = new BehaviorSubject(false);\n this.tuiDropdownManual = false;\n this.type = 'dropdown';\n }\n ngOnChanges() {\n this.stream$.next(this.tuiDropdownManual);\n }\n }\n TuiDropdownManualDirective.ɵfac = function TuiDropdownManualDirective_Factory(t) {\n return new (t || TuiDropdownManualDirective)();\n };\n TuiDropdownManualDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownManualDirective,\n selectors: [[\"\", \"tuiDropdown\", \"\", \"tuiDropdownManual\", \"\"]],\n inputs: {\n tuiDropdownManual: \"tuiDropdownManual\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsDriver(TuiDropdownManualDirective)]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n return TuiDropdownManualDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDropdownPositionDirective = /*#__PURE__*/(() => {\n class TuiDropdownPositionDirective extends TuiPositionAccessor {\n constructor(options, viewport, accessors, directive) {\n super();\n this.options = options;\n this.viewport = viewport;\n this.accessors = accessors;\n this.directive = directive;\n this.type = 'dropdown';\n }\n getPosition({\n width,\n height\n }) {\n var _a, _b;\n if (!width && !height) {\n this.previous = undefined;\n }\n const hostRect = (_b = (_a = this.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : EMPTY_CLIENT_RECT;\n const viewportRect = this.viewport.getClientRect();\n const {\n minHeight,\n align,\n direction,\n offset\n } = this.options;\n const viewport = {\n top: viewportRect.top - offset,\n bottom: viewportRect.bottom + offset,\n right: viewportRect.right - offset,\n left: viewportRect.left + offset\n };\n const previous = this.previous || direction || 'bottom';\n const available = {\n top: hostRect.top - 2 * offset - viewport.top,\n bottom: viewport.bottom - hostRect.bottom - 2 * offset\n };\n const right = Math.max(hostRect.right - width, offset);\n const left = hostRect.left + width < viewport.right ? hostRect.left : right;\n const position = {\n top: hostRect.top - offset - height,\n bottom: hostRect.bottom + offset,\n right: Math.max(viewport.left, right),\n center: hostRect.left + hostRect.width / 2 + width / 2 < viewport.right ? hostRect.left + hostRect.width / 2 - width / 2 : right,\n left: Math.max(viewport.left, left)\n };\n const better = available.top > available.bottom ? 'top' : 'bottom';\n if (available[previous] > minHeight && direction || available[previous] > height) {\n return [position[previous], position[align]];\n }\n this.previous = better;\n return [position[better], position[align]];\n }\n get accessor() {\n return tuiFallbackRectAccessor('dropdown')(this.accessors, this.directive);\n }\n }\n TuiDropdownPositionDirective.ɵfac = function TuiDropdownPositionDirective_Factory(t) {\n return new (t || TuiDropdownPositionDirective)(i0.ɵɵdirectiveInject(TUI_DROPDOWN_OPTIONS), i0.ɵɵdirectiveInject(TUI_VIEWPORT), i0.ɵɵdirectiveInject(TuiRectAccessor), i0.ɵɵdirectiveInject(TuiDropdownDirective));\n };\n TuiDropdownPositionDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownPositionDirective,\n selectors: [[\"\", \"tuiDropdown\", \"\", 3, \"tuiDropdownCustomPosition\", \"\", 3, \"tuiDropdownSided\", \"\"]],\n features: [i0.ɵɵProvidersFeature([tuiAsPositionAccessor(TuiDropdownPositionDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n __decorate([tuiPure], TuiDropdownPositionDirective.prototype, \"accessor\", null);\n return TuiDropdownPositionDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDropdownPositionSidedDirective = /*#__PURE__*/(() => {\n class TuiDropdownPositionSidedDirective extends TuiPositionAccessor {\n constructor(options, viewport, vertical) {\n super();\n this.options = options;\n this.viewport = viewport;\n this.vertical = vertical;\n this.previous = this.options.direction || 'bottom';\n this.tuiDropdownSided = '';\n this.tuiDropdownSidedOffset = 4;\n this.type = 'dropdown';\n }\n getPosition(rect) {\n var _a, _b;\n if (this.tuiDropdownSided === false) {\n return this.vertical.getPosition(rect);\n }\n const {\n height,\n width\n } = rect;\n const hostRect = (_b = (_a = this.vertical.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : EMPTY_CLIENT_RECT;\n const viewport = this.viewport.getClientRect();\n const {\n direction,\n minHeight,\n offset\n } = this.options;\n const align = this.options.align === 'center' ? 'left' : this.options.align;\n const available = {\n top: hostRect.bottom - viewport.top,\n left: hostRect.left - offset - viewport.left,\n right: viewport.right - hostRect.right - offset,\n bottom: viewport.bottom - hostRect.top\n };\n const position = {\n top: hostRect.bottom - height + this.tuiDropdownSidedOffset + 1,\n left: hostRect.left - width - offset,\n right: hostRect.right + offset,\n bottom: hostRect.top - this.tuiDropdownSidedOffset - 1 // 1 for border\n };\n\n const better = available.top > available.bottom ? 'top' : 'bottom';\n const maxLeft = available.left > available.right ? position.left : position.right;\n const left = available[align] > width ? position[align] : maxLeft;\n if (available[this.previous] > minHeight && direction || this.previous === better) {\n return [position[this.previous], left];\n }\n this.previous = better;\n return [position[better], left];\n }\n }\n TuiDropdownPositionSidedDirective.ɵfac = function TuiDropdownPositionSidedDirective_Factory(t) {\n return new (t || TuiDropdownPositionSidedDirective)(i0.ɵɵdirectiveInject(TUI_DROPDOWN_OPTIONS), i0.ɵɵdirectiveInject(TUI_VIEWPORT), i0.ɵɵdirectiveInject(TuiDropdownPositionDirective));\n };\n TuiDropdownPositionSidedDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownPositionSidedDirective,\n selectors: [[\"\", \"tuiDropdownSided\", \"\"]],\n inputs: {\n tuiDropdownSided: \"tuiDropdownSided\",\n tuiDropdownSidedOffset: \"tuiDropdownSidedOffset\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDropdownPositionDirective, tuiAsPositionAccessor(TuiDropdownPositionSidedDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiDropdownPositionSidedDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDropdownSelectionDirective = /*#__PURE__*/(() => {\n class TuiDropdownSelectionDirective extends TuiDriver {\n constructor(range, doc, selection$, el, vcr, dropdown) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.range = range;\n this.doc = doc;\n this.selection$ = selection$;\n this.el = el;\n this.vcr = vcr;\n this.dropdown = dropdown;\n this.handler$ = new BehaviorSubject(ALWAYS_TRUE_HANDLER);\n this.stream$ = combineLatest([this.handler$, this.selection$.pipe(map(() => this.getRange()), distinctUntilChanged())]).pipe(map(([handler, range]) => {\n const contained = this.el.nativeElement.contains(range.commonAncestorContainer);\n this.range = contained && tuiIsTextNode(range.commonAncestorContainer) ? range : this.range;\n return contained && handler(this.range) || this.inDropdown(range);\n }));\n this.position = 'selection';\n this.type = 'dropdown';\n }\n set tuiDropdownSelection(visible) {\n if (!tuiIsString(visible)) {\n this.handler$.next(visible);\n }\n }\n getClientRect() {\n switch (this.position) {\n case 'tag':\n {\n const {\n commonAncestorContainer\n } = this.range;\n const element = tuiIsElement(commonAncestorContainer) ? commonAncestorContainer : commonAncestorContainer.parentNode;\n return element && tuiIsElement(element) ? element.getBoundingClientRect() : EMPTY_CLIENT_RECT;\n }\n case 'word':\n return tuiGetWordRange(this.range).getBoundingClientRect();\n default:\n return this.range.getBoundingClientRect();\n }\n }\n ngOnDestroy() {\n if (this.ghost) {\n this.vcr.element.nativeElement.removeChild(this.ghost);\n }\n }\n getRange() {\n const active = tuiGetNativeFocused(this.doc);\n const selection = this.doc.getSelection();\n if (active && tuiIsTextfield(active) && this.el.nativeElement.contains(active)) {\n return this.veryVerySadInputFix(active);\n }\n return (selection === null || selection === void 0 ? void 0 : selection.rangeCount) ? selection.getRangeAt(0) : this.range;\n }\n /**\n * Check if Node is inside dropdown\n */\n boxContains(node) {\n var _a;\n return !!((_a = this.dropdown.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.location.nativeElement.contains(node));\n }\n /**\n * Check if given range is at least partially inside dropdown\n */\n inDropdown(range) {\n const {\n startContainer,\n endContainer\n } = range;\n const {\n nativeElement\n } = this.el;\n const inDropdown = this.boxContains(range.commonAncestorContainer);\n const hostToDropdown = this.boxContains(endContainer) && nativeElement.contains(startContainer);\n const dropdownToHost = this.boxContains(startContainer) && nativeElement.contains(endContainer);\n return inDropdown || hostToDropdown || dropdownToHost;\n }\n veryVerySadInputFix(element) {\n const {\n ghost = this.initGhost(element)\n } = this;\n const {\n top,\n left,\n width,\n height\n } = element.getBoundingClientRect();\n const {\n selectionStart,\n selectionEnd,\n value\n } = element;\n const range = this.doc.createRange();\n const hostRect = this.el.nativeElement.getBoundingClientRect();\n ghost.style.top = tuiPx(top - hostRect.top);\n ghost.style.left = tuiPx(left - hostRect.left);\n ghost.style.width = tuiPx(width);\n ghost.style.height = tuiPx(height);\n ghost.textContent = CHAR_ZERO_WIDTH_SPACE + value + CHAR_NO_BREAK_SPACE;\n range.setStart(ghost.firstChild, selectionStart || 0);\n range.setEnd(ghost.firstChild, selectionEnd || 0);\n return range;\n }\n /**\n * Create an invisible DIV styled exactly like input/textarea element inside directive\n */\n initGhost(element) {\n const ghost = this.doc.createElement('div');\n const {\n font,\n letterSpacing,\n textTransform,\n padding\n } = getComputedStyle(element);\n ghost.style.position = 'absolute';\n ghost.style.pointerEvents = 'none';\n ghost.style.opacity = '0';\n ghost.style.whiteSpace = 'pre-wrap';\n ghost.style.font = font;\n ghost.style.letterSpacing = letterSpacing;\n ghost.style.textTransform = textTransform;\n ghost.style.padding = padding;\n this.vcr.element.nativeElement.appendChild(ghost);\n this.ghost = ghost;\n return ghost;\n }\n }\n TuiDropdownSelectionDirective.ɵfac = function TuiDropdownSelectionDirective_Factory(t) {\n return new (t || TuiDropdownSelectionDirective)(i0.ɵɵdirectiveInject(TUI_RANGE), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(TUI_SELECTION_STREAM), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(ViewContainerRef), i0.ɵɵdirectiveInject(TuiDropdownDirective));\n };\n TuiDropdownSelectionDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownSelectionDirective,\n selectors: [[\"\", \"tuiDropdown\", \"\", \"tuiDropdownSelection\", \"\"]],\n inputs: {\n position: [\"tuiDropdownSelectionPosition\", \"position\"],\n tuiDropdownSelection: \"tuiDropdownSelection\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsDriver(TuiDropdownSelectionDirective), tuiAsRectAccessor(TuiDropdownSelectionDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiDropdownSelectionDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDropdownModule = /*#__PURE__*/(() => {\n class TuiDropdownModule {}\n TuiDropdownModule.ɵfac = function TuiDropdownModule_Factory(t) {\n return new (t || TuiDropdownModule)();\n };\n TuiDropdownModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiDropdownModule\n });\n TuiDropdownModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[PolymorpheusModule, TuiActiveZoneModule, TuiOverscrollModule, TuiScrollbarModule, TuiHoveredModule]]\n });\n return TuiDropdownModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_DROPDOWN_COMPONENT, TUI_DROPDOWN_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_OPTIONS, TUI_DROPDOWN_OPTIONS, TuiDropdownComponent, TuiDropdownContextDirective, TuiDropdownDirective, TuiDropdownDriverDirective, TuiDropdownHostDirective, TuiDropdownHoverDirective, TuiDropdownManualDirective, TuiDropdownModule, TuiDropdownOpenDirective, TuiDropdownOptionsDirective, TuiDropdownPositionDirective, TuiDropdownPositionSidedDirective, TuiDropdownSelectionDirective, tuiDropdownHoverOptionsProvider, tuiDropdownOptionsProvider };\n","import { __decorate } from 'tslib';\nimport * as i0 from '@angular/core';\nimport { Optional, SkipSelf, forwardRef, Directive, Inject, Input, ElementRef, INJECTOR, HostListener, Component, ChangeDetectionStrategy, Self, HostBinding, NgZone, TemplateRef, NgModule } from '@angular/core';\nimport * as i3 from '@taiga-ui/cdk';\nimport { tuiCreateTokenFromFactory, tuiCreateToken, AbstractTuiController, TuiActiveZoneDirective, TuiHoveredService, EMPTY_CLIENT_RECT, tuiPointToClientRect, tuiClamp, tuiPx, TuiDestroyService, tuiPure, tuiIfMap, tuiTypedFromEvent, tuiIsPresent, tuiZoneOptimized, tuiIsNativeFocused, TUI_PARENT_ANIMATION } from '@taiga-ui/cdk';\nimport * as i3$1 from '@taiga-ui/core/abstract';\nimport { tuiAsRectAccessor, tuiAsVehicle, TuiDriver, tuiAsDriver, TuiRectAccessor, tuiPositionAccessorFor, tuiRectAccessorFor, AbstractTuiDriverDirective, TuiVehicle, TuiPositionAccessor, tuiFallbackRectAccessor, tuiAsPositionAccessor } from '@taiga-ui/core/abstract';\nimport { tuiFadeIn } from '@taiga-ui/core/animations';\nimport * as i5 from '@taiga-ui/core/directives/mode';\nimport { TuiModeDirective } from '@taiga-ui/core/directives/mode';\nimport * as i2 from '@taiga-ui/core/services';\nimport { TuiHintService, TuiPositionService, TuiVisualViewportService } from '@taiga-ui/core/services';\nimport { TUI_ANIMATION_OPTIONS, TUI_VIEWPORT } from '@taiga-ui/core/tokens';\nimport { tuiOverrideOptions, tuiIsObscured } from '@taiga-ui/core/utils';\nimport * as i1 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusComponent, POLYMORPHEUS_CONTEXT, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport { switchMap, delay, takeUntil, repeat, filter, map, tap, debounce, startWith, distinctUntilChanged, skip } from 'rxjs/operators';\nimport * as i2$1 from 'rxjs';\nimport { Subject, merge, of, ReplaySubject, timer, BehaviorSubject } from 'rxjs';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport { TUI_HINT_DIRECTIONS } from '@taiga-ui/core/constants';\n\n/**\n * A component to display a hint\n */\nfunction TuiHintComponent_span_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 1);\n }\n if (rf & 2) {\n const text_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"innerHTML\", text_r1, i0.ɵɵsanitizeHtml);\n }\n}\nconst _c0 = [\"*\"];\nfunction TuiHintUnstyledComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nconst TUI_HINT_COMPONENT = tuiCreateTokenFromFactory(() => TuiHintComponent);\n\n/** Default values for hint options */\nconst TUI_HINT_DEFAULT_OPTIONS = {\n direction: 'bottom-left',\n showDelay: 500,\n hideDelay: 200,\n appearance: '',\n icon: 'tuiIconHelpCircle'\n};\n/**\n * Default parameters for hint directive\n */\nconst TUI_HINT_OPTIONS = tuiCreateToken(TUI_HINT_DEFAULT_OPTIONS);\nconst tuiHintOptionsProvider = override => ({\n provide: TUI_HINT_OPTIONS,\n deps: [[new Optional(), TuiHintOptionsDirective], [new Optional(), new SkipSelf(), TUI_HINT_OPTIONS]],\n useFactory: tuiOverrideOptions(override, TUI_HINT_DEFAULT_OPTIONS)\n});\nlet TuiHintOptionsDirective = /*#__PURE__*/(() => {\n class TuiHintOptionsDirective extends AbstractTuiController {\n constructor(options) {\n super();\n this.options = options;\n this.direction = this.options.direction;\n this.appearance = this.options.appearance;\n this.showDelay = this.options.showDelay;\n this.hideDelay = this.options.hideDelay;\n this.icon = this.options.icon;\n }\n }\n TuiHintOptionsDirective.ɵfac = function TuiHintOptionsDirective_Factory(t) {\n return new (t || TuiHintOptionsDirective)(i0.ɵɵdirectiveInject(TUI_HINT_OPTIONS, 4));\n };\n TuiHintOptionsDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintOptionsDirective,\n selectors: [[\"\", \"tuiHintContent\", \"\"]],\n inputs: {\n content: [\"tuiHintContent\", \"content\"],\n direction: [\"tuiHintDirection\", \"direction\"],\n appearance: [\"tuiHintAppearance\", \"appearance\"],\n showDelay: [\"tuiHintShowDelay\", \"showDelay\"],\n hideDelay: [\"tuiHintHideDelay\", \"hideDelay\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_HINT_OPTIONS,\n useExisting: forwardRef(() => TuiHintOptionsDirective)\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiHintOptionsDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHintDirective = /*#__PURE__*/(() => {\n class TuiHintDirective {\n constructor(el, component, hintService, options, activeZone) {\n this.el = el;\n this.component = component;\n this.hintService = hintService;\n this.options = options;\n this.activeZone = activeZone;\n this.tuiHintAppearance = null;\n this.type = 'hint';\n }\n get appearance() {\n var _a;\n return (_a = this.tuiHintAppearance) !== null && _a !== void 0 ? _a : this.options.appearance;\n }\n ngOnChanges() {\n if (!this.content) {\n this.toggle(false);\n }\n }\n ngOnDestroy() {\n this.toggle(false);\n }\n getClientRect() {\n return this.el.nativeElement.getBoundingClientRect();\n }\n toggle(show) {\n if (show && this.content) {\n this.hintService.add(this);\n } else {\n this.hintService.remove(this);\n }\n }\n }\n TuiHintDirective.ɵfac = function TuiHintDirective_Factory(t) {\n return new (t || TuiHintDirective)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(PolymorpheusComponent), i0.ɵɵdirectiveInject(TuiHintService), i0.ɵɵdirectiveInject(TUI_HINT_OPTIONS), i0.ɵɵdirectiveInject(TuiActiveZoneDirective, 8));\n };\n TuiHintDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintDirective,\n selectors: [[\"\", \"tuiHint\", \"\", 5, \"ng-container\", 5, \"ng-template\"]],\n inputs: {\n content: [\"tuiHint\", \"content\"],\n context: [\"tuiHintContext\", \"context\"],\n tuiHintAppearance: \"tuiHintAppearance\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsRectAccessor(TuiHintDirective), tuiAsVehicle(TuiHintDirective), {\n provide: PolymorpheusComponent,\n deps: [TUI_HINT_COMPONENT, INJECTOR],\n useClass: PolymorpheusComponent\n }]), i0.ɵɵNgOnChangesFeature]\n });\n return TuiHintDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/* eslint-disable rxjs/no-unsafe-takeuntil */\nlet TuiHintHoverDirective = /*#__PURE__*/(() => {\n class TuiHintHoverDirective extends TuiDriver {\n constructor(hovered$, options, el) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.hovered$ = hovered$;\n this.options = options;\n this.el = el;\n this.visible = false;\n this.toggle$ = new Subject();\n this.stream$ = merge(this.toggle$.pipe(switchMap(visible => of(visible).pipe(delay(visible ? 0 : this.hideDelay))), takeUntil(this.hovered$), repeat()), this.hovered$.pipe(switchMap(visible => of(visible).pipe(delay(visible ? this.showDelay : this.hideDelay))), takeUntil(this.toggle$), repeat())).pipe(filter(() => this.enabled), map(value => value && !tuiIsObscured(this.el.nativeElement)), tap(visible => {\n this.visible = visible;\n }));\n this.showDelay = this.options.showDelay;\n this.hideDelay = this.options.hideDelay;\n this.type = 'hint';\n this.enabled = true;\n }\n toggle(visible = !this.visible) {\n this.toggle$.next(visible);\n }\n }\n TuiHintHoverDirective.ɵfac = function TuiHintHoverDirective_Factory(t) {\n return new (t || TuiHintHoverDirective)(i0.ɵɵdirectiveInject(TuiHoveredService), i0.ɵɵdirectiveInject(TUI_HINT_OPTIONS), i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiHintHoverDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintHoverDirective,\n selectors: [[\"\", \"tuiHint\", \"\", 5, \"ng-container\", 5, \"ng-template\"]],\n inputs: {\n showDelay: [\"tuiHintShowDelay\", \"showDelay\"],\n hideDelay: [\"tuiHintHideDelay\", \"hideDelay\"]\n },\n exportAs: [\"tuiHintHover\"],\n features: [i0.ɵɵProvidersFeature([tuiAsDriver(TuiHintHoverDirective), TuiHoveredService]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiHintHoverDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHintPointerDirective = /*#__PURE__*/(() => {\n class TuiHintPointerDirective extends TuiHintHoverDirective {\n constructor() {\n super(...arguments);\n this.currentRect = EMPTY_CLIENT_RECT;\n }\n onMove({\n clientX,\n clientY\n }) {\n this.currentRect = tuiPointToClientRect(clientX, clientY);\n }\n getClientRect() {\n return this.currentRect;\n }\n }\n TuiHintPointerDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiHintPointerDirective_BaseFactory;\n return function TuiHintPointerDirective_Factory(t) {\n return (ɵTuiHintPointerDirective_BaseFactory || (ɵTuiHintPointerDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiHintPointerDirective)))(t || TuiHintPointerDirective);\n };\n })();\n TuiHintPointerDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintPointerDirective,\n selectors: [[\"\", \"tuiHint\", \"\", \"tuiHintPointer\", \"\"]],\n hostBindings: function TuiHintPointerDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mousemove.silent\", function TuiHintPointerDirective_mousemove_silent_HostBindingHandler($event) {\n return ctx.onMove($event);\n });\n }\n },\n features: [i0.ɵɵProvidersFeature([tuiAsRectAccessor(TuiHintPointerDirective), tuiAsDriver(TuiHintPointerDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiHintPointerDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst GAP = 4;\nlet TuiHintComponent = /*#__PURE__*/(() => {\n class TuiHintComponent {\n constructor(hovered$, position$, destroy$, animation, pointer, accessor, el, polymorpheus, hover, mode, visualViewportService, viewport) {\n var _a;\n this.animation = animation;\n this.pointer = pointer;\n this.accessor = accessor;\n this.el = el;\n this.polymorpheus = polymorpheus;\n this.hover = hover;\n this.mode = mode;\n this.visualViewportService = visualViewportService;\n this.viewport = viewport;\n this.appearance = this.polymorpheus.$implicit.appearance || ((_a = this.mode) === null || _a === void 0 ? void 0 : _a.mode);\n position$.pipe(map(point => this.visualViewportService.correct(point)), takeUntil(destroy$)).subscribe(([top, left]) => {\n this.update(top, left);\n });\n hovered$.pipe(takeUntil(destroy$)).subscribe(hover => this.hover.toggle(hover));\n }\n get content() {\n return this.polymorpheus.$implicit.content;\n }\n get context() {\n return this.polymorpheus.$implicit.context;\n }\n onClick(target) {\n if (!this.el.nativeElement.contains(target) && !this.hover.el.nativeElement.contains(target) || tuiIsObscured(this.hover.el.nativeElement)) {\n this.hover.toggle(false);\n }\n }\n update(top, left) {\n const {\n height,\n width\n } = this.el.nativeElement.getBoundingClientRect();\n const {\n style\n } = this.el.nativeElement;\n const rect = this.accessor.getClientRect();\n const viewport = this.viewport.getClientRect();\n if (rect === EMPTY_CLIENT_RECT) {\n return;\n }\n const safeLeft = tuiClamp(left, GAP, viewport.width - width - GAP);\n const [beakTop, beakLeft] = this.visualViewportService.correct([rect.top + rect.height / 2 - top, rect.left + rect.width / 2 - safeLeft]);\n style.top = tuiPx(top);\n style.left = tuiPx(safeLeft);\n style.setProperty('--top', tuiPx(tuiClamp(beakTop, 0.5, height - 1)));\n style.setProperty('--left', tuiPx(tuiClamp(beakLeft, 0.5, width - 1)));\n }\n }\n TuiHintComponent.ɵfac = function TuiHintComponent_Factory(t) {\n return new (t || TuiHintComponent)(i0.ɵɵdirectiveInject(TuiHoveredService), i0.ɵɵdirectiveInject(TuiPositionService), i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(TUI_ANIMATION_OPTIONS), i0.ɵɵdirectiveInject(TuiHintPointerDirective, 8), i0.ɵɵdirectiveInject(TuiRectAccessor), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(POLYMORPHEUS_CONTEXT), i0.ɵɵdirectiveInject(TuiHintHoverDirective), i0.ɵɵdirectiveInject(TuiModeDirective, 8), i0.ɵɵdirectiveInject(TuiVisualViewportService), i0.ɵɵdirectiveInject(TUI_VIEWPORT));\n };\n TuiHintComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiHintComponent,\n selectors: [[\"tui-hint\"]],\n hostVars: 4,\n hostBindings: function TuiHintComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function TuiHintComponent_click_HostBindingHandler($event) {\n return ctx.onClick($event.target);\n }, false, i0.ɵɵresolveDocument);\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-appearance\", ctx.appearance);\n i0.ɵɵsyntheticHostProperty(\"@tuiFadeIn\", ctx.animation);\n i0.ɵɵclassProp(\"_untouchable\", ctx.pointer);\n }\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPositionService, TuiHoveredService, tuiPositionAccessorFor('hint'), tuiRectAccessorFor('hint', TuiHintDirective)])],\n ngContentSelectors: _c0,\n decls: 2,\n vars: 2,\n consts: [[3, \"innerHTML\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [3, \"innerHTML\"]],\n template: function TuiHintComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n i0.ɵɵtemplate(1, TuiHintComponent_span_1_Template, 1, 1, \"span\", 0);\n }\n if (rf & 2) {\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.content)(\"polymorpheusOutletContext\", ctx.context);\n }\n },\n dependencies: [i1.PolymorpheusOutletDirective],\n styles: [\"[_nghost-%COMP%]{position:absolute;max-width:18rem;min-height:var(--tui-height-m);padding:.75rem 1rem;background:var(--tui-primary);border-radius:var(--tui-radius-l);color:var(--tui-primary-text);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;word-wrap:break-word}[_nghost-%COMP%]:before{content:\\\"\\\";position:absolute;top:var(--top);left:var(--left);width:.5rem;height:.5rem;border-radius:.125rem;box-sizing:border-box;background:inherit;transform:translate(-50%,-50%) rotate(45deg)}[data-appearance=error][_nghost-%COMP%]{background:var(--tui-error-fill)}[data-appearance=onDark][_nghost-%COMP%]{background:var(--tui-elevation-02);color:var(--tui-text-01);filter:drop-shadow(0 0 .125rem rgba(0,0,0,.16)) drop-shadow(0 1.5rem 1rem rgba(0,0,0,.03)) drop-shadow(0 .75rem .75rem rgba(0,0,0,.04)) drop-shadow(0 .25rem .375rem rgba(0,0,0,.05))}[_nghost-%COMP%]:not([style*=\\\"top\\\"]){visibility:hidden}._untouchable[_nghost-%COMP%]{pointer-events:none}\"],\n data: {\n animation: [tuiFadeIn]\n },\n changeDetection: 0\n });\n __decorate([tuiPure], TuiHintComponent.prototype, \"update\", null);\n return TuiHintComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHintDescribeDirective = /*#__PURE__*/(() => {\n class TuiHintDescribeDirective extends TuiDriver {\n constructor(zone, doc, el) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.zone = zone;\n this.doc = doc;\n this.el = el;\n this.id$ = new ReplaySubject(1);\n this.stream$ = this.id$.pipe(tuiIfMap(() => tuiTypedFromEvent(this.doc, 'keydown', {\n capture: true\n }), tuiIsPresent), switchMap(() => this.focused ? of(false) : merge(tuiTypedFromEvent(this.doc, 'keyup'), tuiTypedFromEvent(this.element, 'blur')).pipe(map(() => this.focused))), debounce(visible => visible ? timer(1000) : of(null)), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized(this.zone));\n this.tuiHintDescribe = '';\n this.type = 'hint';\n }\n ngOnChanges() {\n this.id$.next(this.tuiHintDescribe);\n }\n get focused() {\n return tuiIsNativeFocused(this.element);\n }\n get element() {\n return this.doc.getElementById(this.tuiHintDescribe || '') || this.el.nativeElement;\n }\n }\n TuiHintDescribeDirective.ɵfac = function TuiHintDescribeDirective_Factory(t) {\n return new (t || TuiHintDescribeDirective)(i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiHintDescribeDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintDescribeDirective,\n selectors: [[\"\", \"tuiHintDescribe\", \"\"]],\n inputs: {\n tuiHintDescribe: \"tuiHintDescribe\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsDriver(TuiHintDescribeDirective)]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n __decorate([tuiPure], TuiHintDescribeDirective.prototype, \"element\", null);\n return TuiHintDescribeDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHintDriverDirective = /*#__PURE__*/(() => {\n class TuiHintDriverDirective extends AbstractTuiDriverDirective {\n // TODO: Figure out why this is necessary under nx test runner\n constructor(destroy$, drivers, vehicles) {\n super(destroy$, drivers, vehicles);\n this.type = 'hint';\n }\n }\n TuiHintDriverDirective.ɵfac = function TuiHintDriverDirective_Factory(t) {\n return new (t || TuiHintDriverDirective)(i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(TuiDriver), i0.ɵɵdirectiveInject(TuiVehicle));\n };\n TuiHintDriverDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintDriverDirective,\n selectors: [[\"\", \"tuiHint\", \"\", 5, \"ng-container\", 5, \"ng-template\"]],\n features: [i0.ɵɵProvidersFeature([TuiDestroyService]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiHintDriverDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHintHostDirective = /*#__PURE__*/(() => {\n class TuiHintHostDirective extends TuiRectAccessor {\n constructor() {\n super(...arguments);\n this.type = 'hint';\n }\n getClientRect() {\n var _a;\n return ((_a = this.tuiHintHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || EMPTY_CLIENT_RECT;\n }\n }\n TuiHintHostDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiHintHostDirective_BaseFactory;\n return function TuiHintHostDirective_Factory(t) {\n return (ɵTuiHintHostDirective_BaseFactory || (ɵTuiHintHostDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiHintHostDirective)))(t || TuiHintHostDirective);\n };\n })();\n TuiHintHostDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintHostDirective,\n selectors: [[\"\", \"tuiHint\", \"\", \"tuiHintHost\", \"\"]],\n inputs: {\n tuiHintHost: \"tuiHintHost\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsRectAccessor(TuiHintHostDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiHintHostDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHintManualDirective = /*#__PURE__*/(() => {\n class TuiHintManualDirective extends TuiDriver {\n constructor(hover) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.stream$ = new BehaviorSubject(false);\n this.tuiHintManual = false;\n this.type = 'hint';\n hover.enabled = false;\n }\n ngOnChanges() {\n this.stream$.next(this.tuiHintManual);\n }\n }\n TuiHintManualDirective.ɵfac = function TuiHintManualDirective_Factory(t) {\n return new (t || TuiHintManualDirective)(i0.ɵɵdirectiveInject(TuiHintHoverDirective));\n };\n TuiHintManualDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintManualDirective,\n selectors: [[\"\", \"tuiHint\", \"\", \"tuiHintManual\", \"\"]],\n inputs: {\n tuiHintManual: \"tuiHintManual\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsDriver(TuiHintManualDirective)]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n return TuiHintManualDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst OFFSET = 8;\nconst ARROW_OFFSET = 22;\nconst TOP = 0;\nconst LEFT = 1;\nlet TuiHintPositionDirective = /*#__PURE__*/(() => {\n class TuiHintPositionDirective extends TuiPositionAccessor {\n constructor(options, viewport, directive, accessors) {\n super();\n this.options = options;\n this.viewport = viewport;\n this.directive = directive;\n this.accessors = accessors;\n this.points = TUI_HINT_DIRECTIONS.reduce((acc, direction) => Object.assign(Object.assign({}, acc), {\n [direction]: [0, 0]\n }), {});\n this.direction = this.options.direction;\n this.type = 'hint';\n }\n getPosition({\n width,\n height\n }) {\n var _a, _b;\n const hostRect = (_b = (_a = this.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : EMPTY_CLIENT_RECT;\n const leftCenter = hostRect.left + hostRect.width / 2;\n const topCenter = hostRect.top + hostRect.height / 2;\n this.points['top-left'][TOP] = hostRect.top - height - OFFSET;\n this.points['top-left'][LEFT] = leftCenter - width + ARROW_OFFSET;\n this.points.top[TOP] = this.points['top-left'][TOP];\n this.points.top[LEFT] = leftCenter - width / 2;\n this.points['top-right'][TOP] = this.points['top-left'][TOP];\n this.points['top-right'][LEFT] = leftCenter - ARROW_OFFSET;\n this.points['bottom-left'][TOP] = hostRect.bottom + OFFSET;\n this.points['bottom-left'][LEFT] = this.points['top-left'][LEFT];\n this.points.bottom[TOP] = this.points['bottom-left'][TOP];\n this.points.bottom[LEFT] = this.points.top[LEFT];\n this.points['bottom-right'][TOP] = this.points['bottom-left'][TOP];\n this.points['bottom-right'][LEFT] = this.points['top-right'][LEFT];\n this.points['left-top'][TOP] = topCenter - height + ARROW_OFFSET;\n this.points['left-top'][LEFT] = hostRect.left - width - OFFSET;\n this.points.left[TOP] = topCenter - height / 2;\n this.points.left[LEFT] = this.points['left-top'][LEFT];\n this.points['left-bottom'][TOP] = topCenter - ARROW_OFFSET;\n this.points['left-bottom'][LEFT] = this.points['left-top'][LEFT];\n this.points['right-top'][TOP] = this.points['left-top'][TOP];\n this.points['right-top'][LEFT] = hostRect.right + OFFSET;\n this.points.right[TOP] = this.points.left[TOP];\n this.points.right[LEFT] = this.points['right-top'][LEFT];\n this.points['right-bottom'][TOP] = this.points['left-bottom'][TOP];\n this.points['right-bottom'][LEFT] = this.points['right-top'][LEFT];\n if (this.checkPosition(this.points[this.direction], width, height)) {\n return this.points[this.direction];\n }\n const direction = TUI_HINT_DIRECTIONS.find(direction => this.checkPosition(this.points[direction], width, height));\n return this.points[direction || this.fallback];\n }\n get accessor() {\n return tuiFallbackRectAccessor('hint')(this.accessors, this.directive);\n }\n get fallback() {\n return this.points.top[TOP] > this.viewport.getClientRect().bottom - this.points.bottom[TOP] ? 'top' : 'bottom';\n }\n checkPosition([top, left], width, height) {\n const viewport = this.viewport.getClientRect();\n return top > OFFSET && left > OFFSET && top + height < viewport.bottom - OFFSET && left + width < viewport.right - OFFSET;\n }\n }\n TuiHintPositionDirective.ɵfac = function TuiHintPositionDirective_Factory(t) {\n return new (t || TuiHintPositionDirective)(i0.ɵɵdirectiveInject(TUI_HINT_OPTIONS), i0.ɵɵdirectiveInject(TUI_VIEWPORT), i0.ɵɵdirectiveInject(TuiHintDirective), i0.ɵɵdirectiveInject(TuiRectAccessor));\n };\n TuiHintPositionDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintPositionDirective,\n selectors: [[\"\", \"tuiHint\", \"\", 3, \"tuiHintCustomPosition\", \"\", 5, \"ng-container\", 5, \"ng-template\"]],\n inputs: {\n direction: [\"tuiHintDirection\", \"direction\"]\n },\n features: [i0.ɵɵProvidersFeature([tuiAsPositionAccessor(TuiHintPositionDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n __decorate([tuiPure], TuiHintPositionDirective.prototype, \"accessor\", null);\n return TuiHintPositionDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHintUnstyledComponent = /*#__PURE__*/(() => {\n class TuiHintUnstyledComponent {\n constructor(context) {\n this.context = context;\n }\n }\n TuiHintUnstyledComponent.ɵfac = function TuiHintUnstyledComponent_Factory(t) {\n return new (t || TuiHintUnstyledComponent)(i0.ɵɵdirectiveInject(POLYMORPHEUS_CONTEXT));\n };\n TuiHintUnstyledComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiHintUnstyledComponent,\n selectors: [[\"ng-component\"]],\n hostVars: 1,\n hostBindings: function TuiHintUnstyledComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵsyntheticHostProperty(\"@tuiParentAnimation\", undefined);\n }\n },\n decls: 1,\n vars: 2,\n consts: [[4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"]],\n template: function TuiHintUnstyledComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiHintUnstyledComponent_ng_container_0_Template, 1, 0, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.context.$implicit.content)(\"polymorpheusOutletContext\", ctx.context);\n }\n },\n dependencies: [i1.PolymorpheusOutletDirective],\n encapsulation: 2,\n data: {\n animation: [TUI_PARENT_ANIMATION]\n },\n changeDetection: 0\n });\n return TuiHintUnstyledComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHintUnstyledDirective = /*#__PURE__*/(() => {\n class TuiHintUnstyledDirective {\n constructor(templateRef, hint) {\n hint.component = new PolymorpheusComponent(TuiHintUnstyledComponent);\n hint.content = templateRef;\n }\n }\n TuiHintUnstyledDirective.ɵfac = function TuiHintUnstyledDirective_Factory(t) {\n return new (t || TuiHintUnstyledDirective)(i0.ɵɵdirectiveInject(TemplateRef), i0.ɵɵdirectiveInject(TuiHintDirective));\n };\n TuiHintUnstyledDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintUnstyledDirective,\n selectors: [[\"ng-template\", \"tuiHint\", \"\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: POLYMORPHEUS_CONTEXT,\n useValue: {\n $implicit: {}\n }\n }])]\n });\n return TuiHintUnstyledDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHintModule = /*#__PURE__*/(() => {\n class TuiHintModule {}\n TuiHintModule.ɵfac = function TuiHintModule_Factory(t) {\n return new (t || TuiHintModule)();\n };\n TuiHintModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiHintModule\n });\n TuiHintModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, PolymorpheusModule]]\n });\n return TuiHintModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_HINT_COMPONENT, TUI_HINT_DEFAULT_OPTIONS, TUI_HINT_OPTIONS, TuiHintComponent, TuiHintDescribeDirective, TuiHintDirective, TuiHintDriverDirective, TuiHintHostDirective, TuiHintHoverDirective, TuiHintManualDirective, TuiHintModule, TuiHintOptionsDirective, TuiHintPointerDirective, TuiHintPositionDirective, TuiHintUnstyledComponent, TuiHintUnstyledDirective, tuiHintOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { Optional, Directive, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, DefaultValueAccessor } from '@angular/forms';\nimport { TUI_VALUE_ACCESSOR } from '@taiga-ui/core/tokens';\nlet TuiMaskAccessorDirective = /*#__PURE__*/(() => {\n class TuiMaskAccessorDirective {}\n TuiMaskAccessorDirective.ɵfac = function TuiMaskAccessorDirective_Factory(t) {\n return new (t || TuiMaskAccessorDirective)();\n };\n TuiMaskAccessorDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiMaskAccessorDirective,\n selectors: [[\"input\", \"tuiMaskAccessor\", \"\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: NG_VALUE_ACCESSOR,\n deps: [[new Optional(), TUI_VALUE_ACCESSOR], DefaultValueAccessor],\n multi: true,\n useFactory: (accessor, fallback) => accessor ? accessor[0] : fallback\n }])]\n });\n return TuiMaskAccessorDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @internal\n */\nlet TuiMaskAccessorModule = /*#__PURE__*/(() => {\n class TuiMaskAccessorModule {}\n TuiMaskAccessorModule.ɵfac = function TuiMaskAccessorModule_Factory(t) {\n return new (t || TuiMaskAccessorModule)();\n };\n TuiMaskAccessorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiMaskAccessorModule\n });\n TuiMaskAccessorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiMaskAccessorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiMaskAccessorDirective, TuiMaskAccessorModule };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Directive, Inject, Self, Input, NgModule } from '@angular/core';\nimport { TuiDestroyService } from '@taiga-ui/cdk';\nimport { TUI_SCROLL_INTO_VIEW } from '@taiga-ui/core/constants';\nimport * as i1 from 'rxjs';\nimport { timer } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * Directive scrolls element into view inside tui-scrollbar\n */\nlet TuiScrollIntoViewDirective = /*#__PURE__*/(() => {\n class TuiScrollIntoViewDirective {\n constructor(el, destroy$) {\n this.el = el;\n this.destroy$ = destroy$;\n }\n set tuiScrollIntoView(scroll) {\n if (!scroll) {\n return;\n }\n // Timeout is necessary in order to give element render cycle to get into its final spot\n // (for example if it is inside dropdown box which has to be positioned first)\n timer(0).pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.el.nativeElement.dispatchEvent(new CustomEvent(TUI_SCROLL_INTO_VIEW, {\n bubbles: true,\n detail: this.el.nativeElement\n }));\n });\n }\n }\n TuiScrollIntoViewDirective.ɵfac = function TuiScrollIntoViewDirective_Factory(t) {\n return new (t || TuiScrollIntoViewDirective)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TuiDestroyService, 2));\n };\n TuiScrollIntoViewDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiScrollIntoViewDirective,\n selectors: [[\"\", \"tuiScrollIntoView\", \"\"]],\n inputs: {\n tuiScrollIntoView: \"tuiScrollIntoView\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])]\n });\n return TuiScrollIntoViewDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiScrollIntoViewModule = /*#__PURE__*/(() => {\n class TuiScrollIntoViewModule {}\n TuiScrollIntoViewModule.ɵfac = function TuiScrollIntoViewModule_Factory(t) {\n return new (t || TuiScrollIntoViewModule)();\n };\n TuiScrollIntoViewModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiScrollIntoViewModule\n });\n TuiScrollIntoViewModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiScrollIntoViewModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiScrollIntoViewDirective, TuiScrollIntoViewModule };\n","import { tuiCreateToken, tuiProvideOptions, tuiCreateTokenFromFactory, AbstractTuiController, TuiDestroyService, tuiWatch } from '@taiga-ui/cdk';\nimport * as i0 from '@angular/core';\nimport { forwardRef, Directive, Input, NgModule, InjectionToken, ChangeDetectorRef } from '@angular/core';\nimport { TUI_TEXTFIELD_APPEARANCE } from '@taiga-ui/core/tokens';\nimport { merge, NEVER } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nclass TuiTextfieldController {\n constructor(change$, options, legacyAppearance, appearanceDirective, cleanerDirective, customContentDirective, iconDirective, iconLeftDirective, labelOutsideDirective, sizeDirective, prefixDirective, postfixDirective, fillerDirective) {\n this.change$ = change$;\n this.options = options;\n this.legacyAppearance = legacyAppearance;\n this.appearanceDirective = appearanceDirective;\n this.cleanerDirective = cleanerDirective;\n this.customContentDirective = customContentDirective;\n this.iconDirective = iconDirective;\n this.iconLeftDirective = iconLeftDirective;\n this.labelOutsideDirective = labelOutsideDirective;\n this.sizeDirective = sizeDirective;\n this.prefixDirective = prefixDirective;\n this.postfixDirective = postfixDirective;\n this.fillerDirective = fillerDirective;\n }\n get appearance() {\n return this.appearanceDirective.appearance || this.legacyAppearance;\n }\n get cleaner() {\n return this.cleanerDirective.cleaner;\n }\n get customContent() {\n return this.customContentDirective.customContent || ``;\n }\n get icon() {\n return this.iconDirective.icon;\n }\n get iconLeft() {\n return this.iconLeftDirective.iconLeft;\n }\n get labelOutside() {\n return this.labelOutsideDirective.labelOutside;\n }\n get size() {\n return this.sizeDirective.size;\n }\n get prefix() {\n return this.prefixDirective.prefix;\n }\n get postfix() {\n return this.postfixDirective.postfix;\n }\n get filler() {\n return this.fillerDirective.filler;\n }\n}\n\n/** Default values for primitive textfield options */\nconst TUI_TEXTFIELD_DEFAULT_OPTIONS = {\n iconCleaner: `tuiIconClose`,\n hintOnDisabled: false\n};\n/**\n * Default parameters for textfield\n */\nconst TUI_TEXTFIELD_OPTIONS = tuiCreateToken(TUI_TEXTFIELD_DEFAULT_OPTIONS);\nfunction tuiTextfieldOptionsProvider(options) {\n return tuiProvideOptions(TUI_TEXTFIELD_OPTIONS, options, TUI_TEXTFIELD_DEFAULT_OPTIONS);\n}\n\n// TODO: rename to TUI_TEXTFIELD_APPEARANCE in v4\nconst TUI_TEXTFIELD_APPEARANCE_DIRECTIVE = tuiCreateTokenFromFactory(() => new TuiTextfieldAppearanceDirective());\nlet TuiTextfieldAppearanceDirective = /*#__PURE__*/(() => {\n class TuiTextfieldAppearanceDirective extends AbstractTuiController {\n constructor() {\n super(...arguments);\n // it's an empty string by default for backward compatibility\n // (see comment https://github.com/taiga-family/taiga-ui/pull/3007#issuecomment-1315179508)\n this.appearance = '';\n }\n }\n TuiTextfieldAppearanceDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiTextfieldAppearanceDirective_BaseFactory;\n return function TuiTextfieldAppearanceDirective_Factory(t) {\n return (ɵTuiTextfieldAppearanceDirective_BaseFactory || (ɵTuiTextfieldAppearanceDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiTextfieldAppearanceDirective)))(t || TuiTextfieldAppearanceDirective);\n };\n })();\n TuiTextfieldAppearanceDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTextfieldAppearanceDirective,\n selectors: [[\"\", \"tuiTextfieldAppearance\", \"\"]],\n inputs: {\n appearance: [\"tuiTextfieldAppearance\", \"appearance\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_TEXTFIELD_APPEARANCE_DIRECTIVE,\n useExisting: forwardRef(() => TuiTextfieldAppearanceDirective)\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiTextfieldAppearanceDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_TEXTFIELD_CLEANER = tuiCreateTokenFromFactory(() => new TuiTextfieldCleanerDirective());\nlet TuiTextfieldCleanerDirective = /*#__PURE__*/(() => {\n class TuiTextfieldCleanerDirective extends AbstractTuiController {\n constructor() {\n super(...arguments);\n this.cleaner = false;\n }\n }\n TuiTextfieldCleanerDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiTextfieldCleanerDirective_BaseFactory;\n return function TuiTextfieldCleanerDirective_Factory(t) {\n return (ɵTuiTextfieldCleanerDirective_BaseFactory || (ɵTuiTextfieldCleanerDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiTextfieldCleanerDirective)))(t || TuiTextfieldCleanerDirective);\n };\n })();\n TuiTextfieldCleanerDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTextfieldCleanerDirective,\n selectors: [[\"\", \"tuiTextfieldCleaner\", \"\"]],\n inputs: {\n cleaner: [\"tuiTextfieldCleaner\", \"cleaner\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_TEXTFIELD_CLEANER,\n useExisting: forwardRef(() => TuiTextfieldCleanerDirective)\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiTextfieldCleanerDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_TEXTFIELD_CUSTOM_CONTENT = tuiCreateTokenFromFactory(() => new TuiTextfieldCustomContentDirective());\nlet TuiTextfieldCustomContentDirective = /*#__PURE__*/(() => {\n class TuiTextfieldCustomContentDirective extends AbstractTuiController {}\n TuiTextfieldCustomContentDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiTextfieldCustomContentDirective_BaseFactory;\n return function TuiTextfieldCustomContentDirective_Factory(t) {\n return (ɵTuiTextfieldCustomContentDirective_BaseFactory || (ɵTuiTextfieldCustomContentDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiTextfieldCustomContentDirective)))(t || TuiTextfieldCustomContentDirective);\n };\n })();\n TuiTextfieldCustomContentDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTextfieldCustomContentDirective,\n selectors: [[\"\", \"tuiTextfieldCustomContent\", \"\"]],\n inputs: {\n customContent: [\"tuiTextfieldCustomContent\", \"customContent\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_TEXTFIELD_CUSTOM_CONTENT,\n useExisting: forwardRef(() => TuiTextfieldCustomContentDirective)\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiTextfieldCustomContentDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_TEXTFIELD_FILLER = tuiCreateTokenFromFactory(() => new TuiTextfieldFillerDirective());\nlet TuiTextfieldFillerDirective = /*#__PURE__*/(() => {\n class TuiTextfieldFillerDirective extends AbstractTuiController {\n constructor() {\n super(...arguments);\n this.filler = '';\n }\n }\n TuiTextfieldFillerDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiTextfieldFillerDirective_BaseFactory;\n return function TuiTextfieldFillerDirective_Factory(t) {\n return (ɵTuiTextfieldFillerDirective_BaseFactory || (ɵTuiTextfieldFillerDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiTextfieldFillerDirective)))(t || TuiTextfieldFillerDirective);\n };\n })();\n TuiTextfieldFillerDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTextfieldFillerDirective,\n selectors: [[\"\", \"tuiTextfieldFiller\", \"\"]],\n inputs: {\n filler: [\"tuiTextfieldFiller\", \"filler\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_TEXTFIELD_FILLER,\n useExisting: forwardRef(() => TuiTextfieldFillerDirective)\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiTextfieldFillerDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_TEXTFIELD_ICON = tuiCreateTokenFromFactory(() => new TuiTextfieldIconDirective());\nlet TuiTextfieldIconDirective = /*#__PURE__*/(() => {\n class TuiTextfieldIconDirective extends AbstractTuiController {}\n TuiTextfieldIconDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiTextfieldIconDirective_BaseFactory;\n return function TuiTextfieldIconDirective_Factory(t) {\n return (ɵTuiTextfieldIconDirective_BaseFactory || (ɵTuiTextfieldIconDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiTextfieldIconDirective)))(t || TuiTextfieldIconDirective);\n };\n })();\n TuiTextfieldIconDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTextfieldIconDirective,\n selectors: [[\"\", \"tuiTextfieldIcon\", \"\"]],\n inputs: {\n icon: [\"tuiTextfieldIcon\", \"icon\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_TEXTFIELD_ICON,\n useExisting: forwardRef(() => TuiTextfieldIconDirective)\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiTextfieldIconDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_TEXTFIELD_ICON_LEFT = tuiCreateTokenFromFactory(() => new TuiTextfieldIconLeftDirective());\nlet TuiTextfieldIconLeftDirective = /*#__PURE__*/(() => {\n class TuiTextfieldIconLeftDirective extends AbstractTuiController {}\n TuiTextfieldIconLeftDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiTextfieldIconLeftDirective_BaseFactory;\n return function TuiTextfieldIconLeftDirective_Factory(t) {\n return (ɵTuiTextfieldIconLeftDirective_BaseFactory || (ɵTuiTextfieldIconLeftDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiTextfieldIconLeftDirective)))(t || TuiTextfieldIconLeftDirective);\n };\n })();\n TuiTextfieldIconLeftDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTextfieldIconLeftDirective,\n selectors: [[\"\", \"tuiTextfieldIconLeft\", \"\"]],\n inputs: {\n iconLeft: [\"tuiTextfieldIconLeft\", \"iconLeft\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_TEXTFIELD_ICON_LEFT,\n useExisting: forwardRef(() => TuiTextfieldIconLeftDirective)\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiTextfieldIconLeftDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_TEXTFIELD_LABEL_OUTSIDE = tuiCreateTokenFromFactory(() => new TuiTextfieldLabelOutsideDirective());\nlet TuiTextfieldLabelOutsideDirective = /*#__PURE__*/(() => {\n class TuiTextfieldLabelOutsideDirective extends AbstractTuiController {\n constructor() {\n super(...arguments);\n this.labelOutside = false;\n }\n }\n TuiTextfieldLabelOutsideDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiTextfieldLabelOutsideDirective_BaseFactory;\n return function TuiTextfieldLabelOutsideDirective_Factory(t) {\n return (ɵTuiTextfieldLabelOutsideDirective_BaseFactory || (ɵTuiTextfieldLabelOutsideDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiTextfieldLabelOutsideDirective)))(t || TuiTextfieldLabelOutsideDirective);\n };\n })();\n TuiTextfieldLabelOutsideDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTextfieldLabelOutsideDirective,\n selectors: [[\"\", \"tuiTextfieldLabelOutside\", \"\"]],\n inputs: {\n labelOutside: [\"tuiTextfieldLabelOutside\", \"labelOutside\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_TEXTFIELD_LABEL_OUTSIDE,\n useExisting: forwardRef(() => TuiTextfieldLabelOutsideDirective)\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiTextfieldLabelOutsideDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_TEXTFIELD_POSTFIX = tuiCreateTokenFromFactory(() => new TuiTextfieldPostfixDirective());\nlet TuiTextfieldPostfixDirective = /*#__PURE__*/(() => {\n class TuiTextfieldPostfixDirective extends AbstractTuiController {\n constructor() {\n super(...arguments);\n this.postfix = '';\n }\n }\n TuiTextfieldPostfixDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiTextfieldPostfixDirective_BaseFactory;\n return function TuiTextfieldPostfixDirective_Factory(t) {\n return (ɵTuiTextfieldPostfixDirective_BaseFactory || (ɵTuiTextfieldPostfixDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiTextfieldPostfixDirective)))(t || TuiTextfieldPostfixDirective);\n };\n })();\n TuiTextfieldPostfixDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTextfieldPostfixDirective,\n selectors: [[\"\", \"tuiTextfieldPostfix\", \"\"]],\n inputs: {\n postfix: [\"tuiTextfieldPostfix\", \"postfix\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_TEXTFIELD_POSTFIX,\n useExisting: forwardRef(() => TuiTextfieldPostfixDirective)\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiTextfieldPostfixDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_TEXTFIELD_PREFIX = tuiCreateTokenFromFactory(() => new TuiTextfieldPrefixDirective());\nlet TuiTextfieldPrefixDirective = /*#__PURE__*/(() => {\n class TuiTextfieldPrefixDirective extends AbstractTuiController {\n constructor() {\n super(...arguments);\n this.prefix = '';\n }\n }\n TuiTextfieldPrefixDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiTextfieldPrefixDirective_BaseFactory;\n return function TuiTextfieldPrefixDirective_Factory(t) {\n return (ɵTuiTextfieldPrefixDirective_BaseFactory || (ɵTuiTextfieldPrefixDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiTextfieldPrefixDirective)))(t || TuiTextfieldPrefixDirective);\n };\n })();\n TuiTextfieldPrefixDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTextfieldPrefixDirective,\n selectors: [[\"\", \"tuiTextfieldPrefix\", \"\"]],\n inputs: {\n prefix: [\"tuiTextfieldPrefix\", \"prefix\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_TEXTFIELD_PREFIX,\n useExisting: forwardRef(() => TuiTextfieldPrefixDirective)\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiTextfieldPrefixDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_TEXTFIELD_SIZE = tuiCreateTokenFromFactory(() => new TuiTextfieldSizeDirective());\nlet TuiTextfieldSizeDirective = /*#__PURE__*/(() => {\n class TuiTextfieldSizeDirective extends AbstractTuiController {\n constructor() {\n super(...arguments);\n this.size = 'l';\n }\n }\n TuiTextfieldSizeDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiTextfieldSizeDirective_BaseFactory;\n return function TuiTextfieldSizeDirective_Factory(t) {\n return (ɵTuiTextfieldSizeDirective_BaseFactory || (ɵTuiTextfieldSizeDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiTextfieldSizeDirective)))(t || TuiTextfieldSizeDirective);\n };\n })();\n TuiTextfieldSizeDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTextfieldSizeDirective,\n selectors: [[\"\", \"tuiTextfieldSize\", \"\"]],\n inputs: {\n size: [\"tuiTextfieldSize\", \"size\"]\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: TUI_TEXTFIELD_SIZE,\n useExisting: forwardRef(() => TuiTextfieldSizeDirective)\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiTextfieldSizeDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTextfieldControllerModule = /*#__PURE__*/(() => {\n class TuiTextfieldControllerModule {}\n TuiTextfieldControllerModule.ɵfac = function TuiTextfieldControllerModule_Factory(t) {\n return new (t || TuiTextfieldControllerModule)();\n };\n TuiTextfieldControllerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTextfieldControllerModule\n });\n TuiTextfieldControllerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiTextfieldControllerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_TEXTFIELD_WATCHED_CONTROLLER = new InjectionToken(`[TUI_TEXTFIELD_WATCHED_CONTROLLER]`);\nconst TEXTFIELD_CONTROLLER_PROVIDER = [TuiDestroyService, {\n provide: TUI_TEXTFIELD_WATCHED_CONTROLLER,\n deps: [ChangeDetectorRef, TuiDestroyService, TUI_TEXTFIELD_OPTIONS, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_APPEARANCE_DIRECTIVE, TUI_TEXTFIELD_CLEANER, TUI_TEXTFIELD_CUSTOM_CONTENT, TUI_TEXTFIELD_ICON, TUI_TEXTFIELD_ICON_LEFT, TUI_TEXTFIELD_LABEL_OUTSIDE, TUI_TEXTFIELD_SIZE, TUI_TEXTFIELD_PREFIX, TUI_TEXTFIELD_POSTFIX, TUI_TEXTFIELD_FILLER],\n useFactory: (cdr, destroy$, options, legacyAppearance, ...controllers) => {\n const change$ = merge(...controllers.map(({\n change$\n }) => change$ || NEVER)).pipe(tuiWatch(cdr), takeUntil(destroy$));\n change$.subscribe();\n return new TuiTextfieldController(change$, options, legacyAppearance, ...controllers);\n }\n}];\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TEXTFIELD_CONTROLLER_PROVIDER, TUI_TEXTFIELD_APPEARANCE_DIRECTIVE, TUI_TEXTFIELD_CLEANER, TUI_TEXTFIELD_CUSTOM_CONTENT, TUI_TEXTFIELD_DEFAULT_OPTIONS, TUI_TEXTFIELD_FILLER, TUI_TEXTFIELD_ICON, TUI_TEXTFIELD_ICON_LEFT, TUI_TEXTFIELD_LABEL_OUTSIDE, TUI_TEXTFIELD_OPTIONS, TUI_TEXTFIELD_POSTFIX, TUI_TEXTFIELD_PREFIX, TUI_TEXTFIELD_SIZE, TUI_TEXTFIELD_WATCHED_CONTROLLER, TuiTextfieldAppearanceDirective, TuiTextfieldCleanerDirective, TuiTextfieldController, TuiTextfieldControllerModule, TuiTextfieldCustomContentDirective, TuiTextfieldFillerDirective, TuiTextfieldIconDirective, TuiTextfieldIconLeftDirective, TuiTextfieldLabelOutsideDirective, TuiTextfieldPostfixDirective, TuiTextfieldPrefixDirective, TuiTextfieldSizeDirective, tuiTextfieldOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, HostBinding, NgModule } from '@angular/core';\nimport * as i1 from '@taiga-ui/cdk';\nimport { TuiMonth, TUI_FIRST_DAY, TUI_LAST_DAY, ALWAYS_FALSE_HANDLER, TuiMonthRange, TuiYear, tuiInRange, TuiHoveredModule, TuiPressedModule, TuiRepeatTimesModule, TuiLetModule } from '@taiga-ui/cdk';\nimport { TuiInteractiveState, TuiRangeState } from '@taiga-ui/core/enums';\nimport * as i2 from '@taiga-ui/core/directives/scroll-into-view';\nimport { TuiScrollIntoViewModule } from '@taiga-ui/core/directives/scroll-into-view';\nfunction TuiPrimitiveYearPickerComponent_div_0_ng_container_1_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 4);\n i0.ɵɵlistener(\"click\", function TuiPrimitiveYearPickerComponent_div_0_ng_container_1_div_1_Template_div_click_0_listener() {\n const restoredCtx = i0.ɵɵrestoreView(_r7);\n const item_r5 = restoredCtx.tuiLet;\n const ctx_r6 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r6.onItemClick(item_r5));\n })(\"tuiHoveredChange\", function TuiPrimitiveYearPickerComponent_div_0_ng_container_1_div_1_Template_div_tuiHoveredChange_0_listener($event) {\n const restoredCtx = i0.ɵɵrestoreView(_r7);\n const item_r5 = restoredCtx.tuiLet;\n const ctx_r8 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r8.onItemHovered($event, item_r5));\n })(\"tuiPressedChange\", function TuiPrimitiveYearPickerComponent_div_0_ng_container_1_div_1_Template_div_tuiPressedChange_0_listener($event) {\n const restoredCtx = i0.ɵɵrestoreView(_r7);\n const item_r5 = restoredCtx.tuiLet;\n const ctx_r9 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r9.onItemPressed($event, item_r5));\n });\n i0.ɵɵelementStart(1, \"div\", 5);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const item_r5 = ctx.tuiLet;\n const ctx_r4 = i0.ɵɵnextContext(3);\n i0.ɵɵclassProp(\"t-cell_interval\", ctx_r4.itemIsInterval(item_r5))(\"t-cell_today\", ctx_r4.itemIsToday(item_r5));\n i0.ɵɵproperty(\"tuiScrollIntoView\", ctx_r4.scrollItemIntoView(item_r5));\n i0.ɵɵattribute(\"data-range\", ctx_r4.getItemRange(item_r5))(\"data-state\", ctx_r4.getItemState(item_r5));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(item_r5);\n }\n}\nfunction TuiPrimitiveYearPickerComponent_div_0_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiPrimitiveYearPickerComponent_div_0_ng_container_1_div_1_Template, 3, 8, \"div\", 3);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const colIndex_r3 = ctx.$implicit;\n const rowIndex_r1 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"tuiLet\", ctx_r2.getItem(rowIndex_r1, colIndex_r3));\n }\n}\nfunction TuiPrimitiveYearPickerComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 1);\n i0.ɵɵtemplate(1, TuiPrimitiveYearPickerComponent_div_0_ng_container_1_Template, 2, 1, \"ng-container\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"tuiRepeatTimesOf\", 4);\n }\n}\nconst LIMIT = 100;\nconst ITEMS_IN_ROW = 4;\nlet TuiPrimitiveYearPickerComponent = /*#__PURE__*/(() => {\n class TuiPrimitiveYearPickerComponent {\n constructor() {\n this.hoveredItem = null;\n this.pressedItem = null;\n this.currentYear = TuiMonth.currentLocal().year;\n this.value = null;\n this.initialItem = TuiMonth.currentLocal();\n this.min = TUI_FIRST_DAY;\n this.max = TUI_LAST_DAY;\n this.disabledItemHandler = ALWAYS_FALSE_HANDLER;\n this.yearClick = new EventEmitter();\n }\n get computedMin() {\n var _a;\n return (_a = this.min) !== null && _a !== void 0 ? _a : TUI_FIRST_DAY;\n }\n get computedMax() {\n var _a;\n return (_a = this.max) !== null && _a !== void 0 ? _a : TUI_LAST_DAY;\n }\n get isSingle() {\n return this.isRange(this.value) && this.value.from.yearSame(this.value.to);\n }\n get rows() {\n return Math.ceil((this.calculatedMax - this.calculatedMin) / ITEMS_IN_ROW);\n }\n get calculatedMin() {\n const initial = this.initialItem.year - LIMIT;\n const min = this.computedMin;\n return min.year > initial ? min.year : initial;\n }\n get calculatedMax() {\n const initial = this.initialItem.year + LIMIT;\n const max = this.computedMax;\n return max.year < initial ? max.year + 1 : initial;\n }\n isRange(item) {\n return item instanceof TuiMonthRange;\n }\n scrollItemIntoView(item) {\n return this.initialItem.year === item;\n }\n getItem(rowIndex, colIndex) {\n return rowIndex * ITEMS_IN_ROW + colIndex + this.calculatedMin;\n }\n getItemState(item) {\n const {\n disabledItemHandler,\n pressedItem,\n hoveredItem\n } = this;\n const max = this.computedMax;\n if (max.year < item || disabledItemHandler !== ALWAYS_FALSE_HANDLER && disabledItemHandler(item)) {\n return TuiInteractiveState.Disabled;\n }\n if (pressedItem === item) {\n return TuiInteractiveState.Active;\n }\n if (hoveredItem === item) {\n return TuiInteractiveState.Hover;\n }\n return null;\n }\n getItemRange(item) {\n const {\n value,\n hoveredItem\n } = this;\n if (value === null) {\n return null;\n }\n if (value instanceof TuiYear) {\n return value.year === item ? TuiRangeState.Single : null;\n }\n if (!(value instanceof TuiMonthRange)) {\n return value.find(day => day.year === item) ? TuiRangeState.Single : null;\n }\n if (value.from.year === item && !value.from.yearSame(value.to) || hoveredItem !== null && hoveredItem > value.from.year && value.from.year === item && value.from.yearSame(value.to) || hoveredItem !== null && hoveredItem === item && hoveredItem < value.from.year && value.from.yearSame(value.to)) {\n return TuiRangeState.Start;\n }\n if (value.to.year === item && !value.from.yearSame(value.to) || hoveredItem !== null && hoveredItem < value.from.year && value.from.year === item && value.from.yearSame(value.to) || hoveredItem !== null && hoveredItem === item && hoveredItem > value.from.year && value.from.yearSame(value.to)) {\n return TuiRangeState.End;\n }\n return value.from.yearSame(value.to) && value.from.year === item ? TuiRangeState.Single : null;\n }\n itemIsToday(item) {\n return this.currentYear === item;\n }\n itemIsInterval(item) {\n const {\n value,\n hoveredItem\n } = this;\n if (value === null || !this.isRange(value)) {\n return false;\n }\n if (!value.from.yearSame(value.to)) {\n return value.from.year <= item && value.to.year > item;\n }\n if (hoveredItem === null || value.from.year === hoveredItem) {\n return false;\n }\n return tuiInRange(item, Math.min(value.from.year, hoveredItem), Math.max(value.from.year, hoveredItem));\n }\n onItemHovered(hovered, item) {\n this.updateHoveredItem(hovered, item);\n }\n onItemPressed(pressed, item) {\n this.updatePressedItem(pressed, item);\n }\n onItemClick(item) {\n this.yearClick.emit(new TuiYear(item));\n }\n updateHoveredItem(hovered, item) {\n this.hoveredItem = hovered ? item : null;\n }\n updatePressedItem(pressed, item) {\n this.pressedItem = pressed ? item : null;\n }\n }\n TuiPrimitiveYearPickerComponent.ɵfac = function TuiPrimitiveYearPickerComponent_Factory(t) {\n return new (t || TuiPrimitiveYearPickerComponent)();\n };\n TuiPrimitiveYearPickerComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPrimitiveYearPickerComponent,\n selectors: [[\"tui-primitive-year-picker\"]],\n hostVars: 2,\n hostBindings: function TuiPrimitiveYearPickerComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"_single\", ctx.isSingle);\n }\n },\n inputs: {\n value: \"value\",\n initialItem: \"initialItem\",\n min: \"min\",\n max: \"max\",\n disabledItemHandler: \"disabledItemHandler\"\n },\n outputs: {\n yearClick: \"yearClick\"\n },\n decls: 1,\n vars: 1,\n consts: [[\"automation-id\", \"tui-primitive-year-picker__row\", \"class\", \"t-row\", 4, \"tuiRepeatTimes\", \"tuiRepeatTimesOf\"], [\"automation-id\", \"tui-primitive-year-picker__row\", 1, \"t-row\"], [4, \"tuiRepeatTimes\", \"tuiRepeatTimesOf\"], [\"automation-id\", \"tui-primitive-year-picker__cell\", \"class\", \"t-cell\", 3, \"t-cell_interval\", \"t-cell_today\", \"tuiScrollIntoView\", \"click\", \"tuiHoveredChange\", \"tuiPressedChange\", 4, \"tuiLet\"], [\"automation-id\", \"tui-primitive-year-picker__cell\", 1, \"t-cell\", 3, \"tuiScrollIntoView\", \"click\", \"tuiHoveredChange\", \"tuiPressedChange\"], [1, \"t-item\"]],\n template: function TuiPrimitiveYearPickerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiPrimitiveYearPickerComponent_div_0_Template, 2, 1, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiRepeatTimesOf\", ctx.rows);\n }\n },\n dependencies: [i1.TuiRepeatTimesDirective, i1.TuiLetDirective, i2.TuiScrollIntoViewDirective, i1.TuiHoveredDirective, i1.TuiPressedDirective],\n styles: [\"[_nghost-%COMP%]{display:block;font:var(--tui-font-text-m)}.t-row[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:space-between;height:2.25rem;isolation:isolate}.t-item[_ngcontent-%COMP%]{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item[_ngcontent-%COMP%]:before, .t-item[_ngcontent-%COMP%]:after{content:\\\"\\\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-item[_ngcontent-%COMP%]:after{border-radius:.5rem}.t-cell[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:3.9375rem;text-align:center;outline:none;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:.125rem solid transparent}.t-cell[_ngcontent-%COMP%]:before{content:\\\"\\\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today[_ngcontent-%COMP%]:after{position:absolute;left:50%;transform:translate(-50%);content:\\\"\\\";bottom:.3125rem;height:.125rem;width:.75rem;border-radius:.375rem;background-color:var(--tui-text-01)}.t-cell_interval[_ngcontent-%COMP%]:before{background:var(--tui-base-02)}._single[_nghost-%COMP%] .t-cell_interval[_ngcontent-%COMP%]:before{background:var(--tui-secondary-hover)}.t-cell_interval[_ngcontent-%COMP%]:not(:last-child):before{right:-.25rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell_interval[_ngcontent-%COMP%]:not([data-range=\\\"start\\\"]):not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell_interval[_ngcontent-%COMP%]:last-child:first-child:before{right:0}.t-cell_interval[_ngcontent-%COMP%]:first-child > .t-item[_ngcontent-%COMP%]{border-top-left-radius:var(--tui-radius-m);border-bottom-left-radius:var(--tui-radius-m)}.t-cell_interval[_ngcontent-%COMP%]:last-child > .t-item[_ngcontent-%COMP%]{border-top-right-radius:var(--tui-radius-m);border-bottom-right-radius:var(--tui-radius-m)}.t-cell_interval[_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{border-radius:0}.t-cell[data-range][_ngcontent-%COMP%]:after{background-color:var(--tui-primary-text)}.t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{color:var(--tui-primary-text)}.t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary)}.t-cell[data-range][data-state=hover][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][data-state=hover][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary-hover)}.t-cell[data-range][data-state=active][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][data-state=active][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary-active)}.t-cell[data-range=end][_ngcontent-%COMP%]:before{background:var(--tui-base-02)}._single[_nghost-%COMP%] .t-cell[data-range=end][_ngcontent-%COMP%]:before{background:var(--tui-secondary-hover)}.t-cell[data-range=end][_ngcontent-%COMP%]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before{left:.625rem;border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{left:-2rem;right:100%;transform:translate(1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=start][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before{right:.625rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{left:100%;right:-2rem;transform:translate(-1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=single][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{display:none}.t-cell[data-state=disabled][_ngcontent-%COMP%]{pointer-events:none}.t-cell[data-state=disabled][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{opacity:.36}.t-cell[data-state=hover][_ngcontent-%COMP%]:hover:not([data-range]) > .t-item[_ngcontent-%COMP%]{background-color:var(--tui-secondary-hover)}.t-cell[data-state=active][_ngcontent-%COMP%]:hover:not([data-range]) > .t-item[_ngcontent-%COMP%]{background-color:var(--tui-secondary-active)}[_nghost-%COMP%]{width:15.75rem}.t-row[_ngcontent-%COMP%]{margin:.875rem 0}.t-row[_ngcontent-%COMP%]:first-child{margin-top:0}.t-row[_ngcontent-%COMP%]:last-child{margin-bottom:0}\"],\n changeDetection: 0\n });\n return TuiPrimitiveYearPickerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPrimitiveYearPickerModule = /*#__PURE__*/(() => {\n class TuiPrimitiveYearPickerModule {}\n TuiPrimitiveYearPickerModule.ɵfac = function TuiPrimitiveYearPickerModule_Factory(t) {\n return new (t || TuiPrimitiveYearPickerModule)();\n };\n TuiPrimitiveYearPickerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPrimitiveYearPickerModule\n });\n TuiPrimitiveYearPickerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[TuiHoveredModule, TuiPressedModule, TuiRepeatTimesModule, TuiLetModule, TuiScrollIntoViewModule]]\n });\n return TuiPrimitiveYearPickerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiPrimitiveYearPickerComponent, TuiPrimitiveYearPickerModule };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, ElementRef, Component, ChangeDetectionStrategy, Inject, Input, Output, HostListener, NgModule } from '@angular/core';\nimport { AbstractTuiInteractive, tuiIsNativeFocusedIn } from '@taiga-ui/cdk';\nimport { TUI_SPIN_ICONS, TUI_SPIN_TEXTS } from '@taiga-ui/core/tokens';\nimport * as i1 from '@taiga-ui/core/components/button';\nimport { TuiButtonModule } from '@taiga-ui/core/components/button';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from 'rxjs';\nfunction TuiPrimitiveSpinButtonComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"button\", 1);\n i0.ɵɵlistener(\"click\", function TuiPrimitiveSpinButtonComponent_ng_container_0_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r3);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onLeftClick());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"span\", 2);\n i0.ɵɵprojection(3);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"button\", 3);\n i0.ɵɵlistener(\"click\", function TuiPrimitiveSpinButtonComponent_ng_container_0_Template_button_click_4_listener() {\n i0.ɵɵrestoreView(_r3);\n const ctx_r4 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r4.onRightClick());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const texts_r1 = ctx.ngIf;\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵclassProp(\"t-hidden\", ctx_r0.leftComputedDisabled);\n i0.ɵɵproperty(\"focusable\", ctx_r0.computedFocusable)(\"icon\", ctx_r0.icons.decrement)(\"title\", texts_r1[0]);\n i0.ɵɵadvance(3);\n i0.ɵɵclassProp(\"t-hidden\", ctx_r0.rightComputedDisabled);\n i0.ɵɵproperty(\"focusable\", ctx_r0.computedFocusable)(\"icon\", ctx_r0.icons.increment)(\"title\", texts_r1[1]);\n }\n}\nconst _c0 = [\"*\"];\nlet TuiPrimitiveSpinButtonComponent = /*#__PURE__*/(() => {\n class TuiPrimitiveSpinButtonComponent extends AbstractTuiInteractive {\n constructor(el, icons, spinTexts$) {\n super();\n this.el = el;\n this.icons = icons;\n this.spinTexts$ = spinTexts$;\n this.disabled = false;\n this.leftDisabled = false;\n this.rightDisabled = false;\n this.leftClick = new EventEmitter();\n this.rightClick = new EventEmitter();\n }\n get focused() {\n return tuiIsNativeFocusedIn(this.el.nativeElement);\n }\n get leftComputedDisabled() {\n return this.computedDisabled || this.leftDisabled;\n }\n get rightComputedDisabled() {\n return this.computedDisabled || this.rightDisabled;\n }\n onLeftClick() {\n if (!this.leftComputedDisabled) {\n this.leftClick.emit();\n }\n }\n onRightClick() {\n if (!this.rightComputedDisabled) {\n this.rightClick.emit();\n }\n }\n onFocused(focused) {\n this.updateFocused(focused);\n }\n onFocusVisible(focusVisible) {\n this.updateFocusVisible(focusVisible);\n }\n }\n TuiPrimitiveSpinButtonComponent.ɵfac = function TuiPrimitiveSpinButtonComponent_Factory(t) {\n return new (t || TuiPrimitiveSpinButtonComponent)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_SPIN_ICONS), i0.ɵɵdirectiveInject(TUI_SPIN_TEXTS));\n };\n TuiPrimitiveSpinButtonComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPrimitiveSpinButtonComponent,\n selectors: [[\"tui-primitive-spin-button\"]],\n hostBindings: function TuiPrimitiveSpinButtonComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mousedown.silent.prevent\", function TuiPrimitiveSpinButtonComponent_mousedown_silent_prevent_HostBindingHandler() {\n return 0;\n })(\"keydown.arrowLeft.prevent\", function TuiPrimitiveSpinButtonComponent_keydown_arrowLeft_prevent_HostBindingHandler() {\n return ctx.onLeftClick();\n })(\"keydown.arrowRight.prevent\", function TuiPrimitiveSpinButtonComponent_keydown_arrowRight_prevent_HostBindingHandler() {\n return ctx.onRightClick();\n })(\"focusin\", function TuiPrimitiveSpinButtonComponent_focusin_HostBindingHandler() {\n return ctx.onFocused(true);\n })(\"focusout\", function TuiPrimitiveSpinButtonComponent_focusout_HostBindingHandler() {\n return ctx.onFocused(false);\n });\n }\n },\n inputs: {\n disabled: \"disabled\",\n leftDisabled: \"leftDisabled\",\n rightDisabled: \"rightDisabled\"\n },\n outputs: {\n leftClick: \"leftClick\",\n rightClick: \"rightClick\"\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c0,\n decls: 2,\n vars: 3,\n consts: [[4, \"ngIf\"], [\"appearance\", \"flat\", \"automation-id\", \"tui-primitive-spin-button__left\", \"size\", \"xs\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"title\", \"click\"], [1, \"t-content\", \"t-calendar-title\"], [\"appearance\", \"flat\", \"automation-id\", \"tui-primitive-spin-button__right\", \"size\", \"xs\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"title\", \"click\"]],\n template: function TuiPrimitiveSpinButtonComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, TuiPrimitiveSpinButtonComponent_ng_container_0_Template, 5, 10, \"ng-container\", 0);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.spinTexts$));\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.NgIf, i2.AsyncPipe],\n styles: [\"[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--tui-font-text-l);text-align:center;font-weight:bold}.t-hidden[_ngcontent-%COMP%]{visibility:hidden}.t-content[_ngcontent-%COMP%]{padding:0 .5rem}\"],\n changeDetection: 0\n });\n return TuiPrimitiveSpinButtonComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPrimitiveSpinButtonModule = /*#__PURE__*/(() => {\n class TuiPrimitiveSpinButtonModule {}\n TuiPrimitiveSpinButtonModule.ɵfac = function TuiPrimitiveSpinButtonModule_Factory(t) {\n return new (t || TuiPrimitiveSpinButtonModule)();\n };\n TuiPrimitiveSpinButtonModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPrimitiveSpinButtonModule\n });\n TuiPrimitiveSpinButtonModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiButtonModule]]\n });\n return TuiPrimitiveSpinButtonModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiPrimitiveSpinButtonComponent, TuiPrimitiveSpinButtonModule };\n","import * as i0 from '@angular/core';\nimport { Pipe, Inject, NgModule } from '@angular/core';\nimport * as i1 from '@taiga-ui/cdk';\nimport { DAYS_IN_WEEK, tuiAssert, tuiInRange, TuiDay } from '@taiga-ui/cdk';\nimport { TUI_FIRST_DAY_OF_WEEK } from '@taiga-ui/core/tokens';\n\n/**\n * Computes day of week offset of the beginning of the month\n */\nconst getMonthStartDaysOffset = (month, firstDayOfWeek) => {\n const startMonthOffsetFromSunday = new Date(month.year, month.month, 1).getDay();\n return startMonthOffsetFromSunday >= firstDayOfWeek ? startMonthOffsetFromSunday - firstDayOfWeek : DAYS_IN_WEEK - (firstDayOfWeek - startMonthOffsetFromSunday);\n};\n/**\n * Calculated day on a calendar grid\n * @return resulting day on these coordinates (could exceed passed month)\n */\nconst getDayFromMonthRowCol = ({\n month,\n rowIndex,\n colIndex,\n firstDayOfWeek\n}) => {\n ngDevMode && tuiAssert.assert(Number.isInteger(rowIndex));\n ngDevMode && tuiAssert.assert(tuiInRange(rowIndex, 0, 6));\n ngDevMode && tuiAssert.assert(Number.isInteger(colIndex));\n ngDevMode && tuiAssert.assert(tuiInRange(colIndex, 0, DAYS_IN_WEEK));\n let day = rowIndex * DAYS_IN_WEEK + colIndex - getMonthStartDaysOffset(month, firstDayOfWeek) + 1;\n if (day > month.daysCount) {\n day -= month.daysCount;\n month = month.append({\n month: 1\n });\n }\n if (day <= 0) {\n month = month.append({\n month: -1\n });\n day = month.daysCount + day;\n }\n return new TuiDay(month.year, month.month, day);\n};\nconst CALENDAR_ROWS_COUNT = 6;\nlet TuiCalendarSheetPipe = /*#__PURE__*/(() => {\n class TuiCalendarSheetPipe {\n constructor(firstDayOfWeek) {\n this.firstDayOfWeek = firstDayOfWeek;\n this.currentMonth = null;\n this.currentSheet = [];\n }\n transform(month, showAdjacentDays = false) {\n var _a;\n if ((_a = this.currentMonth) === null || _a === void 0 ? void 0 : _a.monthSame(month)) {\n return this.currentSheet;\n }\n const sheet = [];\n for (let rowIndex = 0; rowIndex < CALENDAR_ROWS_COUNT; rowIndex++) {\n const row = [];\n for (let colIndex = 0; colIndex < DAYS_IN_WEEK; colIndex++) {\n const day = getDayFromMonthRowCol({\n month,\n rowIndex,\n colIndex,\n firstDayOfWeek: this.firstDayOfWeek\n });\n const isPrevMonthDay = (day, relativeToMonth = month) => day.year < relativeToMonth.year || day.month < relativeToMonth.month;\n const isNextMonthDay = (day, relativeToMonth = month) => day.year > relativeToMonth.year || day.month > relativeToMonth.month;\n if (isPrevMonthDay(day) && !showAdjacentDays) {\n continue;\n }\n if (isNextMonthDay(day) && !showAdjacentDays) {\n break;\n }\n row.push(day);\n }\n sheet.push(row);\n }\n this.currentSheet = sheet.filter(row => row.length);\n this.currentMonth = month;\n return this.currentSheet;\n }\n }\n TuiCalendarSheetPipe.ɵfac = function TuiCalendarSheetPipe_Factory(t) {\n return new (t || TuiCalendarSheetPipe)(i0.ɵɵdirectiveInject(TUI_FIRST_DAY_OF_WEEK, 16));\n };\n TuiCalendarSheetPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"tuiCalendarSheet\",\n type: TuiCalendarSheetPipe,\n pure: true\n });\n return TuiCalendarSheetPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiCalendarSheetPipeModule = /*#__PURE__*/(() => {\n class TuiCalendarSheetPipeModule {}\n TuiCalendarSheetPipeModule.ɵfac = function TuiCalendarSheetPipeModule_Factory(t) {\n return new (t || TuiCalendarSheetPipeModule)();\n };\n TuiCalendarSheetPipeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiCalendarSheetPipeModule\n });\n TuiCalendarSheetPipeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiCalendarSheetPipeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiCalendarSheetPipe, TuiCalendarSheetPipeModule };\n","import * as i0 from '@angular/core';\nimport { Pipe, Inject, NgModule } from '@angular/core';\nimport { TUI_MONTHS } from '@taiga-ui/core/tokens';\nimport { map } from 'rxjs/operators';\nimport * as i1 from 'rxjs';\nlet TuiMonthPipe = /*#__PURE__*/(() => {\n class TuiMonthPipe {\n constructor(months$) {\n this.months$ = months$;\n }\n transform({\n month\n }) {\n return this.months$.pipe(map(months => months[month]));\n }\n }\n TuiMonthPipe.ɵfac = function TuiMonthPipe_Factory(t) {\n return new (t || TuiMonthPipe)(i0.ɵɵdirectiveInject(TUI_MONTHS, 16));\n };\n TuiMonthPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"tuiMonth\",\n type: TuiMonthPipe,\n pure: true\n });\n return TuiMonthPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiMonthPipeModule = /*#__PURE__*/(() => {\n class TuiMonthPipeModule {}\n TuiMonthPipeModule.ɵfac = function TuiMonthPipeModule_Factory(t) {\n return new (t || TuiMonthPipeModule)();\n };\n TuiMonthPipeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiMonthPipeModule\n });\n TuiMonthPipeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiMonthPipeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiMonthPipe, TuiMonthPipeModule };\n","import * as i0 from '@angular/core';\nimport { Pipe, Inject, NgModule } from '@angular/core';\nimport { TUI_FIRST_DAY_OF_WEEK } from '@taiga-ui/core/tokens';\nimport { map } from 'rxjs/operators';\nfunction convertToSundayFirstWeekFormat(weekDaysNames) {\n const sundayIndex = weekDaysNames.length - 1;\n return [weekDaysNames[sundayIndex], ...weekDaysNames.slice(0, sundayIndex)];\n}\nlet TuiOrderWeekDaysPipe = /*#__PURE__*/(() => {\n class TuiOrderWeekDaysPipe {\n constructor(firstDayOfWeekIndex) {\n this.firstDayOfWeekIndex = firstDayOfWeekIndex;\n }\n transform(mondayFirstWeekDays$) {\n return mondayFirstWeekDays$.pipe(map(convertToSundayFirstWeekFormat), map(weekDays => [...weekDays.slice(this.firstDayOfWeekIndex), ...weekDays.slice(0, this.firstDayOfWeekIndex)]));\n }\n }\n TuiOrderWeekDaysPipe.ɵfac = function TuiOrderWeekDaysPipe_Factory(t) {\n return new (t || TuiOrderWeekDaysPipe)(i0.ɵɵdirectiveInject(TUI_FIRST_DAY_OF_WEEK, 16));\n };\n TuiOrderWeekDaysPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"tuiOrderWeekDays\",\n type: TuiOrderWeekDaysPipe,\n pure: true\n });\n return TuiOrderWeekDaysPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiOrderWeekDaysPipeModule = /*#__PURE__*/(() => {\n class TuiOrderWeekDaysPipeModule {}\n TuiOrderWeekDaysPipeModule.ɵfac = function TuiOrderWeekDaysPipeModule_Factory(t) {\n return new (t || TuiOrderWeekDaysPipeModule)();\n };\n TuiOrderWeekDaysPipeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiOrderWeekDaysPipeModule\n });\n TuiOrderWeekDaysPipeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiOrderWeekDaysPipeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiOrderWeekDaysPipe, TuiOrderWeekDaysPipeModule };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModule } from '@angular/core';\nimport * as i4 from '@taiga-ui/cdk';\nimport { TuiMonth, TUI_FIRST_DAY, TUI_LAST_DAY, TuiFocusableModule } from '@taiga-ui/cdk';\nimport * as i1 from '@taiga-ui/core/components/primitive-spin-button';\nimport { TuiPrimitiveSpinButtonModule } from '@taiga-ui/core/components/primitive-spin-button';\nimport * as i2 from '@taiga-ui/core/components/link';\nimport { TuiLinkModule } from '@taiga-ui/core/components/link';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from '@taiga-ui/core/pipes';\nimport { TuiMonthPipeModule } from '@taiga-ui/core/pipes';\nfunction TuiPrimitiveYearMonthPaginationComponent_ng_container_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtext(1);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", ctx_r0.value.formattedYear, \" \");\n }\n}\nfunction TuiPrimitiveYearMonthPaginationComponent_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 3);\n i0.ɵɵlistener(\"click\", function TuiPrimitiveYearMonthPaginationComponent_ng_template_5_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r4);\n const ctx_r3 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r3.onYearClick());\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"tuiFocusable\", false);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.value.formattedYear, \" \");\n }\n}\nlet TuiPrimitiveYearMonthPaginationComponent = /*#__PURE__*/(() => {\n class TuiPrimitiveYearMonthPaginationComponent {\n constructor() {\n this.value = TuiMonth.currentLocal();\n this.min = TUI_FIRST_DAY;\n this.max = TUI_LAST_DAY;\n this.valueChange = new EventEmitter();\n this.yearClick = new EventEmitter();\n }\n get computedMin() {\n var _a;\n return (_a = this.min) !== null && _a !== void 0 ? _a : TUI_FIRST_DAY;\n }\n get computedMax() {\n var _a;\n return (_a = this.max) !== null && _a !== void 0 ? _a : TUI_LAST_DAY;\n }\n get prevMonthDisabled() {\n return this.value.monthSameOrBefore(this.computedMin);\n }\n get nextMonthDisabled() {\n return this.value.monthSameOrAfter(this.computedMax);\n }\n get oneYear() {\n const {\n computedMin,\n computedMax\n } = this;\n return computedMin.year === computedMax.year;\n }\n onYearClick() {\n this.yearClick.next(this.value);\n }\n onPrevMonthClick() {\n this.appendValueWithLimit({\n month: -1\n });\n }\n onNextMonthClick() {\n this.appendValueWithLimit({\n month: 1\n });\n }\n appendValueWithLimit(date) {\n const newMonth = this.value.append(date);\n const {\n computedMin,\n computedMax\n } = this;\n if (computedMin.monthSameOrAfter(newMonth)) {\n this.updateValue(computedMin);\n return;\n }\n this.updateValue(computedMax.monthSameOrBefore(newMonth) ? computedMax : newMonth);\n }\n updateValue(value) {\n if (this.value.monthSame(value)) {\n return;\n }\n this.value = value;\n this.valueChange.emit(value);\n }\n }\n TuiPrimitiveYearMonthPaginationComponent.ɵfac = function TuiPrimitiveYearMonthPaginationComponent_Factory(t) {\n return new (t || TuiPrimitiveYearMonthPaginationComponent)();\n };\n TuiPrimitiveYearMonthPaginationComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPrimitiveYearMonthPaginationComponent,\n selectors: [[\"tui-primitive-year-month-pagination\"]],\n inputs: {\n value: \"value\",\n min: \"min\",\n max: \"max\"\n },\n outputs: {\n valueChange: \"valueChange\",\n yearClick: \"yearClick\"\n },\n decls: 7,\n vars: 10,\n consts: [[3, \"focusable\", \"leftDisabled\", \"rightDisabled\", \"leftClick\", \"rightClick\"], [4, \"ngIf\", \"ngIfElse\"], [\"button\", \"\"], [\"id\", \"year-btn\", \"automation-id\", \"tui-primitive-year-month-pagination__year-button\", \"tuiLink\", \"\", \"type\", \"button\", 3, \"tuiFocusable\", \"click\"]],\n template: function TuiPrimitiveYearMonthPaginationComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-primitive-spin-button\", 0);\n i0.ɵɵlistener(\"leftClick\", function TuiPrimitiveYearMonthPaginationComponent_Template_tui_primitive_spin_button_leftClick_0_listener() {\n return ctx.onPrevMonthClick();\n })(\"rightClick\", function TuiPrimitiveYearMonthPaginationComponent_Template_tui_primitive_spin_button_rightClick_0_listener() {\n return ctx.onNextMonthClick();\n });\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵpipe(3, \"tuiMonth\");\n i0.ɵɵtemplate(4, TuiPrimitiveYearMonthPaginationComponent_ng_container_4_Template, 2, 1, \"ng-container\", 1)(5, TuiPrimitiveYearMonthPaginationComponent_ng_template_5_Template, 2, 2, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const _r2 = i0.ɵɵreference(6);\n i0.ɵɵproperty(\"focusable\", false)(\"leftDisabled\", ctx.prevMonthDisabled)(\"rightDisabled\", ctx.nextMonthDisabled);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(2, 6, i0.ɵɵpipeBind1(3, 8, ctx.value)), \" \");\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", ctx.oneYear)(\"ngIfElse\", _r2);\n }\n },\n dependencies: [i1.TuiPrimitiveSpinButtonComponent, i2.TuiLinkComponent, i3.NgIf, i4.TuiFocusableDirective, i3.AsyncPipe, i5.TuiMonthPipe],\n styles: [\"[_nghost-%COMP%]{display:block}\"],\n changeDetection: 0\n });\n return TuiPrimitiveYearMonthPaginationComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPrimitiveYearMonthPaginationModule = /*#__PURE__*/(() => {\n class TuiPrimitiveYearMonthPaginationModule {}\n TuiPrimitiveYearMonthPaginationModule.ɵfac = function TuiPrimitiveYearMonthPaginationModule_Factory(t) {\n return new (t || TuiPrimitiveYearMonthPaginationModule)();\n };\n TuiPrimitiveYearMonthPaginationModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPrimitiveYearMonthPaginationModule\n });\n TuiPrimitiveYearMonthPaginationModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiFocusableModule, TuiPrimitiveSpinButtonModule, TuiLinkModule, TuiMonthPipeModule]]\n });\n return TuiPrimitiveYearMonthPaginationModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiPrimitiveYearMonthPaginationComponent, TuiPrimitiveYearMonthPaginationModule };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, Output, HostBinding, NgModule } from '@angular/core';\nimport * as i2 from '@taiga-ui/cdk';\nimport { TuiDay, TuiMonth, ALWAYS_FALSE_HANDLER, TuiDayRange, tuiNullableSame, TuiLetModule, TuiMapperPipeModule, TuiRepeatTimesModule, TuiHoveredModule, TuiPressedModule } from '@taiga-ui/cdk';\nimport { TUI_DEFAULT_MARKER_HANDLER } from '@taiga-ui/core/constants';\nimport { TuiInteractiveState, TuiRangeState } from '@taiga-ui/core/enums';\nimport { TUI_SHORT_WEEK_DAYS, TUI_DAY_TYPE_HANDLER } from '@taiga-ui/core/tokens';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@taiga-ui/core/pipes';\nimport { TuiCalendarSheetPipeModule, TuiOrderWeekDaysPipeModule } from '@taiga-ui/core/pipes';\nfunction TuiPrimitiveCalendarComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 3);\n }\n if (rf & 2) {\n const day_r2 = ctx.$implicit;\n i0.ɵɵproperty(\"textContent\", day_r2);\n }\n}\nfunction TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_div_4_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 14);\n }\n if (rf & 2) {\n const markers_r12 = i0.ɵɵnextContext().ngIf;\n i0.ɵɵstyleProp(\"background-color\", (markers_r12 == null ? null : markers_r12[1]) || \"\");\n }\n}\nfunction TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_div_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 13);\n i0.ɵɵelement(1, \"div\", 14);\n i0.ɵɵtemplate(2, TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_div_4_div_2_Template, 1, 2, \"div\", 15);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const markers_r12 = ctx.ngIf;\n i0.ɵɵadvance(1);\n i0.ɵɵstyleProp(\"background-color\", markers_r12 == null ? null : markers_r12[0]);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", markers_r12.length > 1);\n }\n}\nfunction TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r17 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 10);\n i0.ɵɵlistener(\"click\", function TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_Template_div_click_0_listener() {\n i0.ɵɵrestoreView(_r17);\n const item_r9 = i0.ɵɵnextContext().tuiLet;\n const ctx_r15 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r15.onItemClick(item_r9));\n })(\"tuiHoveredChange\", function TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_Template_div_tuiHoveredChange_0_listener($event) {\n i0.ɵɵrestoreView(_r17);\n const item_r9 = i0.ɵɵnextContext().tuiLet;\n const ctx_r18 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r18.onItemHovered($event && item_r9));\n })(\"tuiPressedChange\", function TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_Template_div_tuiPressedChange_0_listener($event) {\n i0.ɵɵrestoreView(_r17);\n const item_r9 = i0.ɵɵnextContext().tuiLet;\n const ctx_r20 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r20.onItemPressed($event && item_r9));\n });\n i0.ɵɵelementStart(1, \"div\", 11);\n i0.ɵɵpipe(2, \"tuiMapper\");\n i0.ɵɵtext(3);\n i0.ɵɵtemplate(4, TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_div_4_Template, 3, 3, \"div\", 12);\n i0.ɵɵpipe(5, \"tuiMapper\");\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const item_r9 = i0.ɵɵnextContext().tuiLet;\n const ctx_r10 = i0.ɵɵnextContext(4);\n i0.ɵɵclassProp(\"t-cell_interval\", ctx_r10.itemIsInterval(item_r9))(\"t-cell_today\", ctx_r10.itemIsToday(item_r9))(\"t-cell_unavailable\", ctx_r10.itemIsUnavailable(item_r9));\n i0.ɵɵattribute(\"data-range\", ctx_r10.getItemRange(item_r9))(\"data-state\", ctx_r10.getItemState(item_r9));\n i0.ɵɵadvance(1);\n i0.ɵɵclassProp(\"t-item_unavailable\", ctx_r10.itemIsUnavailable(item_r9));\n i0.ɵɵattribute(\"data-type\", i0.ɵɵpipeBind2(2, 13, item_r9, ctx_r10.dayTypeHandler));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", item_r9.day, \" \");\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind4(5, 16, item_r9, ctx_r10.toMarkers, ctx_r10.itemIsToday(item_r9), !!ctx_r10.getItemRange(item_r9)));\n }\n}\nfunction TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_Template, 6, 21, \"div\", 9);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const item_r9 = ctx.tuiLet;\n const ctx_r8 = i0.ɵɵnextContext(4);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", !ctx_r8.itemIsUnavailable(item_r9) || ctx_r8.showAdjacent);\n }\n}\nfunction TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_Template, 2, 1, \"ng-container\", 8);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const colIndex_r7 = ctx.$implicit;\n const rowIndex_r5 = i0.ɵɵnextContext().$implicit;\n const sheet_r3 = i0.ɵɵnextContext().tuiLet;\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"tuiLet\", sheet_r3[rowIndex_r5][colIndex_r7]);\n }\n}\nfunction TuiPrimitiveCalendarComponent_div_4_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵtemplate(1, TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_Template, 2, 1, \"ng-container\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const rowIndex_r5 = ctx.$implicit;\n const sheet_r3 = i0.ɵɵnextContext().tuiLet;\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"tuiRepeatTimesOf\", sheet_r3[rowIndex_r5].length);\n }\n}\nfunction TuiPrimitiveCalendarComponent_div_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 4);\n i0.ɵɵtemplate(1, TuiPrimitiveCalendarComponent_div_4_div_1_Template, 2, 1, \"div\", 5);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const sheet_r3 = ctx.tuiLet;\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"tuiRepeatTimesOf\", sheet_r3.length);\n }\n}\nlet TuiPrimitiveCalendarComponent = /*#__PURE__*/(() => {\n class TuiPrimitiveCalendarComponent {\n constructor(unorderedWeekDays$, dayTypeHandler) {\n this.unorderedWeekDays$ = unorderedWeekDays$;\n this.dayTypeHandler = dayTypeHandler;\n this.pressedItem = null;\n this.today = TuiDay.currentLocal();\n this.month = TuiMonth.currentLocal();\n this.disabledItemHandler = ALWAYS_FALSE_HANDLER;\n this.markerHandler = TUI_DEFAULT_MARKER_HANDLER;\n this.value = null;\n this.hoveredItem = null;\n this.showAdjacent = true;\n this.hoveredItemChange = new EventEmitter();\n this.dayClick = new EventEmitter();\n this.toMarkers = (day, today, inRange) => {\n if (today || inRange) {\n return null;\n }\n const markers = this.markerHandler(day);\n return markers.length === 0 ? null : markers;\n };\n }\n get isSingleDayRange() {\n return this.value instanceof TuiDayRange && this.value.isSingleDay;\n }\n /**\n * @deprecated: use {@link this.isSingleDayRange}\n */\n get isSingle() {\n return this.isSingleDayRange;\n }\n getItemState(item) {\n const {\n disabledItemHandler,\n pressedItem,\n hoveredItem\n } = this;\n if (disabledItemHandler(item)) {\n return TuiInteractiveState.Disabled;\n }\n if (pressedItem === null || pressedItem === void 0 ? void 0 : pressedItem.daySame(item)) {\n return TuiInteractiveState.Active;\n }\n if (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.daySame(item)) {\n return TuiInteractiveState.Hover;\n }\n return null;\n }\n getItemRange(item) {\n const {\n value,\n hoveredItem\n } = this;\n if (!value) {\n return null;\n }\n if (value instanceof TuiDay) {\n return value.daySame(item) ? TuiRangeState.Single : null;\n }\n if (!(value instanceof TuiDayRange)) {\n return value.find(day => day.daySame(item)) ? TuiRangeState.Single : null;\n }\n if (value.from.daySame(item) && !value.isSingleDay || (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.dayAfter(value.from)) && value.from.daySame(item) && value.isSingleDay || (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.daySame(item)) && hoveredItem.dayBefore(value.from) && value.isSingleDay) {\n return TuiRangeState.Start;\n }\n if (value.to.daySame(item) && !value.isSingleDay || (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.dayBefore(value.from)) && value.from.daySame(item) && value.isSingleDay || (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.daySame(item)) && hoveredItem.dayAfter(value.from) && value.isSingleDay) {\n return TuiRangeState.End;\n }\n return value.isSingleDay && value.from.daySame(item) ? TuiRangeState.Single : null;\n }\n itemIsToday(item) {\n return this.today.daySame(item);\n }\n itemIsUnavailable(item) {\n return !this.month.monthSame(item);\n }\n itemIsInterval(day) {\n const {\n value,\n hoveredItem\n } = this;\n if (!(value instanceof TuiDayRange)) {\n return false;\n }\n if (!value.isSingleDay) {\n return value.from.daySameOrBefore(day) && value.to.dayAfter(day);\n }\n if (hoveredItem === null) {\n return false;\n }\n const range = TuiDayRange.sort(value.from, hoveredItem);\n return range.from.daySameOrBefore(day) && range.to.dayAfter(day);\n }\n onItemHovered(item) {\n this.updateHoveredItem(item || null);\n }\n onItemPressed(item) {\n this.pressedItem = item || null;\n }\n onItemClick(item) {\n this.dayClick.emit(item);\n }\n updateHoveredItem(day) {\n if (tuiNullableSame(this.hoveredItem, day, (a, b) => a.daySame(b))) {\n return;\n }\n this.hoveredItem = day;\n this.hoveredItemChange.emit(day);\n }\n }\n TuiPrimitiveCalendarComponent.ɵfac = function TuiPrimitiveCalendarComponent_Factory(t) {\n return new (t || TuiPrimitiveCalendarComponent)(i0.ɵɵdirectiveInject(TUI_SHORT_WEEK_DAYS), i0.ɵɵdirectiveInject(TUI_DAY_TYPE_HANDLER));\n };\n TuiPrimitiveCalendarComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPrimitiveCalendarComponent,\n selectors: [[\"tui-primitive-calendar\"]],\n hostVars: 2,\n hostBindings: function TuiPrimitiveCalendarComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"_single\", ctx.isSingleDayRange);\n }\n },\n inputs: {\n month: \"month\",\n disabledItemHandler: \"disabledItemHandler\",\n markerHandler: \"markerHandler\",\n value: \"value\",\n hoveredItem: \"hoveredItem\",\n showAdjacent: \"showAdjacent\"\n },\n outputs: {\n hoveredItemChange: \"hoveredItemChange\",\n dayClick: \"dayClick\"\n },\n decls: 6,\n vars: 9,\n consts: [[1, \"t-row\", \"t-row_weekday\"], [\"class\", \"t-cell\", 3, \"textContent\", 4, \"ngFor\", \"ngForOf\"], [\"id\", \"date-rows\", 4, \"tuiLet\"], [1, \"t-cell\", 3, \"textContent\"], [\"id\", \"date-rows\"], [\"automation-id\", \"tui-primitive-calendar__row\", \"class\", \"t-row\", 4, \"tuiRepeatTimes\", \"tuiRepeatTimesOf\"], [\"automation-id\", \"tui-primitive-calendar__row\", 1, \"t-row\"], [4, \"tuiRepeatTimes\", \"tuiRepeatTimesOf\"], [4, \"tuiLet\"], [\"automation-id\", \"tui-primitive-calendar__cell\", \"class\", \"t-cell\", 3, \"t-cell_interval\", \"t-cell_today\", \"t-cell_unavailable\", \"click\", \"tuiHoveredChange\", \"tuiPressedChange\", 4, \"ngIf\"], [\"automation-id\", \"tui-primitive-calendar__cell\", 1, \"t-cell\", 3, \"click\", \"tuiHoveredChange\", \"tuiPressedChange\"], [\"automation-id\", \"tui-primitive-calendar__item\", 1, \"t-item\"], [\"class\", \"t-dots\", 4, \"ngIf\"], [1, \"t-dots\"], [1, \"t-dot\"], [\"class\", \"t-dot\", 3, \"backgroundColor\", 4, \"ngIf\"]],\n template: function TuiPrimitiveCalendarComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵtemplate(1, TuiPrimitiveCalendarComponent_div_1_Template, 1, 1, \"div\", 1);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵpipe(3, \"tuiOrderWeekDays\");\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(4, TuiPrimitiveCalendarComponent_div_4_Template, 2, 1, \"div\", 2);\n i0.ɵɵpipe(5, \"tuiCalendarSheet\");\n }\n if (rf & 2) {\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, ctx.unorderedWeekDays$)));\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind2(5, 6, ctx.month, true));\n }\n },\n dependencies: [i1.NgForOf, i2.TuiLetDirective, i2.TuiRepeatTimesDirective, i1.NgIf, i2.TuiHoveredDirective, i2.TuiPressedDirective, i1.AsyncPipe, i3.TuiOrderWeekDaysPipe, i3.TuiCalendarSheetPipe, i2.TuiMapperPipe],\n styles: [\"[_nghost-%COMP%]{display:block;font:var(--tui-font-text-m)}.t-row[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:space-between;height:2.25rem;isolation:isolate}.t-item[_ngcontent-%COMP%]{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item[_ngcontent-%COMP%]:before, .t-item[_ngcontent-%COMP%]:after{content:\\\"\\\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-item[_ngcontent-%COMP%]:after{border-radius:.5rem}.t-cell[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:2.25rem;text-align:center;outline:none;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:.125rem solid transparent}.t-cell[_ngcontent-%COMP%]:before{content:\\\"\\\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today[_ngcontent-%COMP%]:after{position:absolute;left:50%;transform:translate(-50%);content:\\\"\\\";bottom:.3125rem;height:.125rem;width:.75rem;border-radius:.375rem;background-color:var(--tui-text-01)}.t-cell_interval[_ngcontent-%COMP%]:before{background:var(--tui-base-02)}._single[_nghost-%COMP%] .t-cell_interval[_ngcontent-%COMP%]:before{background:var(--tui-secondary-hover)}.t-cell_interval[_ngcontent-%COMP%]:not(:last-child):before{right:-.25rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell_interval[_ngcontent-%COMP%]:not([data-range=\\\"start\\\"]):not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell_interval[_ngcontent-%COMP%]:last-child:first-child:before{right:0}.t-cell_interval[_ngcontent-%COMP%]:first-child > .t-item[_ngcontent-%COMP%]{border-top-left-radius:var(--tui-radius-m);border-bottom-left-radius:var(--tui-radius-m)}.t-cell_interval[_ngcontent-%COMP%]:last-child > .t-item[_ngcontent-%COMP%]{border-top-right-radius:var(--tui-radius-m);border-bottom-right-radius:var(--tui-radius-m)}.t-cell_interval[_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{border-radius:0}.t-cell[data-range][_ngcontent-%COMP%]:after{background-color:var(--tui-primary-text)}.t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{color:var(--tui-primary-text)}.t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary)}.t-cell[data-range][data-state=hover][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][data-state=hover][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary-hover)}.t-cell[data-range][data-state=active][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before, .t-cell[data-range][data-state=active][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{background-color:var(--tui-primary-active)}.t-cell[data-range=end][_ngcontent-%COMP%]:before{background:var(--tui-base-02)}._single[_nghost-%COMP%] .t-cell[data-range=end][_ngcontent-%COMP%]:before{background:var(--tui-secondary-hover)}.t-cell[data-range=end][_ngcontent-%COMP%]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before{left:.625rem;border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{left:-2rem;right:100%;transform:translate(1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=start][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:before{right:.625rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{left:100%;right:-2rem;transform:translate(-1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=single][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]:after{display:none}.t-cell[data-state=disabled][_ngcontent-%COMP%]{pointer-events:none}.t-cell[data-state=disabled][_ngcontent-%COMP%] > .t-item[_ngcontent-%COMP%]{opacity:.36}.t-cell[data-state=hover][_ngcontent-%COMP%]:hover:not([data-range]) > .t-item[_ngcontent-%COMP%]{background-color:var(--tui-secondary-hover)}.t-cell[data-state=active][_ngcontent-%COMP%]:hover:not([data-range]) > .t-item[_ngcontent-%COMP%]{background-color:var(--tui-secondary-active)}[_nghost-%COMP%]{width:15.75rem}.t-row[_ngcontent-%COMP%]{justify-content:flex-start}.t-row[_ngcontent-%COMP%]:first-child{justify-content:flex-end}.t-row_weekday[_ngcontent-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none}.t-item[_ngcontent-%COMP%]{display:flex;flex-direction:column}.t-item_unavailable[_ngcontent-%COMP%]{opacity:var(--tui-disabled-opacity)}.t-dots[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:-.5rem;padding-bottom:.25rem}.t-dot[_ngcontent-%COMP%]{display:inline-block;width:.25rem;height:.25rem;border-radius:100%;margin:0 .0625rem}\"],\n changeDetection: 0\n });\n return TuiPrimitiveCalendarComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPrimitiveCalendarModule = /*#__PURE__*/(() => {\n class TuiPrimitiveCalendarModule {}\n TuiPrimitiveCalendarModule.ɵfac = function TuiPrimitiveCalendarModule_Factory(t) {\n return new (t || TuiPrimitiveCalendarModule)();\n };\n TuiPrimitiveCalendarModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPrimitiveCalendarModule\n });\n TuiPrimitiveCalendarModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiLetModule, TuiMapperPipeModule, TuiRepeatTimesModule, TuiHoveredModule, TuiPressedModule, TuiCalendarSheetPipeModule, TuiOrderWeekDaysPipeModule]]\n });\n return TuiPrimitiveCalendarModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiPrimitiveCalendarComponent, TuiPrimitiveCalendarModule };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModule } from '@angular/core';\nimport * as i6 from '@taiga-ui/cdk';\nimport { TuiMonth, ALWAYS_FALSE_HANDLER, TUI_FIRST_DAY, TUI_LAST_DAY, TuiDay, tuiNullableSame, TuiMapperPipeModule } from '@taiga-ui/cdk';\nimport { TUI_DEFAULT_MARKER_HANDLER } from '@taiga-ui/core/constants';\nimport * as i1 from '@taiga-ui/core/components/scrollbar';\nimport { TuiScrollbarModule } from '@taiga-ui/core/components/scrollbar';\nimport * as i2 from '@taiga-ui/core/components/primitive-year-picker';\nimport { TuiPrimitiveYearPickerModule } from '@taiga-ui/core/components/primitive-year-picker';\nimport * as i3 from '@taiga-ui/core/internal/primitive-year-month-pagination';\nimport { TuiPrimitiveYearMonthPaginationModule } from '@taiga-ui/core/internal/primitive-year-month-pagination';\nimport * as i4 from '@taiga-ui/core/components/primitive-calendar';\nimport { TuiPrimitiveCalendarModule } from '@taiga-ui/core/components/primitive-calendar';\nimport * as i5 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nfunction TuiCalendarComponent_tui_scrollbar_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-scrollbar\", 2)(1, \"tui-primitive-year-picker\", 3);\n i0.ɵɵlistener(\"yearClick\", function TuiCalendarComponent_tui_scrollbar_0_Template_tui_primitive_year_picker_yearClick_1_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r3 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r3.onPickerYearClick($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"initialItem\", ctx_r0.month)(\"max\", ctx_r0.computedMax)(\"min\", ctx_r0.computedMin)(\"value\", ctx_r0.value);\n }\n}\nfunction TuiCalendarComponent_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-primitive-year-month-pagination\", 4);\n i0.ɵɵlistener(\"valueChange\", function TuiCalendarComponent_ng_template_1_Template_tui_primitive_year_month_pagination_valueChange_0_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r5 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r5.onPaginationValueChange($event));\n })(\"yearClick\", function TuiCalendarComponent_ng_template_1_Template_tui_primitive_year_month_pagination_yearClick_0_listener() {\n i0.ɵɵrestoreView(_r6);\n const ctx_r7 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r7.onPaginationYearClick());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(1, \"tui-primitive-calendar\", 5);\n i0.ɵɵlistener(\"dayClick\", function TuiCalendarComponent_ng_template_1_Template_tui_primitive_calendar_dayClick_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r8 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r8.onDayClick($event));\n })(\"hoveredItemChange\", function TuiCalendarComponent_ng_template_1_Template_tui_primitive_calendar_hoveredItemChange_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r9 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r9.onHoveredItemChange($event));\n });\n i0.ɵɵpipe(2, \"tuiMapper\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"max\", ctx_r1.computedMaxViewedMonth)(\"min\", ctx_r1.computedMinViewedMonth)(\"value\", ctx_r1.month);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"disabledItemHandler\", i0.ɵɵpipeBind4(2, 9, ctx_r1.disabledItemHandler, ctx_r1.disabledItemHandlerMapper, ctx_r1.computedMin, ctx_r1.computedMax))(\"hoveredItem\", ctx_r1.hoveredItem)(\"markerHandler\", ctx_r1.markerHandler)(\"month\", ctx_r1.month)(\"showAdjacent\", ctx_r1.showAdjacent)(\"value\", ctx_r1.value);\n }\n}\nlet TuiCalendarComponent = /*#__PURE__*/(() => {\n class TuiCalendarComponent {\n constructor() {\n this.day = null;\n this.view = 'month';\n this.month = TuiMonth.currentLocal();\n this.disabledItemHandler = ALWAYS_FALSE_HANDLER;\n this.min = TUI_FIRST_DAY;\n this.max = TUI_LAST_DAY;\n this.minViewedMonth = TUI_FIRST_DAY;\n this.maxViewedMonth = TUI_LAST_DAY;\n this.hoveredItem = null;\n this.showAdjacent = true;\n this.markerHandler = TUI_DEFAULT_MARKER_HANDLER;\n this.dayClick = new EventEmitter();\n this.monthChange = new EventEmitter();\n this.hoveredItemChange = new EventEmitter();\n this.disabledItemHandlerMapper = (disabledItemHandler, min, max) => item => item.dayBefore(min) || item.dayAfter(max) || disabledItemHandler(item);\n }\n set initialView(view) {\n this.view = view;\n }\n set value(value) {\n this.day = value;\n if (this.showAdjacent && value instanceof TuiDay) {\n this.month = value;\n }\n }\n get value() {\n return this.day;\n }\n get isInYearView() {\n return this.view === 'year';\n }\n get computedMin() {\n var _a;\n return (_a = this.min) !== null && _a !== void 0 ? _a : TUI_FIRST_DAY;\n }\n get computedMax() {\n var _a;\n return (_a = this.max) !== null && _a !== void 0 ? _a : TUI_LAST_DAY;\n }\n get computedMinViewedMonth() {\n var _a;\n const min = this.computedMin;\n const minViewed = (_a = this.minViewedMonth) !== null && _a !== void 0 ? _a : TUI_FIRST_DAY;\n return minViewed.monthSameOrAfter(min) ? minViewed : min;\n }\n get computedMaxViewedMonth() {\n var _a;\n const max = this.computedMax;\n const maxViewed = (_a = this.maxViewedMonth) !== null && _a !== void 0 ? _a : TUI_LAST_DAY;\n return maxViewed.monthSameOrBefore(max) ? maxViewed : max;\n }\n onPaginationYearClick() {\n this.view = 'year';\n }\n onPickerYearClick({\n year\n }) {\n this.view = 'month';\n this.updateViewedMonth(new TuiMonth(year, this.month.month));\n }\n onPaginationValueChange(month) {\n this.updateViewedMonth(month);\n }\n onDayClick(day) {\n this.dayClick.emit(day);\n }\n onHoveredItemChange(day) {\n this.updateHoveredDay(day);\n }\n updateViewedMonth(month) {\n if (this.month.monthSame(month)) {\n return;\n }\n this.month = month;\n this.monthChange.emit(month);\n }\n updateHoveredDay(day) {\n if (tuiNullableSame(this.hoveredItem, day, (a, b) => a.daySame(b))) {\n return;\n }\n this.hoveredItem = day;\n this.hoveredItemChange.emit(day);\n }\n }\n TuiCalendarComponent.ɵfac = function TuiCalendarComponent_Factory(t) {\n return new (t || TuiCalendarComponent)();\n };\n TuiCalendarComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiCalendarComponent,\n selectors: [[\"tui-calendar\"]],\n inputs: {\n initialView: \"initialView\",\n month: \"month\",\n disabledItemHandler: \"disabledItemHandler\",\n min: \"min\",\n max: \"max\",\n minViewedMonth: \"minViewedMonth\",\n maxViewedMonth: \"maxViewedMonth\",\n hoveredItem: \"hoveredItem\",\n showAdjacent: \"showAdjacent\",\n markerHandler: \"markerHandler\",\n value: \"value\"\n },\n outputs: {\n dayClick: \"dayClick\",\n monthChange: \"monthChange\",\n hoveredItemChange: \"hoveredItemChange\"\n },\n decls: 3,\n vars: 2,\n consts: [[\"automation-id\", \"tui-calendar__scrollbar\", \"class\", \"t-scrollbar\", 4, \"ngIf\", \"ngIfElse\"], [\"calendar\", \"\"], [\"automation-id\", \"tui-calendar__scrollbar\", 1, \"t-scrollbar\"], [\"automation-id\", \"tui-calendar__year\", 3, \"initialItem\", \"max\", \"min\", \"value\", \"yearClick\"], [\"automation-id\", \"tui-calendar__pagination\", 1, \"t-pagination\", 3, \"max\", \"min\", \"value\", \"valueChange\", \"yearClick\"], [\"automation-id\", \"tui-calendar__calendar\", 3, \"disabledItemHandler\", \"hoveredItem\", \"markerHandler\", \"month\", \"showAdjacent\", \"value\", \"dayClick\", \"hoveredItemChange\"]],\n template: function TuiCalendarComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiCalendarComponent_tui_scrollbar_0_Template, 2, 4, \"tui-scrollbar\", 0)(1, TuiCalendarComponent_ng_template_1_Template, 3, 14, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const _r2 = i0.ɵɵreference(2);\n i0.ɵɵproperty(\"ngIf\", ctx.isInYearView)(\"ngIfElse\", _r2);\n }\n },\n dependencies: [i1.TuiScrollbarComponent, i2.TuiPrimitiveYearPickerComponent, i3.TuiPrimitiveYearMonthPaginationComponent, i4.TuiPrimitiveCalendarComponent, i5.NgIf, i6.TuiMapperPipe],\n styles: [\"[_nghost-%COMP%]{display:block;height:18.25rem;width:15.75rem;padding:1rem 1.125rem;box-sizing:content-box}.t-scrollbar[_ngcontent-%COMP%]{height:18.25rem;width:16.875rem}.t-pagination[_ngcontent-%COMP%]{margin-bottom:1rem}\"],\n changeDetection: 0\n });\n return TuiCalendarComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiCalendarModule = /*#__PURE__*/(() => {\n class TuiCalendarModule {}\n TuiCalendarModule.ɵfac = function TuiCalendarModule_Factory(t) {\n return new (t || TuiCalendarModule)();\n };\n TuiCalendarModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiCalendarModule\n });\n TuiCalendarModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiPrimitiveYearMonthPaginationModule, TuiPrimitiveCalendarModule, TuiPrimitiveYearPickerModule, TuiScrollbarModule, TuiMapperPipeModule]]\n });\n return TuiCalendarModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiCalendarComponent, TuiCalendarModule };\n","import { __decorate } from 'tslib';\nimport * as i0 from '@angular/core';\nimport { forwardRef, ElementRef, Component, ChangeDetectionStrategy, Optional, Inject, Self, Input, HostBinding, HostListener, ViewEncapsulation, ContentChildren, Directive, NgModule } from '@angular/core';\nimport { tuiIsNativeFocused, EMPTY_QUERY, tuiQueryListChanges, tuiMoveFocus, tuiIsNativeFocusedIn, tuiSetNativeMouseFocused, tuiIsPresent, tuiIsElement, tuiPure } from '@taiga-ui/cdk';\nimport * as i3 from '@taiga-ui/core/directives';\nimport { TUI_TEXTFIELD_WATCHED_CONTROLLER, TEXTFIELD_CONTROLLER_PROVIDER } from '@taiga-ui/core/directives';\nimport { TUI_OPTION_CONTENT, TUI_DATA_LIST_HOST, TUI_COMMON_ICONS, TUI_NOTHING_FOUND_MESSAGE, tuiAsDataListAccessor } from '@taiga-ui/core/tokens';\nimport { map } from 'rxjs/operators';\nimport * as i5 from '@taiga-ui/core/directives/dropdown';\nimport { TuiDropdownDirective } from '@taiga-ui/core/directives/dropdown';\nimport { shouldCall } from '@tinkoff/ng-event-plugins';\nimport * as i1 from '@taiga-ui/core/components/svg';\nimport { TuiSvgModule } from '@taiga-ui/core/components/svg';\nimport * as i2 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport * as i1$1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i4 from 'rxjs';\nconst _c0 = [\"tuiOption\", \"\"];\nfunction TuiOptionComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtext(1);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const text_r3 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", text_r3, \"\\n\");\n }\n}\nfunction TuiOptionComponent_ng_template_1_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 3);\n }\n if (rf & 2) {\n const ctx_r4 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"src\", ctx_r4.icons.more);\n }\n}\nfunction TuiOptionComponent_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojection(0);\n i0.ɵɵtemplate(1, TuiOptionComponent_ng_template_1_tui_svg_1_Template, 1, 1, \"tui-svg\", 2);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx_r1.dropdown);\n }\n}\nconst _c1 = a0 => ({\n $implicit: a0\n});\nconst _c2 = [\"*\"];\nfunction TuiDataListComponent_div_2_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtext(1);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const text_r2 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", text_r2, \" \");\n }\n}\nfunction TuiDataListComponent_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵtemplate(1, TuiDataListComponent_div_2_ng_container_1_Template, 2, 1, \"ng-container\", 3);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r0.emptyContent || i0.ɵɵpipeBind1(2, 1, ctx_r0.defaultEmptyContent$));\n }\n}\nfunction shouldFocus({\n currentTarget\n}) {\n return !tuiIsNativeFocused(currentTarget);\n}\n// TODO: Consider all use cases for aria roles\nlet TuiOptionComponent = /*#__PURE__*/(() => {\n class TuiOptionComponent {\n constructor(content, dataList, el, host, dropdown, icons) {\n this.content = content;\n this.dataList = dataList;\n this.el = el;\n this.host = host;\n this.dropdown = dropdown;\n this.icons = icons;\n /** @deprecated use size on {@link TuiDataListComponent} instead */\n this.size = null;\n this.role = 'option';\n this.disabled = false;\n }\n get active() {\n return !!this.dropdown && !!this.dropdown.dropdownBoxRef;\n }\n onClick() {\n if (this.host && this.value !== undefined) {\n this.host.handleOption(this.value);\n }\n }\n // @bad TODO: Consider aria-activedescendant for proper accessibility implementation\n onMouseMove({\n currentTarget\n }) {\n currentTarget.focus({\n preventScroll: true\n });\n }\n // Preventing focus loss upon focused option removal\n ngOnDestroy() {\n var _a;\n (_a = this.dataList) === null || _a === void 0 ? void 0 : _a.handleFocusLossIfNecessary(this.el.nativeElement);\n }\n }\n TuiOptionComponent.ɵfac = function TuiOptionComponent_Factory(t) {\n return new (t || TuiOptionComponent)(i0.ɵɵdirectiveInject(TUI_OPTION_CONTENT, 8), i0.ɵɵdirectiveInject(forwardRef(() => TuiDataListComponent), 8), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_DATA_LIST_HOST, 8), i0.ɵɵdirectiveInject(TuiDropdownDirective, 10), i0.ɵɵdirectiveInject(TUI_COMMON_ICONS));\n };\n TuiOptionComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiOptionComponent,\n selectors: [[\"button\", \"tuiOption\", \"\"], [\"a\", \"tuiOption\", \"\"]],\n hostAttrs: [\"tabIndex\", \"-1\", \"type\", \"button\"],\n hostVars: 5,\n hostBindings: function TuiOptionComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function TuiOptionComponent_click_HostBindingHandler() {\n return ctx.onClick();\n })(\"mousemove.silent\", function TuiOptionComponent_mousemove_silent_HostBindingHandler($event) {\n return ctx.onMouseMove($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"disabled\", ctx.disabled || null)(\"data-size\", ctx.size)(\"role\", ctx.role);\n i0.ɵɵclassProp(\"_with-dropdown\", ctx.active);\n }\n },\n inputs: {\n size: \"size\",\n role: \"role\",\n disabled: \"disabled\",\n value: \"value\"\n },\n attrs: _c0,\n ngContentSelectors: _c2,\n decls: 3,\n vars: 4,\n consts: [[4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [\"base\", \"\"], [\"class\", \"t-arrow\", 3, \"src\", 4, \"ngIf\"], [1, \"t-arrow\", 3, \"src\"]],\n template: function TuiOptionComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, TuiOptionComponent_ng_container_0_Template, 2, 1, \"ng-container\", 0)(1, TuiOptionComponent_ng_template_1_Template, 2, 1, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const _r2 = i0.ɵɵreference(2);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.content || _r2)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c1, _r2));\n }\n },\n dependencies: [i1.TuiSvgComponent, i2.PolymorpheusOutletDirective, i1$1.NgIf],\n styles: [\"[_nghost-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;justify-content:space-between;text-align:left;color:var(--tui-text-01);border-radius:var(--tui-radius-s);outline:none;cursor:pointer;background-clip:padding-box}[_nghost-%COMP%]:disabled{opacity:var(--tui-disabled-opacity);cursor:default}[_nghost-%COMP%]:focus, ._with-dropdown[_nghost-%COMP%]{background-color:var(--tui-clear)}[_nghost-%COMP%] [data-list-size=\\\"s\\\"][_nghost-%COMP%], [data-list-size=\\\"s\\\"] [_nghost-%COMP%], [_nghost-%COMP%] [data-list-size=\\\"xs\\\"][_nghost-%COMP%], [data-list-size=\\\"xs\\\"] [_nghost-%COMP%], [data-size=s][data-size=s][_nghost-%COMP%], [data-size=xs][data-size=xs][_nghost-%COMP%]{display:flex;align-items:center;box-sizing:border-box;margin:var(--tui-data-list-margin) 0;font:var(--tui-font-text-s);min-height:2rem;padding:.3125rem .5rem}[_nghost-%COMP%] [data-list-size=\\\"m\\\"][_nghost-%COMP%], [data-list-size=\\\"m\\\"] [_nghost-%COMP%], [data-size=m][data-size=m][_nghost-%COMP%]{display:flex;align-items:center;box-sizing:border-box;margin:var(--tui-data-list-margin) 0;font:var(--tui-font-text-s);min-height:2.5rem;padding:.375rem .5rem}[_nghost-%COMP%] [data-list-size=\\\"l\\\"][_nghost-%COMP%], [data-list-size=\\\"l\\\"] [_nghost-%COMP%], [data-size=l][data-size=l][_nghost-%COMP%]{display:flex;align-items:center;box-sizing:border-box;margin:var(--tui-data-list-margin) 0;font:var(--tui-font-text-m);min-height:2.75rem;padding:.375rem .625rem}.t-arrow[_ngcontent-%COMP%]{margin:0 -.5rem 0 .75rem}\"],\n changeDetection: 0\n });\n __decorate([shouldCall(shouldFocus)], TuiOptionComponent.prototype, \"onMouseMove\", null);\n return TuiOptionComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// TODO: Consider aria-activedescendant for proper accessibility implementation\nlet TuiDataListComponent = /*#__PURE__*/(() => {\n class TuiDataListComponent {\n constructor(controller, el, defaultEmptyContent$) {\n var _a;\n this.controller = controller;\n this.el = el;\n this.defaultEmptyContent$ = defaultEmptyContent$;\n this.options = EMPTY_QUERY;\n this.role = 'listbox';\n this.size = ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.size) || 'm';\n }\n get empty$() {\n return tuiQueryListChanges(this.options).pipe(map(({\n length\n }) => !length));\n }\n onFocusIn(relatedTarget, currentTarget) {\n if (!currentTarget.contains(relatedTarget) && !this.origin) {\n this.origin = relatedTarget;\n }\n }\n noop() {}\n onKeyDownArrow(current, step) {\n const {\n elements\n } = this;\n tuiMoveFocus(elements.indexOf(current), elements, step);\n }\n // TODO: Consider aria-activedescendant for proper accessibility implementation\n handleFocusLossIfNecessary(element = this.el.nativeElement) {\n if (this.origin && tuiIsNativeFocusedIn(element)) {\n tuiSetNativeMouseFocused(this.origin, true, true);\n }\n }\n getOptions(includeDisabled = false) {\n return this.options.filter(({\n disabled\n }) => includeDisabled || !disabled).map(({\n value\n }) => value).filter(tuiIsPresent);\n }\n onFocus({\n target\n }, top) {\n if (!tuiIsElement(target)) {\n return;\n }\n const {\n elements\n } = this;\n tuiMoveFocus(top ? -1 : elements.length, elements, top ? 1 : -1);\n this.handleFocusLossIfNecessary(target);\n }\n get elements() {\n return Array.from(this.el.nativeElement.querySelectorAll('[tuiOption]'));\n }\n }\n TuiDataListComponent.ɵfac = function TuiDataListComponent_Factory(t) {\n return new (t || TuiDataListComponent)(i0.ɵɵdirectiveInject(TUI_TEXTFIELD_WATCHED_CONTROLLER, 8), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_NOTHING_FOUND_MESSAGE));\n };\n TuiDataListComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiDataListComponent,\n selectors: [[\"tui-data-list\"]],\n contentQueries: function TuiDataListComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, TuiOptionComponent, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.options = _t);\n }\n },\n hostVars: 2,\n hostBindings: function TuiDataListComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focusin\", function TuiDataListComponent_focusin_HostBindingHandler($event) {\n return ctx.onFocusIn($event.relatedTarget, $event.currentTarget);\n })(\"mousedown.prevent\", function TuiDataListComponent_mousedown_prevent_HostBindingHandler() {\n return ctx.noop();\n })(\"keydown.arrowDown.prevent\", function TuiDataListComponent_keydown_arrowDown_prevent_HostBindingHandler($event) {\n return ctx.onKeyDownArrow($event.target, 1);\n })(\"keydown.arrowUp.prevent\", function TuiDataListComponent_keydown_arrowUp_prevent_HostBindingHandler($event) {\n return ctx.onKeyDownArrow($event.target, -1);\n })(\"wheel.silent.passive\", function TuiDataListComponent_wheel_silent_passive_HostBindingHandler() {\n return ctx.handleFocusLossIfNecessary();\n })(\"mouseleave\", function TuiDataListComponent_mouseleave_HostBindingHandler($event) {\n return ctx.handleFocusLossIfNecessary($event.target);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"role\", ctx.role)(\"data-list-size\", ctx.size);\n }\n },\n inputs: {\n role: \"role\",\n emptyContent: \"emptyContent\",\n size: \"size\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsDataListAccessor(TuiDataListComponent), TEXTFIELD_CONTROLLER_PROVIDER])],\n ngContentSelectors: _c2,\n decls: 5,\n vars: 3,\n consts: [[\"tabindex\", \"0\", 1, \"t-trap\", 3, \"focusin\"], [\"class\", \"t-empty\", 4, \"ngIf\"], [1, \"t-empty\"], [4, \"polymorpheusOutlet\"]],\n template: function TuiDataListComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵlistener(\"focusin\", function TuiDataListComponent_Template_div_focusin_0_listener($event) {\n return ctx.onFocus($event, true);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵprojection(1);\n i0.ɵɵtemplate(2, TuiDataListComponent_div_2_Template, 3, 3, \"div\", 1);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelementStart(4, \"div\", 0);\n i0.ɵɵlistener(\"focusin\", function TuiDataListComponent_Template_div_focusin_4_listener($event) {\n return ctx.onFocus($event, false);\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(3, 1, ctx.empty$));\n }\n },\n dependencies: [i1$1.NgIf, i2.PolymorpheusOutletDirective, i1$1.AsyncPipe],\n styles: [\"tui-data-list{--tui-data-list-padding: .25rem;--tui-data-list-margin: .0625rem;display:flex;font:var(--tui-font-text-m);flex-direction:column;padding:calc(var(--tui-data-list-padding) - var(--tui-data-list-margin)) var(--tui-data-list-padding);color:var(--tui-text-03)}tui-data-list:focus-within .t-trap{display:none}tui-data-list:focus-within [tuiOption]._with-dropdown:not(:focus){background-color:transparent}tui-data-list[data-list-size=s]{--tui-data-list-margin: 0rem}tui-data-list[data-list-size=s]>.t-empty{display:flex;align-items:center;box-sizing:border-box;margin:var(--tui-data-list-margin) 0;font:var(--tui-font-text-s);min-height:2rem;padding:.3125rem .5rem}tui-data-list[data-list-size=m]>.t-empty{display:flex;align-items:center;box-sizing:border-box;margin:var(--tui-data-list-margin) 0;font:var(--tui-font-text-s);min-height:2.5rem;padding:.375rem .5rem}tui-data-list[data-list-size=l]{--tui-data-list-padding: .375rem;--tui-data-list-margin: .125rem}tui-data-list[data-list-size=l]>.t-empty{display:flex;align-items:center;box-sizing:border-box;margin:var(--tui-data-list-margin) 0;font:var(--tui-font-text-m);min-height:2.75rem;padding:.375rem .625rem}tui-opt-group{position:relative;display:flex;font:var(--tui-font-text-xs);color:var(--tui-text-02);flex-direction:column;line-height:1rem}tui-data-list[data-list-size=l] tui-opt-group{font:var(--tui-font-text-s);line-height:1.25rem}tui-data-list[data-list-size=l] tui-opt-group:before{padding-left:.625rem;padding-right:.625rem}tui-data-list[data-list-size=l] tui-opt-group:after{left:.625rem;right:.625rem}tui-opt-group:empty:before,tui-opt-group:empty:after{display:none}tui-opt-group:before{content:attr(data-label);padding:var(--tui-data-list-padding) .5rem var(--tui-data-list-padding);margin:var(--tui-data-list-margin) 0;white-space:normal;word-break:break-word}tui-opt-group:after{position:absolute;left:.5rem;right:.5rem;top:var(--tui-data-list-padding);height:1px;background:var(--tui-base-03)}tui-opt-group:not(:empty)~tui-opt-group:before{padding-top:calc(.75rem + var(--tui-data-list-padding))}tui-opt-group:not(:empty)~tui-opt-group[data-label=\\\"\\\"]:before,tui-opt-group:not(:empty)~tui-opt-group:not([data-label]):before{padding:var(--tui-data-list-padding) 0}tui-opt-group:not(:empty)~tui-opt-group:after{content:\\\"\\\"}tui-opt-group[data-label=\\\"\\\"]:before,tui-opt-group:not([data-label]):before{padding:0;margin:0}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n __decorate([tuiPure], TuiDataListComponent.prototype, \"empty$\", null);\n return TuiDataListComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDataListDirective = /*#__PURE__*/(() => {\n class TuiDataListDirective {}\n TuiDataListDirective.ɵfac = function TuiDataListDirective_Factory(t) {\n return new (t || TuiDataListDirective)();\n };\n TuiDataListDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDataListDirective,\n selectors: [[\"ng-template\", \"tuiDataList\", \"\"]]\n });\n return TuiDataListDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction tuiAsDataList(useExisting) {\n return {\n provide: TuiDataListDirective,\n useExisting\n };\n}\nlet TuiOptGroupDirective = /*#__PURE__*/(() => {\n class TuiOptGroupDirective {}\n TuiOptGroupDirective.ɵfac = function TuiOptGroupDirective_Factory(t) {\n return new (t || TuiOptGroupDirective)();\n };\n TuiOptGroupDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiOptGroupDirective,\n selectors: [[\"tui-opt-group\"]],\n hostAttrs: [\"role\", \"group\"],\n hostVars: 1,\n hostBindings: function TuiOptGroupDirective_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"data-label\", ctx.label);\n }\n },\n inputs: {\n label: \"label\"\n }\n });\n return TuiOptGroupDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDataListModule = /*#__PURE__*/(() => {\n class TuiDataListModule {}\n TuiDataListModule.ɵfac = function TuiDataListModule_Factory(t) {\n return new (t || TuiDataListModule)();\n };\n TuiDataListModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiDataListModule\n });\n TuiDataListModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiSvgModule, PolymorpheusModule]]\n });\n return TuiDataListModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiDataListComponent, TuiDataListDirective, TuiDataListModule, TuiOptGroupDirective, TuiOptionComponent, tuiAsDataList };\n","import * as i0 from '@angular/core';\nimport { Optional, SkipSelf, Directive, InjectionToken, Self, Inject, EventEmitter, ElementRef, Component, ChangeDetectionStrategy, ContentChild, ViewChild, Input, Output, HostListener, NgModule } from '@angular/core';\nimport { TuiPositionAccessor } from '@taiga-ui/core/abstract';\nimport * as i1$1 from '@taiga-ui/cdk';\nimport { TuiDestroyService, tuiTypedFromEvent, tuiGetActualTarget, tuiIsNativeKeyboardFocusable, tuiGetClosestFocusable, tuiIsNativeFocusedIn, tuiIsHTMLElement, tuiIsElementEditable, tuiIsElement, tuiAsFocusableItemAccessor, TuiActiveZoneDirective, TuiLetModule, TuiObscuredModule, TuiActiveZoneModule } from '@taiga-ui/cdk';\nimport * as i2 from '@taiga-ui/core/directives';\nimport { TuiDropdownDirective, TuiDropdownOpenDirective } from '@taiga-ui/core/directives';\nimport { filter, takeUntil, map, switchMap, delay, skip, distinctUntilChanged, share } from 'rxjs/operators';\nimport * as i1 from 'rxjs';\nimport { BehaviorSubject, combineLatest, of, EMPTY, merge } from 'rxjs';\nimport { __decorate } from 'tslib';\nimport * as i4 from '@taiga-ui/core/directives/dropdown';\nimport { TuiDropdownHoverDirective, TuiDropdownDirective as TuiDropdownDirective$1, TuiDropdownModule, TuiDropdownOptionsDirective } from '@taiga-ui/core/directives/dropdown';\nimport { tuiIsEditingKey } from '@taiga-ui/core/utils/miscellaneous';\nimport { shouldCall } from '@tinkoff/ng-event-plugins';\nimport * as i5 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport * as i6 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nconst _c0 = [\"wrapper\"];\nfunction TuiHostedDropdownComponent_div_0_ng_template_3_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 8);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const text_r7 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", text_r7, \" \");\n }\n}\nconst _c1 = (a0, a1) => ({\n $implicit: a0,\n close: a1\n});\nfunction TuiHostedDropdownComponent_div_0_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r9 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 5, 6);\n i0.ɵɵlistener(\"keydown\", function TuiHostedDropdownComponent_div_0_ng_template_3_Template_div_keydown_0_listener($event) {\n i0.ɵɵrestoreView(_r9);\n const ctx_r8 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r8.onKeydown($event));\n });\n i0.ɵɵtemplate(2, TuiHostedDropdownComponent_div_0_ng_template_3_div_2_Template, 2, 1, \"div\", 7);\n i0.ɵɵelementEnd();\n i0.ɵɵelement(3, \"div\");\n }\n if (rf & 2) {\n i0.ɵɵnextContext();\n const _r2 = i0.ɵɵreference(1);\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r3.content)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction2(2, _c1, _r2, ctx_r3.close));\n }\n}\nfunction TuiHostedDropdownComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r11 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 1, 2);\n i0.ɵɵlistener(\"tuiActiveZoneChange\", function TuiHostedDropdownComponent_div_0_Template_div_tuiActiveZoneChange_0_listener($event) {\n i0.ɵɵrestoreView(_r11);\n const ctx_r10 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r10.onActiveZone($event));\n })(\"tuiObscured\", function TuiHostedDropdownComponent_div_0_Template_div_tuiObscured_0_listener($event) {\n i0.ɵɵrestoreView(_r11);\n const ctx_r12 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r12.onHostObscured($event));\n });\n i0.ɵɵprojection(2);\n i0.ɵɵtemplate(3, TuiHostedDropdownComponent_div_0_ng_template_3_Template, 4, 5, \"ng-template\", 3, 4, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const isOpen_r1 = ctx.tuiLet;\n const _r4 = i0.ɵɵreference(4);\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"tuiDropdown\", _r4)(\"tuiDropdownManual\", isOpen_r1 && ctx_r0.canOpen)(\"tuiDropdownSided\", ctx_r0.sided)(\"tuiObscuredEnabled\", isOpen_r1);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"polymorpheus\", ctx_r0.context);\n }\n}\nconst _c2 = [\"*\"];\nlet TuiAccessorProxyDirective = /*#__PURE__*/(() => {\n class TuiAccessorProxyDirective extends TuiPositionAccessor {\n constructor() {\n super(...arguments);\n this.type = 'dummy';\n }\n getPosition() {\n return [0, 0];\n }\n }\n TuiAccessorProxyDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiAccessorProxyDirective_BaseFactory;\n return function TuiAccessorProxyDirective_Factory(t) {\n return (ɵTuiAccessorProxyDirective_BaseFactory || (ɵTuiAccessorProxyDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiAccessorProxyDirective)))(t || TuiAccessorProxyDirective);\n };\n })();\n TuiAccessorProxyDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiAccessorProxyDirective,\n selectors: [[\"\", \"tuiAccessorProxy\", \"\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: TuiPositionAccessor,\n multi: true,\n deps: [[new Optional(), new SkipSelf(), TuiAccessorProxyDirective], TuiAccessorProxyDirective],\n useFactory: (accessor, fallback) => accessor || fallback\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiAccessorProxyDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_HOSTED_DROPDOWN_COMPONENT = new InjectionToken(`[TUI_HOSTED_DROPDOWN_COMPONENT]`);\nlet TuiDropdownOpenMonitorDirective = /*#__PURE__*/(() => {\n class TuiDropdownOpenMonitorDirective {\n constructor(destroy$, hosted, dropdown, open) {\n open === null || open === void 0 ? void 0 : open.tuiDropdownOpenChange.pipe(filter(value => value && open.dropdown === dropdown && !hosted.focused), takeUntil(destroy$)).subscribe(() => {\n var _a;\n (_a = hosted.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.focus();\n hosted.updateOpen(true);\n });\n }\n }\n TuiDropdownOpenMonitorDirective.ɵfac = function TuiDropdownOpenMonitorDirective_Factory(t) {\n return new (t || TuiDropdownOpenMonitorDirective)(i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(TUI_HOSTED_DROPDOWN_COMPONENT), i0.ɵɵdirectiveInject(TuiDropdownDirective, 2), i0.ɵɵdirectiveInject(TuiDropdownOpenDirective, 8));\n };\n TuiDropdownOpenMonitorDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownOpenMonitorDirective,\n selectors: [[\"\", \"tuiDropdownOpenMonitor\", \"\"]],\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])]\n });\n return TuiDropdownOpenMonitorDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHostedDropdownConnectorDirective = /*#__PURE__*/(() => {\n class TuiHostedDropdownConnectorDirective {}\n TuiHostedDropdownConnectorDirective.ɵfac = function TuiHostedDropdownConnectorDirective_Factory(t) {\n return new (t || TuiHostedDropdownConnectorDirective)();\n };\n TuiHostedDropdownConnectorDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHostedDropdownConnectorDirective,\n selectors: [[\"\", \"tuiHostedDropdownHost\", \"\"]]\n });\n return TuiHostedDropdownConnectorDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction shouldClose(event) {\n var _a;\n return 'key' in event && event.key.toLowerCase() === 'escape' && this.canOpen && this.open && !((_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.nextElementSibling);\n}\nlet TuiHostedDropdownComponent = /*#__PURE__*/(() => {\n class TuiHostedDropdownComponent {\n constructor(hover$, el) {\n this.hover$ = hover$;\n this.el = el;\n this.openChange$ = new BehaviorSubject(false);\n this.hostHover$ = combineLatest([tuiTypedFromEvent(this.el.nativeElement, 'mouseover').pipe(map(e => this.computedHost.contains(tuiGetActualTarget(e))), switchMap(visible => {\n var _a, _b;\n return of(visible).pipe(delay((visible ? (_a = this.hover$) === null || _a === void 0 ? void 0 : _a.showDelay : (_b = this.hover$) === null || _b === void 0 ? void 0 : _b.hideDelay) || 0));\n })), this.hover$ || EMPTY]).pipe(map(([visible, hovered]) => visible && hovered));\n this.sided = false;\n this.canOpen = true;\n this.open$ = merge(this.openChange$, this.hostHover$).pipe(skip(1), distinctUntilChanged(), share());\n this.focusedChange = new EventEmitter();\n this.focus$ = new BehaviorSubject(false);\n /** TODO: rename in 4.0 */\n this.openChange = this.openChange$;\n this.close = () => this.updateOpen(false);\n }\n set open(open) {\n this.openChange.next(open);\n }\n get open() {\n return this.openChange.value;\n }\n get host() {\n var _a;\n return ((_a = this.dropdownHost) === null || _a === void 0 ? void 0 : _a.nativeElement) || this.el.nativeElement;\n }\n get computedHost() {\n var _a;\n return ((_a = this.dropdownHost) === null || _a === void 0 ? void 0 : _a.nativeElement) || this.nativeFocusableElement || this.el.nativeElement;\n }\n get dropdown() {\n var _a, _b;\n return (_b = (_a = this.dropdownDirective) === null || _a === void 0 ? void 0 : _a.dropdownBoxRef) === null || _b === void 0 ? void 0 : _b.location.nativeElement;\n }\n get nativeFocusableElement() {\n return tuiIsNativeKeyboardFocusable(this.host) ? this.host : tuiGetClosestFocusable({\n initial: this.host,\n root: this.el.nativeElement\n });\n }\n get focused() {\n return tuiIsNativeFocusedIn(this.host) || this.open && !!this.wrapper && tuiIsNativeFocusedIn(this.wrapper.nativeElement);\n }\n onFocusInOut() {\n this.focus$.next(this.focused);\n }\n onFocusIn(target) {\n if (!this.computedHost.contains(target)) {\n this.updateOpen(false);\n }\n }\n onClick(target) {\n var _a;\n if (!this.hostEditable && this.computedHost.contains(target) && !((_a = this.hover$) === null || _a === void 0 ? void 0 : _a.hovered)) {\n this.updateOpen(!this.open);\n }\n }\n onKeyDownEsc(event) {\n event.preventDefault();\n this.closeDropdown();\n }\n onArrow(event, down) {\n this.focusDropdown(event, down);\n }\n onKeydown({\n key,\n target,\n defaultPrevented\n }) {\n if (!defaultPrevented && tuiIsEditingKey(key) && this.hostEditable && tuiIsHTMLElement(target) && !tuiIsElementEditable(target)) {\n this.focusHost();\n }\n }\n onActiveZone(active) {\n this.updateFocused(active);\n if (!active) {\n this.updateOpen(false);\n }\n }\n onHostObscured(obscured) {\n if (obscured) {\n this.closeDropdown();\n }\n }\n updateOpen(open) {\n if (!open || this.canOpen) {\n this.open = open;\n }\n }\n get hostEditable() {\n return tuiIsElementEditable(this.computedHost);\n }\n focusDropdown(event, first) {\n const host = this.nativeFocusableElement;\n if (!host || !tuiIsHTMLElement(host) || !tuiIsElement(event.target) || !host.contains(event.target)) {\n return;\n }\n if (!this.wrapper || !this.open || !this.dropdown || !tuiIsHTMLElement(this.wrapper.nativeElement.nextElementSibling)) {\n this.updateOpen(true);\n if (!tuiIsElementEditable(host)) {\n event.preventDefault();\n }\n return;\n }\n const initial = first ? this.wrapper.nativeElement : this.wrapper.nativeElement.nextElementSibling;\n const focusable = tuiGetClosestFocusable({\n initial,\n root: this.wrapper.nativeElement,\n previous: !first\n });\n if (!focusable) {\n return;\n }\n focusable.focus();\n event.preventDefault();\n }\n closeDropdown() {\n if (this.focused) {\n this.focusHost();\n }\n this.updateOpen(false);\n }\n focusHost() {\n const host = this.nativeFocusableElement;\n if (host) {\n host.focus({\n preventScroll: true\n });\n }\n }\n updateFocused(focused) {\n this.focusedChange.emit(focused);\n }\n }\n TuiHostedDropdownComponent.ɵfac = function TuiHostedDropdownComponent_Factory(t) {\n return new (t || TuiHostedDropdownComponent)(i0.ɵɵdirectiveInject(TuiDropdownHoverDirective, 10), i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiHostedDropdownComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiHostedDropdownComponent,\n selectors: [[\"tui-hosted-dropdown\"]],\n contentQueries: function TuiHostedDropdownComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, TuiHostedDropdownConnectorDirective, 5, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dropdownHost = _t.first);\n }\n },\n viewQuery: function TuiHostedDropdownComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5, ElementRef);\n i0.ɵɵviewQuery(TuiDropdownDirective$1, 5);\n i0.ɵɵviewQuery(TuiActiveZoneDirective, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.wrapper = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dropdownDirective = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.activeZone = _t.first);\n }\n },\n hostVars: 1,\n hostBindings: function TuiHostedDropdownComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"$.class._hosted_dropdown_focused\", function TuiHostedDropdownComponent___class__hosted_dropdown_focused_HostBindingHandler() {\n return ctx.focus$;\n })(\"focusin.capture.silent\", function TuiHostedDropdownComponent_focusin_capture_silent_HostBindingHandler() {\n return ctx.onFocusInOut();\n })(\"focusout.capture.silent\", function TuiHostedDropdownComponent_focusout_capture_silent_HostBindingHandler() {\n return ctx.onFocusInOut();\n })(\"focusin\", function TuiHostedDropdownComponent_focusin_HostBindingHandler($event) {\n return ctx.onFocusIn($event.target);\n })(\"click\", function TuiHostedDropdownComponent_click_HostBindingHandler($event) {\n return ctx.onClick($event.target);\n })(\"keydown.silent.capture\", function TuiHostedDropdownComponent_keydown_silent_capture_HostBindingHandler($event) {\n return ctx.onKeyDownEsc($event);\n }, false, i0.ɵɵresolveDocument)(\"keydown.arrowDown\", function TuiHostedDropdownComponent_keydown_arrowDown_HostBindingHandler($event) {\n return ctx.onArrow($event, true);\n })(\"keydown.arrowUp\", function TuiHostedDropdownComponent_keydown_arrowUp_HostBindingHandler($event) {\n return ctx.onArrow($event, false);\n });\n }\n if (rf & 2) {\n i0.ɵɵhostProperty(\"$.class._hosted_dropdown_focused\", ctx.focus$);\n }\n },\n inputs: {\n content: \"content\",\n sided: \"sided\",\n canOpen: \"canOpen\",\n open: \"open\"\n },\n outputs: {\n open$: \"openChange\",\n focusedChange: \"focusedChange\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiHostedDropdownComponent), {\n provide: TuiAccessorProxyDirective,\n deps: [[new Optional(), new Self(), TuiPositionAccessor]],\n useFactory: position => position === null || position === void 0 ? void 0 : position[0]\n }, {\n provide: TUI_HOSTED_DROPDOWN_COMPONENT,\n useExisting: TuiHostedDropdownComponent\n }])],\n ngContentSelectors: _c2,\n decls: 2,\n vars: 3,\n consts: [[\"tuiAccessorProxy\", \"\", \"tuiDropdownOpenMonitor\", \"\", \"class\", \"t-wrapper\", 3, \"tuiDropdown\", \"tuiDropdownManual\", \"tuiDropdownSided\", \"tuiObscuredEnabled\", \"tuiActiveZoneChange\", \"tuiObscured\", 4, \"tuiLet\"], [\"tuiAccessorProxy\", \"\", \"tuiDropdownOpenMonitor\", \"\", 1, \"t-wrapper\", 3, \"tuiDropdown\", \"tuiDropdownManual\", \"tuiDropdownSided\", \"tuiObscuredEnabled\", \"tuiActiveZoneChange\", \"tuiObscured\"], [\"activeZone\", \"tuiActiveZone\"], [3, \"polymorpheus\"], [\"dropdown\", \"polymorpheus\"], [1, \"t-dropdown\", 3, \"keydown\"], [\"wrapper\", \"\"], [\"class\", \"t-primitive\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [1, \"t-primitive\"]],\n template: function TuiHostedDropdownComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, TuiHostedDropdownComponent_div_0_Template, 5, 5, \"div\", 0);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n let tmp_0_0;\n i0.ɵɵproperty(\"tuiLet\", (tmp_0_0 = i0.ɵɵpipeBind1(1, 1, ctx.open$)) !== null && tmp_0_0 !== undefined ? tmp_0_0 : ctx.openChange.value);\n }\n },\n dependencies: [i1$1.TuiLetDirective, TuiAccessorProxyDirective, TuiDropdownOpenMonitorDirective, i4.TuiDropdownDirective, i4.TuiDropdownDriverDirective, i4.TuiDropdownManualDirective, i4.TuiDropdownPositionSidedDirective, i1$1.TuiActiveZoneDirective, i1$1.TuiObscuredDirective, i5.PolymorpheusTemplate, i5.PolymorpheusOutletDirective, i6.AsyncPipe],\n styles: [\"[_nghost-%COMP%]{display:inline-flex}.t-wrapper[_ngcontent-%COMP%]{border-radius:inherit;height:inherit;flex:1 1 auto;width:100%}.t-dropdown[_ngcontent-%COMP%]{height:100%}.t-primitive[_ngcontent-%COMP%]{padding:1rem}\"],\n changeDetection: 0\n });\n __decorate([shouldCall(shouldClose)], TuiHostedDropdownComponent.prototype, \"onKeyDownEsc\", null);\n return TuiHostedDropdownComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHostedDropdownModule = /*#__PURE__*/(() => {\n class TuiHostedDropdownModule {}\n TuiHostedDropdownModule.ɵfac = function TuiHostedDropdownModule_Factory(t) {\n return new (t || TuiHostedDropdownModule)();\n };\n TuiHostedDropdownModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiHostedDropdownModule\n });\n TuiHostedDropdownModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, PolymorpheusModule, TuiLetModule, TuiObscuredModule, TuiActiveZoneModule, TuiDropdownModule]]\n });\n return TuiHostedDropdownModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiAccessorProxyDirective, TuiDropdownOpenMonitorDirective, TuiHostedDropdownComponent, TuiHostedDropdownConnectorDirective, TuiHostedDropdownModule };\n","import { tuiCreateToken, tuiProvideOptions } from '@taiga-ui/cdk';\nimport { TuiAppearance } from '@taiga-ui/core/enums';\nimport * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, Input, HostBinding, NgModule } from '@angular/core';\nimport * as i1 from '@taiga-ui/core/components/svg';\nimport { TuiSvgModule } from '@taiga-ui/core/components/svg';\nimport * as i2 from '@taiga-ui/core/directives/wrapper';\nimport { TuiWrapperModule } from '@taiga-ui/core/directives/wrapper';\nimport * as i3 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\n\n/** Default values for the checkbox options. */\nfunction TuiPrimitiveCheckboxComponent_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 2);\n }\n if (rf & 2) {\n const src_r1 = ctx.polymorpheusOutlet;\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"t-mark_on\", !ctx_r0.empty);\n i0.ɵɵproperty(\"src\", src_r1);\n }\n}\nconst _c0 = a0 => ({\n $implicit: a0\n});\nconst _c1 = [\"*\"];\nconst TUI_CHECKBOX_DEFAULT_OPTIONS = {\n size: `m`,\n appearances: {\n unchecked: TuiAppearance.Outline,\n checked: TuiAppearance.Primary,\n indeterminate: TuiAppearance.Primary\n },\n icons: {\n checked: ({\n $implicit\n }) => $implicit === `m` ? `tuiIconCheck` : `tuiIconCheckLarge`,\n indeterminate: ({\n $implicit\n }) => $implicit === `m` ? `tuiIconMinus` : `tuiIconMinusLarge`\n }\n};\n/**\n * Default parameters for checkbox component\n */\nconst TUI_CHECKBOX_OPTIONS = tuiCreateToken(TUI_CHECKBOX_DEFAULT_OPTIONS);\nfunction tuiCheckboxOptionsProvider(options) {\n return tuiProvideOptions(TUI_CHECKBOX_OPTIONS, options, TUI_CHECKBOX_DEFAULT_OPTIONS);\n}\nlet TuiPrimitiveCheckboxComponent = /*#__PURE__*/(() => {\n class TuiPrimitiveCheckboxComponent {\n constructor(options) {\n this.options = options;\n this.size = this.options.size;\n this.disabled = false;\n this.focused = false;\n this.hovered = false;\n this.pressed = false;\n this.invalid = false;\n this.icon = this.options.icons.checked;\n this.value = false;\n }\n set valueSetter(value) {\n if (value !== false) {\n this.setCurrentIcon(value);\n }\n this.value = value;\n }\n get appearance() {\n switch (this.value) {\n case false:\n return this.options.appearances.unchecked;\n case true:\n return this.options.appearances.checked;\n default:\n return this.options.appearances.indeterminate;\n }\n }\n get empty() {\n return this.value === false;\n }\n setCurrentIcon(value) {\n this.icon = value === null ? this.options.icons.indeterminate : this.options.icons.checked;\n }\n }\n TuiPrimitiveCheckboxComponent.ɵfac = function TuiPrimitiveCheckboxComponent_Factory(t) {\n return new (t || TuiPrimitiveCheckboxComponent)(i0.ɵɵdirectiveInject(TUI_CHECKBOX_OPTIONS));\n };\n TuiPrimitiveCheckboxComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPrimitiveCheckboxComponent,\n selectors: [[\"tui-primitive-checkbox\"]],\n hostVars: 1,\n hostBindings: function TuiPrimitiveCheckboxComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"data-size\", ctx.size);\n }\n },\n inputs: {\n size: \"size\",\n disabled: \"disabled\",\n focused: \"focused\",\n hovered: \"hovered\",\n pressed: \"pressed\",\n invalid: \"invalid\",\n valueSetter: [\"value\", \"valueSetter\"]\n },\n ngContentSelectors: _c1,\n decls: 3,\n vars: 10,\n consts: [[\"tuiWrapper\", \"\", 3, \"active\", \"appearance\", \"disabled\", \"focus\", \"hover\", \"invalid\"], [\"class\", \"t-mark\", 3, \"t-mark_on\", \"src\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [1, \"t-mark\", 3, \"src\"]],\n template: function TuiPrimitiveCheckboxComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵtemplate(1, TuiPrimitiveCheckboxComponent_tui_svg_1_Template, 1, 3, \"tui-svg\", 1);\n i0.ɵɵprojection(2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"active\", ctx.pressed)(\"appearance\", ctx.appearance)(\"disabled\", ctx.disabled)(\"focus\", ctx.focused)(\"hover\", ctx.hovered)(\"invalid\", ctx.invalid);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.icon)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(8, _c0, ctx.size));\n }\n },\n dependencies: [i1.TuiSvgComponent, i2.TuiWrapperDirective, i3.PolymorpheusOutletDirective],\n styles: [\"[_nghost-%COMP%]{display:block;font-size:0;flex-shrink:0}[data-size=m][_nghost-%COMP%]{width:1rem;height:1rem;border-radius:var(--tui-radius-xs)}[data-size=l][_nghost-%COMP%]{width:1.5rem;height:1.5rem;border-radius:var(--tui-radius-s)}.t-mark[_ngcontent-%COMP%]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:block;width:100%;height:100%;transform:scale(0)}.t-mark_on[_ngcontent-%COMP%]{transform:scale(1)}\"],\n changeDetection: 0\n });\n return TuiPrimitiveCheckboxComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPrimitiveCheckboxModule = /*#__PURE__*/(() => {\n class TuiPrimitiveCheckboxModule {}\n TuiPrimitiveCheckboxModule.ɵfac = function TuiPrimitiveCheckboxModule_Factory(t) {\n return new (t || TuiPrimitiveCheckboxModule)();\n };\n TuiPrimitiveCheckboxModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPrimitiveCheckboxModule\n });\n TuiPrimitiveCheckboxModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[TuiSvgModule, TuiWrapperModule, PolymorpheusModule]]\n });\n return TuiPrimitiveCheckboxModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_CHECKBOX_DEFAULT_OPTIONS, TUI_CHECKBOX_OPTIONS, TuiPrimitiveCheckboxComponent, TuiPrimitiveCheckboxModule, tuiCheckboxOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Self, Inject, ViewChild, Input, HostBinding, HostListener, NgModule } from '@angular/core';\nimport { TuiDestroyService, TUI_IS_MOBILE } from '@taiga-ui/cdk';\nimport { TuiHintOptionsDirective, TUI_HINT_OPTIONS, TuiHintHoverDirective } from '@taiga-ui/core/directives';\nimport { MODE_PROVIDER } from '@taiga-ui/core/providers';\nimport { TUI_MODE } from '@taiga-ui/core/tokens';\nimport { takeUntil } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core/components/svg';\nimport { TuiSvgModule } from '@taiga-ui/core/components/svg';\nimport * as i2 from '@taiga-ui/core/directives/wrapper';\nimport { TuiWrapperModule } from '@taiga-ui/core/directives/wrapper';\nimport * as i3 from '@taiga-ui/core/directives/hint';\nimport { TuiHintModule } from '@taiga-ui/core/directives/hint';\nimport * as i4 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport * as i5 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i6 from 'rxjs';\nfunction TuiTooltipComponent_tui_svg_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 3);\n }\n if (rf & 2) {\n const src_r2 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r2);\n }\n}\nlet TuiTooltipComponent = /*#__PURE__*/(() => {\n class TuiTooltipComponent extends TuiHintOptionsDirective {\n constructor(destroy$, mode$, options, isMobile) {\n super(options);\n this.isMobile = isMobile;\n this.mode = null;\n this.describeId = '';\n mode$.pipe(takeUntil(destroy$)).subscribe(mode => {\n this.mode = mode;\n });\n }\n get computedAppearance() {\n return this.appearance || this.mode || '';\n }\n stopOnMobile(event) {\n var _a;\n if (this.isMobile) {\n event.preventDefault();\n event.stopPropagation();\n }\n (_a = this.driver$) === null || _a === void 0 ? void 0 : _a.toggle();\n }\n }\n TuiTooltipComponent.ɵfac = function TuiTooltipComponent_Factory(t) {\n return new (t || TuiTooltipComponent)(i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(TUI_MODE), i0.ɵɵdirectiveInject(TUI_HINT_OPTIONS), i0.ɵɵdirectiveInject(TUI_IS_MOBILE));\n };\n TuiTooltipComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTooltipComponent,\n selectors: [[\"tui-tooltip\"]],\n viewQuery: function TuiTooltipComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TuiHintHoverDirective, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.driver$ = _t.first);\n }\n },\n hostVars: 1,\n hostBindings: function TuiTooltipComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mousedown\", function TuiTooltipComponent_mousedown_HostBindingHandler($event) {\n return ctx.stopOnMobile($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-appearance\", ctx.computedAppearance);\n }\n },\n inputs: {\n content: \"content\",\n direction: \"direction\",\n appearance: \"appearance\",\n showDelay: \"showDelay\",\n hideDelay: \"hideDelay\",\n describeId: \"describeId\",\n context: \"context\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, MODE_PROVIDER]), i0.ɵɵInheritDefinitionFeature],\n decls: 4,\n vars: 11,\n consts: [[\"appearance\", \"icon\", \"automation-id\", \"tui-tooltip__icon\", \"tuiWrapper\", \"\", 1, \"t-tooltip-icon\", 3, \"hover\", \"tuiHint\", \"tuiHintAppearance\", \"tuiHintContext\", \"tuiHintDescribe\", \"tuiHintDirection\", \"tuiHintHideDelay\", \"tuiHintShowDelay\"], [\"driver\", \"tuiHintHover\"], [3, \"src\", 4, \"polymorpheusOutlet\"], [3, \"src\"]],\n template: function TuiTooltipComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 0, 1);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵtemplate(3, TuiTooltipComponent_tui_svg_3_Template, 1, 1, \"tui-svg\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const _r0 = i0.ɵɵreference(1);\n i0.ɵɵproperty(\"hover\", i0.ɵɵpipeBind1(2, 9, _r0) || null)(\"tuiHint\", ctx.content)(\"tuiHintAppearance\", ctx.computedAppearance)(\"tuiHintContext\", ctx.context)(\"tuiHintDescribe\", ctx.describeId)(\"tuiHintDirection\", ctx.direction)(\"tuiHintHideDelay\", ctx.hideDelay)(\"tuiHintShowDelay\", ctx.showDelay);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.icon);\n }\n },\n dependencies: [i1.TuiSvgComponent, i2.TuiWrapperDirective, i3.TuiHintDirective, i3.TuiHintDriverDirective, i3.TuiHintHoverDirective, i3.TuiHintPositionDirective, i3.TuiHintDescribeDirective, i4.PolymorpheusOutletDirective, i5.AsyncPipe],\n styles: [\"[_nghost-%COMP%]{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle;font-size:0;line-height:0;pointer-events:auto;cursor:pointer;color:var(--tui-text-01)}[data-appearance=error][_nghost-%COMP%]{color:var(--tui-error-fill)}.t-tooltip-icon[_ngcontent-%COMP%]{display:inline-block;width:100%;height:100%;color:inherit}[tuiWrapper][data-appearance=\\\"textfield\\\"][data-state=\\\"disabled\\\"][_nghost-%COMP%] .t-tooltip-icon[_ngcontent-%COMP%], [tuiWrapper][data-appearance=\\\"textfield\\\"][data-state=\\\"disabled\\\"] [_nghost-%COMP%] .t-tooltip-icon[_ngcontent-%COMP%]{opacity:1}\"],\n changeDetection: 0\n });\n return TuiTooltipComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTooltipModule = /*#__PURE__*/(() => {\n class TuiTooltipModule {}\n TuiTooltipModule.ɵfac = function TuiTooltipModule_Factory(t) {\n return new (t || TuiTooltipModule)();\n };\n TuiTooltipModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTooltipModule\n });\n TuiTooltipModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiWrapperModule, TuiSvgModule, TuiHintModule, PolymorpheusModule]]\n });\n return TuiTooltipModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTooltipComponent, TuiTooltipModule };\n","import { __decorate } from 'tslib';\nimport * as i0 from '@angular/core';\nimport { ElementRef, Component, ChangeDetectionStrategy, Inject, ViewChild, HostBinding, HostListener, EventEmitter, Optional, Input, Output, ContentChildren, Directive, NgModule } from '@angular/core';\nimport * as i6 from '@taiga-ui/cdk';\nimport { TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_FONTS_READY, AbstractTuiInteractive, tuiIsNativeFocusedIn, tuiRetargetedBoundaryCrossing, tuiAsFocusableItemAccessor, tuiPure, TuiIdService, TuiFocusableModule, TuiAutofilledModule } from '@taiga-ui/cdk';\nimport * as i11 from '@taiga-ui/core/directives/hint';\nimport { TuiHintOptionsDirective } from '@taiga-ui/core/directives/hint';\nimport * as i10 from '@taiga-ui/core/directives/textfield-controller';\nimport { TUI_TEXTFIELD_WATCHED_CONTROLLER, TUI_TEXTFIELD_OPTIONS, TEXTFIELD_CONTROLLER_PROVIDER } from '@taiga-ui/core/directives/textfield-controller';\nimport { tuiGetBorder } from '@taiga-ui/core/utils/miscellaneous';\nimport * as i9 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusOutletDirective, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport { BehaviorSubject, merge, fromEvent } from 'rxjs';\nimport { delay, filter, map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core/components/svg';\nimport { TuiSvgModule } from '@taiga-ui/core/components/svg';\nimport { TuiAppearance } from '@taiga-ui/core/enums';\nimport * as i3 from '@taiga-ui/core/components/tooltip';\nimport { TuiTooltipModule } from '@taiga-ui/core/components/tooltip';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from '@taiga-ui/core/directives/wrapper';\nimport { TuiWrapperModule } from '@taiga-ui/core/directives/wrapper';\nimport * as i7 from '@taiga-ui/core/directives/mask-accessor';\nimport { TuiMaskAccessorModule } from '@taiga-ui/core/directives/mask-accessor';\nimport * as i8 from '@angular/forms';\nimport { FormsModule } from '@angular/forms';\nimport { AbstractTuiTextfieldHost } from '@taiga-ui/core/abstract';\nimport { tuiAsTextfieldHost, TUI_TEXTFIELD_HOST, TUI_LEGACY_MASK } from '@taiga-ui/core/tokens';\nimport * as i1$1 from '@taiga-ui/core/directives';\nimport { TUI_TEXTFIELD_WATCHED_CONTROLLER as TUI_TEXTFIELD_WATCHED_CONTROLLER$1, TEXTFIELD_CONTROLLER_PROVIDER as TEXTFIELD_CONTROLLER_PROVIDER$1, TUI_TEXTFIELD_DEFAULT_OPTIONS, TUI_TEXTFIELD_OPTIONS as TUI_TEXTFIELD_OPTIONS$1, tuiTextfieldOptionsProvider } from '@taiga-ui/core/directives';\nconst _c0 = [\"pre\"];\nconst _c1 = [\"focusableElement\"];\nfunction TuiPrimitiveTextfieldComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction TuiPrimitiveTextfieldComponent_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction TuiPrimitiveTextfieldComponent_div_10_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 17);\n i0.ɵɵprojection(1, 2);\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiPrimitiveTextfieldComponent_div_12_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 20);\n }\n if (rf & 2) {\n const src_r12 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r12);\n }\n}\nconst _c2 = a0 => ({\n $implicit: a0\n});\nfunction TuiPrimitiveTextfieldComponent_div_12_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 18);\n i0.ɵɵtemplate(1, TuiPrimitiveTextfieldComponent_div_12_tui_svg_1_Template, 1, 1, \"tui-svg\", 19);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r4 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r4.iconLeftContent)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c2, ctx_r4.size));\n }\n}\nfunction TuiPrimitiveTextfieldComponent_label_14_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"label\", 21);\n i0.ɵɵprojection(1, 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r5 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"t-placeholder_raised\", ctx_r5.placeholderRaised);\n i0.ɵɵproperty(\"for\", ctx_r5.computedId);\n }\n}\nfunction TuiPrimitiveTextfieldComponent_div_20_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 24);\n }\n if (rf & 2) {\n const src_r14 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r14);\n }\n}\nfunction TuiPrimitiveTextfieldComponent_div_20_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 22);\n i0.ɵɵtemplate(1, TuiPrimitiveTextfieldComponent_div_20_tui_svg_1_Template, 1, 1, \"tui-svg\", 23);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r7 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r7.controller.customContent);\n }\n}\nfunction TuiPrimitiveTextfieldComponent_span_21_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 27);\n }\n if (rf & 2) {\n const src_r16 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r16);\n }\n}\nfunction TuiPrimitiveTextfieldComponent_span_21_Template(rf, ctx) {\n if (rf & 1) {\n const _r18 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"span\", 25);\n i0.ɵɵlistener(\"click.stop\", function TuiPrimitiveTextfieldComponent_span_21_Template_span_click_stop_0_listener() {\n i0.ɵɵrestoreView(_r18);\n const ctx_r17 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r17.clear());\n });\n i0.ɵɵtemplate(1, TuiPrimitiveTextfieldComponent_span_21_tui_svg_1_Template, 1, 1, \"tui-svg\", 26);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r8 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r8.iconCleaner || ctx_r8.controller.options.iconCleaner)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c2, ctx_r8.size));\n }\n}\nfunction TuiPrimitiveTextfieldComponent_tui_tooltip_22_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-tooltip\", 28);\n }\n if (rf & 2) {\n const ctx_r9 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", ctx_r9.hintOptions == null ? null : ctx_r9.hintOptions.content)(\"describeId\", ctx_r9.computedId);\n }\n}\nfunction TuiPrimitiveTextfieldComponent_div_23_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 20);\n }\n if (rf & 2) {\n const src_r20 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r20);\n }\n}\nfunction TuiPrimitiveTextfieldComponent_div_23_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 29);\n i0.ɵɵtemplate(1, TuiPrimitiveTextfieldComponent_div_23_tui_svg_1_Template, 1, 1, \"tui-svg\", 19);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r10 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r10.iconContent)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c2, ctx_r10.size));\n }\n}\nconst _c3 = [[[\"input\"]], [[\"select\"]], [[\"tuiContent\"]], \"*\"];\nconst _c4 = [\"input\", \"select\", \"tuiContent\", \"*\"];\nconst _c5 = [\"tuiTextfield\", \"\"];\nlet TuiValueDecorationComponent = /*#__PURE__*/(() => {\n class TuiValueDecorationComponent {\n constructor(textfield, fontsReady$) {\n this.textfield = textfield;\n this.fontsReady$ = fontsReady$;\n this.prefix$ = new BehaviorSubject('');\n this.pre$ = merge(this.fontsReady$, this.prefix$).pipe(delay(0), filter(() => {\n var _a;\n return !!((_a = this.pre) === null || _a === void 0 ? void 0 : _a.nativeElement.isConnected);\n }), map(() => {\n var _a;\n return ((_a = this.pre) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetWidth) || 0;\n }), distinctUntilChanged());\n }\n get isContextTable() {\n return this.textfield.appearance === TuiAppearance.Table;\n }\n get value() {\n return this.textfield.value;\n }\n get filler() {\n const {\n focused,\n placeholder,\n exampleText,\n value,\n textfield\n } = this;\n if (placeholder && exampleText) {\n return '';\n }\n return focused ? exampleText || textfield.filler.slice(value.length) : '';\n }\n get prefix() {\n return this.decorationsVisible ? this.textfield.prefix : '';\n }\n get postfix() {\n return this.decorationsVisible ? this.computedPostfix : '';\n }\n ngDoCheck() {\n this.prefix$.next(this.prefix);\n }\n get placeholder() {\n var _a;\n return ((_a = this.textfield.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || '';\n }\n get exampleText() {\n return !this.value && this.focused ? this.placeholder : '';\n }\n get decorationsVisible() {\n return !!this.value || this.focused && !this.placeholder;\n }\n get focused() {\n return this.textfield.computedFocused && !this.textfield.readOnly;\n }\n get computedPostfix() {\n return this.textfield.postfix && (this.filler || this.value) ? ` ${this.textfield.postfix}` : this.textfield.postfix;\n }\n }\n TuiValueDecorationComponent.ɵfac = function TuiValueDecorationComponent_Factory(t) {\n return new (t || TuiValueDecorationComponent)(i0.ɵɵdirectiveInject(TUI_FOCUSABLE_ITEM_ACCESSOR), i0.ɵɵdirectiveInject(TUI_FONTS_READY));\n };\n TuiValueDecorationComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiValueDecorationComponent,\n selectors: [[\"tui-value-decoration\"]],\n viewQuery: function TuiValueDecorationComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 7, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.pre = _t.first);\n }\n },\n hostVars: 4,\n hostBindings: function TuiValueDecorationComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"animationstart\", function TuiValueDecorationComponent_animationstart_HostBindingHandler() {\n return ctx.ngDoCheck();\n });\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"_table\", ctx.isContextTable)(\"_filler\", ctx.filler);\n }\n },\n decls: 5,\n vars: 4,\n consts: [[1, \"t-prefix\", 3, \"textContent\"], [\"pre\", \"\"], [1, \"t-ghost\", 3, \"textContent\"], [1, \"t-filler\", 3, \"textContent\"], [1, \"t-postfix\", 3, \"textContent\"]],\n template: function TuiValueDecorationComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 0, 1)(2, \"span\", 2)(3, \"span\", 3)(4, \"span\", 4);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"textContent\", ctx.prefix);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"textContent\", ctx.value);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"textContent\", ctx.filler);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"textContent\", ctx.postfix);\n }\n },\n styles: [\"[_nghost-%COMP%]{position:absolute;display:block;width:100%;line-height:var(--tui-height);margin-top:calc(var(--tui-height) / -2);box-sizing:content-box;color:var(--tui-text-03);animation:tuiPresent 1s;white-space:nowrap}._table[_nghost-%COMP%]{position:static;margin-top:0}._filler[_nghost-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}tui-primitive-textfield [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]{color:var(--tui-text-03-night)}tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside) [_nghost-%COMP%]{line-height:calc(var(--tui-height) - .25rem)}.t-ghost[_ngcontent-%COMP%]{visibility:hidden;white-space:pre;text-overflow:clip}.t-prefix[_ngcontent-%COMP%], .t-postfix[_ngcontent-%COMP%]{white-space:pre;color:var(--tui-text-01)}tui-primitive-textfield [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%] .t-prefix[_ngcontent-%COMP%], tui-primitive-textfield [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%] .t-prefix[_ngcontent-%COMP%], tui-primitive-textfield [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%] .t-postfix[_ngcontent-%COMP%], tui-primitive-textfield [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%] .t-postfix[_ngcontent-%COMP%]{color:var(--tui-text-01-night)}.t-filler[_ngcontent-%COMP%]{max-width:100%;white-space:nowrap}\"]\n });\n return TuiValueDecorationComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_ICON_PADDINGS = {\n s: 1.25,\n m: 1.75,\n l: 2.25\n};\nlet TuiPrimitiveTextfieldComponent = /*#__PURE__*/(() => {\n class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {\n constructor(controller, hintOptions, options, el) {\n super();\n this.controller = controller;\n this.hintOptions = hintOptions;\n this.options = options;\n this.el = el;\n this.editable = true;\n /** @deprecated use `tuiTextfieldFiller` from {@link TuiTextfieldControllerModule} instead */\n this.textfieldFiller = '';\n /**\n * @deprecated:\n * use `tuiTextfieldOptionsProvider({iconCleaner: `tuiIconChevronUp`})`\n */\n this.iconCleaner = this.options.iconCleaner;\n this.readOnly = false;\n this.invalid = false;\n this.disabled = false;\n /** @deprecated use `tuiTextfieldPrefix` from {@link TuiTextfieldControllerModule} instead */\n this.textfieldPrefix = '';\n /** @deprecated use `tuiTextfieldPostfix` from {@link TuiTextfieldControllerModule} instead */\n this.textfieldPostfix = '';\n this.value = '';\n this.valueChange = new EventEmitter();\n this.autofilled = false;\n }\n get prefix() {\n return this.textfieldPrefix || this.controller.prefix;\n }\n get postfix() {\n return this.textfieldPostfix || this.controller.postfix;\n }\n get filler() {\n return this.textfieldFiller || this.controller.filler;\n }\n get nativeFocusableElement() {\n if (this.computedDisabled || !this.focusableElement) {\n return null;\n }\n const {\n nativeElement\n } = this.focusableElement;\n return nativeElement.previousElementSibling || nativeElement;\n }\n get focused() {\n return tuiIsNativeFocusedIn(this.el.nativeElement);\n }\n get appearance() {\n return this.controller.appearance;\n }\n get size() {\n return this.controller.size;\n }\n get computedInvalid() {\n return !this.readOnly && !this.disabled && this.invalid;\n }\n get inputHidden() {\n var _a;\n return !!((_a = this.content) === null || _a === void 0 ? void 0 : _a.length);\n }\n get hasValue() {\n return !!this.value;\n }\n get hasCleaner() {\n return this.controller.cleaner && this.hasValue && !this.computedDisabled && !this.readOnly;\n }\n get hasTooltip() {\n var _a;\n return !!((_a = this.hintOptions) === null || _a === void 0 ? void 0 : _a.content) && !this.computedDisabled;\n }\n get hasCustomContent() {\n return !!this.controller.customContent;\n }\n get placeholderVisible() {\n var _a;\n const hasDecor = ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || this.prefix || this.postfix || this.filler;\n const showDecor = hasDecor && !this.readOnly && this.computedFocused;\n return !this.hasValue && !showDecor;\n }\n get hasPlaceholder() {\n return this.placeholderRaisable || this.placeholderVisible;\n }\n get placeholderRaised() {\n return this.placeholderRaisable && (this.computedFocused && !this.readOnly || this.hasValue || this.autofilled);\n }\n get borderStart() {\n return this.iconLeftContent ? this.iconPaddingLeft : 0;\n }\n get borderEnd() {\n return tuiGetBorder(!!this.iconContent, this.hasCleaner, this.hasTooltip, this.hasCustomContent, this.size);\n }\n get iconContent() {\n return this.controller.icon;\n }\n get iconLeftContent() {\n return this.controller.iconLeft;\n }\n get showHint() {\n var _a;\n return !!((_a = this.hintOptions) === null || _a === void 0 ? void 0 : _a.content) && (this.options.hintOnDisabled || !this.computedDisabled);\n }\n // Safari expiration date autofill workaround\n get name() {\n var _a;\n return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.autocomplete) === 'cc-exp' ? 'ccexpiryyear' : null;\n }\n get computedId() {\n var _a;\n return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.id) || '';\n }\n onFocused(focused) {\n this.updateFocused(focused);\n }\n getIndent$(element) {\n return fromEvent(element, 'scroll').pipe(map(() => -1 * Math.max(element.scrollLeft, 0)));\n }\n clear() {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = '';\n }\n this.updateValue('');\n }\n onMouseDown(event) {\n const {\n nativeFocusableElement\n } = this;\n if (!nativeFocusableElement || event.target === nativeFocusableElement) {\n return;\n }\n event.preventDefault();\n nativeFocusableElement.focus();\n }\n onModelChange(value) {\n this.updateValue(value);\n }\n onAutofilled(autofilled) {\n this.updateAutofilled(autofilled);\n }\n detectRetargetFromLabel(event) {\n if (tuiRetargetedBoundaryCrossing(event)) {\n event.stopImmediatePropagation();\n }\n }\n get iconPaddingLeft() {\n return TUI_ICON_PADDINGS[this.size];\n }\n get placeholderRaisable() {\n return this.size !== 's' && !this.controller.labelOutside;\n }\n updateAutofilled(autofilled) {\n if (this.autofilled === autofilled) {\n return;\n }\n this.autofilled = autofilled;\n }\n updateValue(value) {\n this.value = value;\n this.valueChange.emit(value);\n }\n }\n TuiPrimitiveTextfieldComponent.ɵfac = function TuiPrimitiveTextfieldComponent_Factory(t) {\n return new (t || TuiPrimitiveTextfieldComponent)(i0.ɵɵdirectiveInject(TUI_TEXTFIELD_WATCHED_CONTROLLER), i0.ɵɵdirectiveInject(TuiHintOptionsDirective, 8), i0.ɵɵdirectiveInject(TUI_TEXTFIELD_OPTIONS), i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiPrimitiveTextfieldComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPrimitiveTextfieldComponent,\n selectors: [[\"tui-primitive-textfield\"]],\n contentQueries: function TuiPrimitiveTextfieldComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, PolymorpheusOutletDirective, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.content = _t);\n }\n },\n viewQuery: function TuiPrimitiveTextfieldComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c1, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusableElement = _t.first);\n }\n },\n hostVars: 15,\n hostBindings: function TuiPrimitiveTextfieldComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focusin\", function TuiPrimitiveTextfieldComponent_focusin_HostBindingHandler() {\n return ctx.onFocused(true);\n })(\"focusout\", function TuiPrimitiveTextfieldComponent_focusout_HostBindingHandler() {\n return ctx.onFocused(false);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-size\", ctx.size);\n i0.ɵɵstyleProp(\"--border-start\", ctx.borderStart, \"rem\")(\"--border-end\", ctx.borderEnd, \"rem\");\n i0.ɵɵclassProp(\"_autofilled\", ctx.autofilled)(\"_label-outside\", ctx.controller.labelOutside)(\"_readonly\", ctx.readOnly)(\"_invalid\", ctx.computedInvalid)(\"_hidden\", ctx.inputHidden);\n }\n },\n inputs: {\n editable: \"editable\",\n textfieldFiller: [\"filler\", \"textfieldFiller\"],\n iconCleaner: \"iconCleaner\",\n readOnly: \"readOnly\",\n invalid: \"invalid\",\n disabled: \"disabled\",\n textfieldPrefix: [\"prefix\", \"textfieldPrefix\"],\n textfieldPostfix: [\"postfix\", \"textfieldPostfix\"],\n value: \"value\"\n },\n outputs: {\n valueChange: \"valueChange\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiPrimitiveTextfieldComponent), TEXTFIELD_CONTROLLER_PROVIDER]), i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c4,\n decls: 24,\n vars: 37,\n consts: [[4, \"ngIf\"], [\"automation-id\", \"tui-primitive-textfield__wrapper\", \"tuiWrapper\", \"\", 3, \"active\", \"appearance\", \"disabled\", \"focus\", \"hover\", \"invalid\", \"readOnly\", \"click.prevent.silent\", \"mousedown\", \"tuiAutofilledChange\"], [\"automation-id\", \"tui-primitive-textfield__native-input\", \"tuiMaskAccessor\", \"\", 1, \"t-input\", 3, \"disabled\", \"id\", \"ngModel\", \"readOnly\", \"tuiFocusable\", \"ngModelChange\"], [\"focusableElement\", \"\"], [\"automation-id\", \"tui-primitive-textfield__value\", \"class\", \"t-input t-input_template\", 4, \"ngIf\"], [1, \"t-content\"], [\"class\", \"t-icon t-icon_left t-textfield-icon\", 4, \"ngIf\"], [1, \"t-wrapper\"], [\"automation-id\", \"tui-primitive-textfield__placeholder\", \"class\", \"t-placeholder\", 3, \"t-placeholder_raised\", \"for\", 4, \"ngIf\"], [1, \"t-wrapper-value-decoration\"], [\"aria-hidden\", \"true\", \"automation-id\", \"tui-primitive-textfield__value-decoration\", 1, \"t-value-decoration\"], [\"decor\", \"\"], [1, \"t-icons\"], [\"automation-id\", \"tui-primitive-textfield__custom-content\", \"class\", \"t-custom-content\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"automation-id\", \"tui-primitive-textfield__cleaner\", \"tuiWrapper\", \"\", \"class\", \"t-cleaner\", 3, \"click.stop\", 4, \"ngIf\"], [\"automation-id\", \"tui-primitive-textfield__tooltip\", \"class\", \"t-tooltip\", 3, \"content\", \"describeId\", 4, \"ngIf\"], [\"class\", \"t-icon t-textfield-icon\", 4, \"ngIf\"], [\"automation-id\", \"tui-primitive-textfield__value\", 1, \"t-input\", \"t-input_template\"], [1, \"t-icon\", \"t-icon_left\", \"t-textfield-icon\"], [\"appearance\", \"icon\", \"tuiWrapper\", \"\", 3, \"src\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [\"appearance\", \"icon\", \"tuiWrapper\", \"\", 3, \"src\"], [\"automation-id\", \"tui-primitive-textfield__placeholder\", 1, \"t-placeholder\", 3, \"for\"], [\"automation-id\", \"tui-primitive-textfield__custom-content\", 1, \"t-custom-content\"], [\"class\", \"t-custom-icon\", 3, \"src\", 4, \"polymorpheusOutlet\"], [1, \"t-custom-icon\", 3, \"src\"], [\"appearance\", \"icon\", \"automation-id\", \"tui-primitive-textfield__cleaner\", \"tuiWrapper\", \"\", 1, \"t-cleaner\", 3, \"click.stop\"], [3, \"src\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [3, \"src\"], [\"automation-id\", \"tui-primitive-textfield__tooltip\", 1, \"t-tooltip\", 3, \"content\", \"describeId\"], [1, \"t-icon\", \"t-textfield-icon\"]],\n template: function TuiPrimitiveTextfieldComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c3);\n i0.ɵɵtemplate(0, TuiPrimitiveTextfieldComponent_ng_container_0_Template, 1, 0, \"ng-container\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵtemplate(2, TuiPrimitiveTextfieldComponent_ng_container_2_Template, 1, 0, \"ng-container\", 0);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelementStart(4, \"div\", 1);\n i0.ɵɵlistener(\"click.prevent.silent\", function TuiPrimitiveTextfieldComponent_Template_div_click_prevent_silent_4_listener($event) {\n return ctx.detectRetargetFromLabel($event);\n })(\"mousedown\", function TuiPrimitiveTextfieldComponent_Template_div_mousedown_4_listener($event) {\n return ctx.onMouseDown($event);\n })(\"tuiAutofilledChange\", function TuiPrimitiveTextfieldComponent_Template_div_tuiAutofilledChange_4_listener($event) {\n return ctx.onAutofilled($event);\n });\n i0.ɵɵpipe(5, \"async\");\n i0.ɵɵprojection(6);\n i0.ɵɵprojection(7, 1);\n i0.ɵɵelementStart(8, \"input\", 2, 3);\n i0.ɵɵlistener(\"ngModelChange\", function TuiPrimitiveTextfieldComponent_Template_input_ngModelChange_8_listener($event) {\n return ctx.onModelChange($event);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(10, TuiPrimitiveTextfieldComponent_div_10_Template, 2, 0, \"div\", 4);\n i0.ɵɵelementStart(11, \"div\", 5);\n i0.ɵɵtemplate(12, TuiPrimitiveTextfieldComponent_div_12_Template, 2, 4, \"div\", 6);\n i0.ɵɵelementStart(13, \"div\", 7);\n i0.ɵɵtemplate(14, TuiPrimitiveTextfieldComponent_label_14_Template, 2, 3, \"label\", 8);\n i0.ɵɵelementStart(15, \"div\", 9)(16, \"tui-value-decoration\", 10, 11);\n i0.ɵɵpipe(18, \"async\");\n i0.ɵɵelementEnd()()();\n i0.ɵɵelementStart(19, \"div\", 12);\n i0.ɵɵtemplate(20, TuiPrimitiveTextfieldComponent_div_20_Template, 2, 1, \"div\", 13)(21, TuiPrimitiveTextfieldComponent_span_21_Template, 2, 4, \"span\", 14)(22, TuiPrimitiveTextfieldComponent_tui_tooltip_22_Template, 1, 2, \"tui-tooltip\", 15)(23, TuiPrimitiveTextfieldComponent_div_23_Template, 2, 4, \"div\", 16);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n const _r2 = i0.ɵɵreference(9);\n const _r6 = i0.ɵɵreference(17);\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 29, ctx.content == null ? null : ctx.content.changes));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(3, 31, ctx.hintOptions == null ? null : ctx.hintOptions.change$));\n i0.ɵɵadvance(2);\n i0.ɵɵstyleProp(\"--text-indent\", i0.ɵɵpipeBind1(5, 33, _r6.pre$), \"px\");\n i0.ɵɵproperty(\"active\", ctx.pseudoActive)(\"appearance\", ctx.appearance)(\"disabled\", ctx.disabled)(\"focus\", ctx.computedFocused)(\"hover\", ctx.pseudoHover)(\"invalid\", ctx.computedInvalid)(\"readOnly\", ctx.readOnly);\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"disabled\", ctx.computedDisabled)(\"id\", ctx.id)(\"ngModel\", ctx.value)(\"readOnly\", ctx.readOnly || !ctx.editable)(\"tuiFocusable\", ctx.computedFocusable);\n i0.ɵɵattribute(\"aria-invalid\", ctx.computedInvalid)(\"name\", ctx.name);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.inputHidden);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.iconLeftContent);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.hasPlaceholder);\n i0.ɵɵadvance(2);\n i0.ɵɵstyleProp(\"text-indent\", i0.ɵɵpipeBind1(18, 35, ctx.getIndent$(_r2)), \"px\");\n i0.ɵɵclassProp(\"t-has-value\", ctx.value);\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"ngIf\", ctx.hasCustomContent);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.hasCleaner);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.showHint);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.iconContent);\n }\n },\n dependencies: [i1.TuiSvgComponent, TuiValueDecorationComponent, i3.TuiTooltipComponent, i4.NgIf, i5.TuiWrapperDirective, i6.TuiAutofilledDirective, i7.TuiMaskAccessorDirective, i8.DefaultValueAccessor, i8.NgControlStatus, i8.NgModel, i6.TuiFocusableDirective, i9.PolymorpheusOutletDirective, i4.AsyncPipe],\n styles: [\"[_nghost-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;text-align:left;border-radius:var(--tui-radius-m);height:var(--tui-height);min-height:var(--tui-height);max-height:var(--tui-height)}[data-size=s][_nghost-%COMP%]{--tui-height: var(--tui-height-s)}[data-size=m][_nghost-%COMP%]{--tui-height: var(--tui-height-m)}[data-size=l][_nghost-%COMP%]{--tui-height: var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input[_ngcontent-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;border-style:solid;border-color:transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-input[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input[_ngcontent-%COMP%]:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-input[_ngcontent-%COMP%]::-webkit-caps-lock-indicator, .t-input[_ngcontent-%COMP%]::-webkit-contacts-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-credit-card-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-credentials-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}.t-input[_ngcontent-%COMP%]::placeholder{color:var(--tui-text-03);opacity:0}._focused[_nghost-%COMP%]:not(._readonly) .t-input[_ngcontent-%COMP%]::placeholder, tui-primitive-textfield._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-primitive-textfield._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-textarea._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-textarea._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-text-area._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-text-area._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder{opacity:1}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]:-webkit-autofill, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]:-webkit-autofill, [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-input [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]:-webkit-autofill:hover, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]:-webkit-autofill:hover, [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill:focus, .t-input [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]:-webkit-autofill:focus, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, .t-input [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]::placeholder, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]::placeholder{color:var(--tui-text-03-night)}[data-size=s][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"s\\\"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"s\\\"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size=\\\"s\\\"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size=\\\"s\\\"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size=\\\"s\\\"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size=\\\"s\\\"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-s)}[data-size=m][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"m\\\"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"m\\\"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size=\\\"m\\\"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size=\\\"m\\\"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size=\\\"m\\\"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size=\\\"m\\\"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-m)}[data-size=l][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"l\\\"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"l\\\"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size=\\\"l\\\"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size=\\\"l\\\"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size=\\\"l\\\"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size=\\\"l\\\"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-l)}._disabled[_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield._disabled[_nghost-%COMP%], tui-primitive-textfield._disabled [_nghost-%COMP%], .t-input tui-textarea._disabled[_nghost-%COMP%], tui-textarea._disabled [_nghost-%COMP%], .t-input tui-text-area._disabled[_nghost-%COMP%], tui-text-area._disabled [_nghost-%COMP%]{pointer-events:none}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield){padding-top:1.25rem}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield){padding-top:1rem}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.69rem;transform:translateY(-.5rem)}._hidden[_nghost-%COMP%] input.t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield._hidden[_nghost-%COMP%], tui-primitive-textfield._hidden [_nghost-%COMP%]{opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;box-sizing:border-box;align-items:center;overflow:hidden}[data-size=s][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-s)}[data-size=m][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-m)}[data-size=l][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-l)}.t-wrapper[_ngcontent-%COMP%]{flex:1;min-width:0;-webkit-padding-end:.25rem;padding-inline-end:.25rem}.t-placeholder[_ngcontent-%COMP%]{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}@supports (-webkit-hyphens: none){.t-placeholder[_ngcontent-%COMP%]{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised[_ngcontent-%COMP%]{transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}._invalid[_nghost-%COMP%]:not(._focused) .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill)}._invalid[_nghost-%COMP%]:not(._focused) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill-night)}._focused[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-03)}[data-size=l][_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font:var(--tui-font-text-m);line-height:1.25rem}[data-size=l][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font-size:.8156rem}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01-night)}._focused[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}.t-cleaner[_ngcontent-%COMP%]{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}._readonly[_nghost-%COMP%] .t-cleaner[_ngcontent-%COMP%], ._disabled[_nghost-%COMP%] .t-cleaner[_ngcontent-%COMP%]{pointer-events:none}.t-icon[_ngcontent-%COMP%]{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}[data-size=s][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-start:-.375rem;margin-inline-start:-.375rem}[data-size=m][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-start:-.125rem;margin-inline-start:-.125rem;-webkit-margin-end:.375rem;margin-inline-end:.375rem}[data-size=l][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-end:.75rem;margin-inline-end:.75rem}.t-icons[_ngcontent-%COMP%]{display:flex;align-items:center}[data-size=m][_nghost-%COMP%] .t-icons[_ngcontent-%COMP%]{-webkit-margin-end:-.125rem;margin-inline-end:-.125rem}[data-size=s][_nghost-%COMP%] .t-icons[_ngcontent-%COMP%]{-webkit-margin-end:-.375rem;margin-inline-end:-.375rem}[_nghost-%COMP%]:not([data-size=\\\"s\\\"]) .t-icons[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(:first-child){-webkit-margin-start:.25rem;margin-inline-start:.25rem}._autofilled[data-size=s][_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], ._autofilled._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], ._autofilled[_nghost-%COMP%] .t-value-decoration[_ngcontent-%COMP%]:not(.t-has-value){visibility:hidden}.t-custom-content[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;pointer-events:none}.t-custom-icon[_ngcontent-%COMP%]{width:2rem;height:100%}.t-input[_ngcontent-%COMP%]:not(:first-child){display:none}[data-size][_nghost-%COMP%] .t-input_template[_ngcontent-%COMP%]{display:flex;width:calc(100% - 1rem);max-width:calc(100% - 1rem);align-items:center;pointer-events:none;-webkit-padding-end:0;padding-inline-end:0}.t-text-template[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration[_ngcontent-%COMP%]{position:relative;pointer-events:none}\"],\n changeDetection: 0\n });\n __decorate([tuiPure], TuiPrimitiveTextfieldComponent.prototype, \"getIndent$\", null);\n return TuiPrimitiveTextfieldComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPrimitiveTextfieldDirective = /*#__PURE__*/(() => {\n class TuiPrimitiveTextfieldDirective extends AbstractTuiTextfieldHost {\n constructor(textfield) {\n /**\n * TuiPrimitiveTextfieldComponent satisfies all required parts of\n * AbstractTuiControl interface. A new interface is not introduced\n * so AbstractTuiControl is automatically injected for all other controls.\n */\n super(textfield);\n this.textfield = textfield;\n }\n get readOnly() {\n return this.textfield.readOnly || !this.textfield.editable;\n }\n onValueChange(value) {\n this.textfield.onModelChange(value);\n }\n }\n TuiPrimitiveTextfieldDirective.ɵfac = function TuiPrimitiveTextfieldDirective_Factory(t) {\n return new (t || TuiPrimitiveTextfieldDirective)(i0.ɵɵdirectiveInject(TuiPrimitiveTextfieldComponent));\n };\n TuiPrimitiveTextfieldDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiPrimitiveTextfieldDirective,\n selectors: [[\"tui-primitive-textfield\"]],\n features: [i0.ɵɵProvidersFeature([tuiAsTextfieldHost(TuiPrimitiveTextfieldDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiPrimitiveTextfieldDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTextfieldComponent = /*#__PURE__*/(() => {\n class TuiTextfieldComponent {\n constructor(host, controller, el, idService, legacyMask) {\n this.host = host;\n this.controller = controller;\n this.el = el;\n this.idService = idService;\n this.legacyMask = legacyMask;\n this.host.process(this.el.nativeElement);\n }\n get id() {\n return this.el.nativeElement.id || this.idService.generate();\n }\n get inputMode() {\n return this.el.nativeElement.inputMode || this.host.inputMode;\n }\n }\n TuiTextfieldComponent.ɵfac = function TuiTextfieldComponent_Factory(t) {\n return new (t || TuiTextfieldComponent)(i0.ɵɵdirectiveInject(TUI_TEXTFIELD_HOST), i0.ɵɵdirectiveInject(TUI_TEXTFIELD_WATCHED_CONTROLLER$1), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TuiIdService), i0.ɵɵdirectiveInject(TUI_LEGACY_MASK, 8));\n };\n TuiTextfieldComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTextfieldComponent,\n selectors: [[\"input\", \"tuiTextfield\", \"\"], [\"textarea\", \"tuiTextfield\", \"\"]],\n hostAttrs: [\"type\", \"text\"],\n hostVars: 7,\n hostBindings: function TuiTextfieldComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"input\", function TuiTextfieldComponent_input_HostBindingHandler($event) {\n return !ctx.legacyMask && ctx.host.onValueChange($event.target.value);\n });\n }\n if (rf & 2) {\n i0.ɵɵhostProperty(\"tabIndex\", ctx.host.focusable ? 0 : -1)(\"readOnly\", ctx.host.readOnly)(\"value\", ctx.host.value);\n i0.ɵɵattribute(\"id\", ctx.id)(\"inputMode\", ctx.inputMode)(\"aria-invalid\", ctx.host.invalid)(\"disabled\", ctx.host.disabled || null);\n }\n },\n features: [i0.ɵɵProvidersFeature([TEXTFIELD_CONTROLLER_PROVIDER$1])],\n attrs: _c5,\n decls: 0,\n vars: 0,\n template: function TuiTextfieldComponent_Template(rf, ctx) {},\n styles: [\"[_nghost-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;border-style:solid;border-color:transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}[_nghost-%COMP%]:-webkit-autofill, [_nghost-%COMP%]:-webkit-autofill:hover, [_nghost-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}[_nghost-%COMP%]:-webkit-autofill, [_nghost-%COMP%]:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}[_nghost-%COMP%]::-webkit-caps-lock-indicator, [_nghost-%COMP%]::-webkit-contacts-auto-fill-button, [_nghost-%COMP%]::-webkit-credit-card-auto-fill-button, [_nghost-%COMP%]::-webkit-credentials-auto-fill-button, [_nghost-%COMP%]::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}[_nghost-%COMP%]::placeholder{color:var(--tui-text-03);opacity:0}._focused[_nghost-%COMP%]:not(._readonly) [_ngcontent-%COMP%]::placeholder, tui-primitive-textfield._focused:not(._readonly) [_nghost-%COMP%]::placeholder, tui-textarea._focused:not(._readonly) [_nghost-%COMP%]::placeholder, tui-text-area._focused:not(._readonly) [_nghost-%COMP%]::placeholder{opacity:1}[tuiWrapper][data-mode=onDark] [_nghost-%COMP%]:-webkit-autofill, [_nghost-%COMP%] [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]:-webkit-autofill, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]:-webkit-autofill, [tuiWrapper][data-mode=onDark] [_nghost-%COMP%]:-webkit-autofill:hover, [_nghost-%COMP%] [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]:-webkit-autofill:hover, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]:-webkit-autofill:hover, [tuiWrapper][data-mode=onDark] [_nghost-%COMP%]:-webkit-autofill:focus, [_nghost-%COMP%] [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]:-webkit-autofill:focus, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}[tuiWrapper][data-mode=onDark] [_nghost-%COMP%]::placeholder, [_nghost-%COMP%] [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]::placeholder, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]::placeholder{color:var(--tui-text-03-night)}[data-size=s][_nghost-%COMP%] -shadowcsshost, [_nghost-%COMP%] tui-primitive-textfield[data-size=\\\"s\\\"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"s\\\"] [_nghost-%COMP%]:not(tui-primitive-textfield), [_nghost-%COMP%] tui-textarea[data-size=\\\"s\\\"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size=\\\"s\\\"] [_nghost-%COMP%]:not(tui-textarea), [_nghost-%COMP%] tui-text-area[data-size=\\\"s\\\"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size=\\\"s\\\"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-s)}[data-size=m][_nghost-%COMP%] -shadowcsshost, [_nghost-%COMP%] tui-primitive-textfield[data-size=\\\"m\\\"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"m\\\"] [_nghost-%COMP%]:not(tui-primitive-textfield), [_nghost-%COMP%] tui-textarea[data-size=\\\"m\\\"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size=\\\"m\\\"] [_nghost-%COMP%]:not(tui-textarea), [_nghost-%COMP%] tui-text-area[data-size=\\\"m\\\"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size=\\\"m\\\"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-m)}[data-size=l][_nghost-%COMP%] -shadowcsshost, [_nghost-%COMP%] tui-primitive-textfield[data-size=\\\"l\\\"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"l\\\"] [_nghost-%COMP%]:not(tui-primitive-textfield), [_nghost-%COMP%] tui-textarea[data-size=\\\"l\\\"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size=\\\"l\\\"] [_nghost-%COMP%]:not(tui-textarea), [_nghost-%COMP%] tui-text-area[data-size=\\\"l\\\"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size=\\\"l\\\"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-l)}._disabled[_nghost-%COMP%] -shadowcsshost, [_nghost-%COMP%] tui-primitive-textfield._disabled[_nghost-%COMP%], tui-primitive-textfield._disabled [_nghost-%COMP%], [_nghost-%COMP%] tui-textarea._disabled[_nghost-%COMP%], tui-textarea._disabled [_nghost-%COMP%], [_nghost-%COMP%] tui-text-area._disabled[_nghost-%COMP%], tui-text-area._disabled [_nghost-%COMP%]{pointer-events:none}[data-size=l][_nghost-%COMP%]:not(._label-outside) -shadowcsshost, [_nghost-%COMP%] tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield){padding-top:1.25rem}[data-size=l][_nghost-%COMP%]:not(._label-outside) [_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [_nghost-%COMP%] tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) -shadowcsshost, [_nghost-%COMP%] tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield){padding-top:1rem}[data-size=m][_nghost-%COMP%]:not(._label-outside) [_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [_nghost-%COMP%] tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.69rem;transform:translateY(-.5rem)}._hidden[_nghost-%COMP%] input[_ngcontent-%COMP%], [_nghost-%COMP%] tui-primitive-textfield._hidden[_nghost-%COMP%], tui-primitive-textfield._hidden [_nghost-%COMP%]{opacity:0;text-indent:-10em;-webkit-user-select:none}textarea[_nghost-%COMP%]{white-space:pre-wrap}textarea[_nghost-%COMP%] tui-textarea._ios[_nghost-%COMP%], tui-textarea._ios [_nghost-%COMP%], textarea[_nghost-%COMP%] tui-text-area._ios[_nghost-%COMP%], tui-text-area._ios [_nghost-%COMP%]{padding-left:.8125rem}\"],\n changeDetection: 0\n });\n return TuiTextfieldComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPrimitiveTextfieldModule = /*#__PURE__*/(() => {\n class TuiPrimitiveTextfieldModule {}\n TuiPrimitiveTextfieldModule.ɵfac = function TuiPrimitiveTextfieldModule_Factory(t) {\n return new (t || TuiPrimitiveTextfieldModule)();\n };\n TuiPrimitiveTextfieldModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPrimitiveTextfieldModule\n });\n TuiPrimitiveTextfieldModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, FormsModule, PolymorpheusModule, TuiMaskAccessorModule, TuiFocusableModule, TuiWrapperModule, TuiSvgModule, TuiTooltipModule, TuiAutofilledModule]]\n });\n return TuiPrimitiveTextfieldModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @deprecated:\n * use {@link TUI_TEXTFIELD_DEFAULT_OPTIONS}\n */\nconst TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = TUI_TEXTFIELD_DEFAULT_OPTIONS;\n/**\n * @deprecated:\n * use {@link TUI_TEXTFIELD_OPTIONS}\n */\nconst TUI_PRIMITIVE_TEXTFIELD_OPTIONS = TUI_TEXTFIELD_OPTIONS$1;\n/**\n * @deprecated:\n * use {@link tuiTextfieldOptionsProvider}\n */\nconst tuiPrimitiveTextfieldOptionsProvider = tuiTextfieldOptionsProvider;\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_ICON_PADDINGS, TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_OPTIONS, TuiPrimitiveTextfieldComponent, TuiPrimitiveTextfieldDirective, TuiPrimitiveTextfieldModule, TuiTextfieldComponent, TuiValueDecorationComponent, tuiPrimitiveTextfieldOptionsProvider };\n","/**\n * Converts a string to an HSL color\n * @param value string to convert\n * @return HSL color string\n */\n// @bad TODO: convert stringHashToHsl to stringHashToRgb\nfunction tuiStringHashToHsl(value) {\n if (value === ``) {\n return ``;\n }\n let hash = 0;\n for (let i = 0; i < value.length; i++) {\n hash = value.charCodeAt(i) + ((hash << 5) - hash);\n hash &= hash;\n }\n const hue = hash % 360;\n const saturation = 60 + hash % 5;\n const lightness = 80 + hash % 5;\n return `hsl(${hue},${saturation}%,${lightness}%)`;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiStringHashToHsl };\n","import { CHAR_PLUS, CHAR_HYPHEN, tuiObjectFromEntries } from '@taiga-ui/cdk';\nimport { TUI_DIGIT_REGEXP } from '@taiga-ui/core';\nconst TUI_DATE_MODE_MASKITO_ADAPTER = {\n DMY: `dd/mm/yyyy`,\n MDY: `mm/dd/yyyy`,\n YMD: `yyyy/mm/dd`\n};\nconst DATE_TIME_SEPARATOR = `, `;\n\n/**\n * @deprecated Use {@link https://github.com/taiga-family/maskito Maskito} instead\n * TODO: delete in v4.0\n */\nconst EMPTY_MASK = {\n mask() {\n return false;\n }\n};\n\n/**\n * @deprecated unused constant\n * TODO: delete in v4.0\n */\nconst GROUP_CLASS_NAMES = [`_active`, `_disabled`, `_focused`, `_focus-visible`, `_hosted_dropdown_focused`, `ng-invalid`, `ng-touched`, `_pressed`, `_readonly`];\nconst MASK_AFTER_CODE_REGEXP = /\\([#]+\\)|[#\\- ]/g;\nconst TUI_PHONE_MASK = [CHAR_PLUS, `7`, ` `, TUI_DIGIT_REGEXP, TUI_DIGIT_REGEXP, TUI_DIGIT_REGEXP, ` `, TUI_DIGIT_REGEXP, TUI_DIGIT_REGEXP, TUI_DIGIT_REGEXP, CHAR_HYPHEN, TUI_DIGIT_REGEXP, TUI_DIGIT_REGEXP, CHAR_HYPHEN, TUI_DIGIT_REGEXP, TUI_DIGIT_REGEXP];\n/**\n * @deprecated Use {@link https://maskito.dev/kit/time Time} from {@link https://github.com/taiga-family/maskito Maskito} instead\n * TODO: delete in v4.0\n */\nconst TUI_TIME_MASK = [TUI_DIGIT_REGEXP, TUI_DIGIT_REGEXP, `:`, TUI_DIGIT_REGEXP, TUI_DIGIT_REGEXP];\n\n/**\n * Used as a limit for eliminating JS issues with floating point math\n */\nconst TUI_FLOATING_PRECISION = 7;\nconst MAX_DAY_RANGE_LENGTH_MAPPER = (min, value, maxLength, backwards) => {\n if (!(value === null || value === void 0 ? void 0 : value.isSingleDay) || !maxLength) {\n return min;\n }\n const negativeMaxLength = tuiObjectFromEntries(Object.entries(maxLength).map(([key, value]) => [key, -value]));\n const dateShift = value.from.append(backwards ? negativeMaxLength : maxLength).append({\n day: !backwards ? -1 : 1\n });\n if (backwards) {\n return dateShift.dayBefore(min) ? min : dateShift;\n }\n if (!min) {\n return dateShift;\n }\n return dateShift.dayAfter(min) ? min : dateShift;\n};\nconst MAX_TIME_VALUES = {\n HH: 23,\n MM: 59,\n SS: 59,\n MS: 999\n};\nconst DEFAULT_ROUTER_LINK_OPTIONS = {\n fragment: ``,\n preserveFragment: true,\n replaceUrl: false,\n skipLocationChange: false,\n queryParams: null,\n useHref: false,\n target: null\n};\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DATE_TIME_SEPARATOR, DEFAULT_ROUTER_LINK_OPTIONS, EMPTY_MASK, GROUP_CLASS_NAMES, MASK_AFTER_CODE_REGEXP, MAX_DAY_RANGE_LENGTH_MAPPER, MAX_TIME_VALUES, TUI_DATE_MODE_MASKITO_ADAPTER, TUI_FLOATING_PRECISION, TUI_PHONE_MASK, TUI_TIME_MASK };\n","import { tuiRound } from '@taiga-ui/cdk';\nimport { TUI_FLOATING_PRECISION } from '@taiga-ui/kit/constants';\n\n/**\n * @internal\n */\nfunction tuiHorizontalDirectionToNumber(direction) {\n switch (direction) {\n case `left`:\n return -1;\n case `right`:\n return 1;\n }\n}\nfunction tuiFindKeyStepsBoundariesByFn(keySteps, fn) {\n const keyStepUpperIndex = keySteps.findIndex((keyStep, i) => i && fn(keyStep));\n const lowerStep = keySteps[keyStepUpperIndex - 1] || keySteps[0];\n const upperStep = keySteps[keyStepUpperIndex] || keySteps[keySteps.length - 1];\n return [lowerStep, upperStep];\n}\nfunction tuiPercentageToKeyStepValue(valuePercentage, keySteps) {\n const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] = tuiFindKeyStepsBoundariesByFn(keySteps, ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage);\n const ratio = (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);\n const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;\n return tuiRound(controlValue, TUI_FLOATING_PRECISION);\n}\nfunction tuiKeyStepValueToPercentage(value, keySteps) {\n const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] = tuiFindKeyStepsBoundariesByFn(keySteps, ([_, keyStepValue]) => value <= keyStepValue);\n const ratio = (value - lowerStepValue) / (upperStepValue - lowerStepValue) || 0;\n return (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiHorizontalDirectionToNumber, tuiKeyStepValueToPercentage, tuiPercentageToKeyStepValue };\n","import { TuiDay, TuiDayRange, TUI_FIRST_DAY, TuiTime, HOURS_IN_DAY, tuiControlValue } from '@taiga-ui/cdk';\nimport { TuiDayRangePeriod } from '@taiga-ui/kit/classes';\nimport { of } from 'rxjs';\nimport { map } from 'rxjs/operators';\nfunction tuiCreateDefaultDayRangePeriods(periodTitles = [`For all the time`, `Today`, `Yesterday`, `Current week`, `Current month`, `Previous month`]) {\n const today = TuiDay.currentLocal();\n const yesterday = today.append({\n day: -1\n });\n const startOfWeek = today.append({\n day: -today.dayOfWeek()\n });\n const endOfWeek = startOfWeek.append({\n day: 6\n });\n const startOfMonth = today.append({\n day: 1 - today.day\n });\n const endOfMonth = startOfMonth.append({\n month: 1,\n day: -1\n });\n const startOfLastMonth = startOfMonth.append({\n month: -1\n });\n return [new TuiDayRangePeriod(new TuiDayRange(TUI_FIRST_DAY, today), periodTitles[0]), new TuiDayRangePeriod(new TuiDayRange(today, today), periodTitles[1]), new TuiDayRangePeriod(new TuiDayRange(yesterday, yesterday), periodTitles[2]), new TuiDayRangePeriod(new TuiDayRange(startOfWeek, endOfWeek), periodTitles[3]), new TuiDayRangePeriod(new TuiDayRange(startOfMonth, endOfMonth), periodTitles[4]), new TuiDayRangePeriod(new TuiDayRange(startOfLastMonth, startOfMonth.append({\n day: -1\n })), periodTitles[5])];\n}\nfunction tuiCreateTimePeriods(minHour = 0, maxHour = HOURS_IN_DAY, minutes = [0, 30]) {\n const timeArray = [];\n for (let i = minHour; i < maxHour; i++) {\n minutes.forEach(minute => {\n const time = new TuiTime(i, minute);\n timeArray.push(time);\n });\n }\n return timeArray;\n}\n\n/**\n * @return fractional length\n */\nfunction tuiGetPrecision(num) {\n const [, fractionPart = ``] = String(num).split(`.`);\n return fractionPart.length;\n}\nfunction tuiIsFlat(items) {\n return !Array.isArray(items[0]);\n}\n\n/**\n * @internal\n */\nfunction tuiControlValueFactory(control, valueTransformer) {\n return control ? tuiControlValue(control).pipe(map(value => valueTransformer ? valueTransformer.fromControlValue(value) : value)) : of(null);\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiControlValueFactory, tuiCreateDefaultDayRangePeriods, tuiCreateTimePeriods, tuiGetPrecision, tuiIsFlat };\n","import { InjectionToken, Optional, Self } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { tuiControlValueFactory } from '@taiga-ui/kit/utils';\nimport { tuiCreateToken, tuiCreateTokenFromFactory, TUI_FIRST_DAY, TUI_LAST_DAY, tuiProvideOptions, TUI_DEFAULT_STRINGIFY, TUI_DEFAULT_IDENTITY_MATCHER, ALWAYS_FALSE_HANDLER } from '@taiga-ui/cdk';\nimport { TuiCountryIsoCode, tuiExtractI18n } from '@taiga-ui/i18n';\n\n/**\n * Stream that emits calendar data change\n */\nconst TUI_CALENDAR_DATE_STREAM = new InjectionToken(`[TUI_CALENDAR_DATE_STREAM]`);\nfunction tuiDateStreamWithTransformer(transformer) {\n return {\n provide: TUI_CALENDAR_DATE_STREAM,\n deps: [[new Optional(), new Self(), NgControl], [new Optional(), transformer]],\n useFactory: tuiControlValueFactory\n };\n}\nconst TUI_COUNTRIES_MASKS = tuiCreateToken({\n [TuiCountryIsoCode.AD]: `+376###-###`,\n [TuiCountryIsoCode.AE]: `+971-##-###-####`,\n [TuiCountryIsoCode.AF]: `+93##-###-####`,\n [TuiCountryIsoCode.AG]: `+1(268) ###-####`,\n [TuiCountryIsoCode.AI]: `+1(264) ###-####`,\n [TuiCountryIsoCode.AL]: `+355(###) ###-###`,\n [TuiCountryIsoCode.AM]: `+374##-###-###`,\n [TuiCountryIsoCode.AO]: `+244(###) ###-###`,\n [TuiCountryIsoCode.AR]: `+54(###) ####-####`,\n [TuiCountryIsoCode.AT]: `+43(###) ###-####`,\n [TuiCountryIsoCode.AU]: `+61#-####-####`,\n [TuiCountryIsoCode.AW]: `+297###-####`,\n [TuiCountryIsoCode.AZ]: `+994##-###-##-##`,\n [TuiCountryIsoCode.BA]: `+387 ###-####-##`,\n [TuiCountryIsoCode.BB]: `+1(246) ###-####`,\n [TuiCountryIsoCode.BD]: `+880##-###-###`,\n [TuiCountryIsoCode.BE]: `+32(###) ###-###`,\n [TuiCountryIsoCode.BF]: `+226##-##-####`,\n [TuiCountryIsoCode.BG]: `+359(###) ###-###`,\n [TuiCountryIsoCode.BH]: `+973####-####`,\n [TuiCountryIsoCode.BI]: `+257##-##-####`,\n [TuiCountryIsoCode.BJ]: `+229##-##-####`,\n [TuiCountryIsoCode.BL]: `+590 ## ## ## ## ##`,\n [TuiCountryIsoCode.BM]: `+1(441) ###-####`,\n [TuiCountryIsoCode.BN]: `+673###-####`,\n [TuiCountryIsoCode.BO]: `+591#-###-####`,\n [TuiCountryIsoCode.BQ]: `+599-###-####`,\n [TuiCountryIsoCode.BR]: `+55(##) ####-####`,\n [TuiCountryIsoCode.BS]: `+1(242) ###-####`,\n [TuiCountryIsoCode.BT]: `+975#-###-###`,\n [TuiCountryIsoCode.BW]: `+267##-###-###`,\n [TuiCountryIsoCode.BY]: `+375(##) ###-##-##`,\n [TuiCountryIsoCode.BZ]: `+501###-####`,\n [TuiCountryIsoCode.CA]: `+1(###) ###-####`,\n [TuiCountryIsoCode.CD]: `+243(###) ###-###`,\n [TuiCountryIsoCode.CF]: `+236-##-##-####`,\n [TuiCountryIsoCode.CG]: `+242##-###-####`,\n [TuiCountryIsoCode.CH]: `+41##-###-####`,\n [TuiCountryIsoCode.CI]: `+225##-##-###-###`,\n [TuiCountryIsoCode.CL]: `+56#-####-####`,\n [TuiCountryIsoCode.CM]: `+237#####-####`,\n [TuiCountryIsoCode.CN]: `+86(###) ####-####`,\n [TuiCountryIsoCode.CO]: `+57(###) ###-####`,\n [TuiCountryIsoCode.CR]: `+506####-####`,\n [TuiCountryIsoCode.CU]: `+53#-###-####`,\n [TuiCountryIsoCode.CV]: `+238(###) ##-##`,\n [TuiCountryIsoCode.CW]: `+5999-###-####`,\n [TuiCountryIsoCode.CY]: `+357##-###-###`,\n [TuiCountryIsoCode.CZ]: `+420(###) ###-###`,\n [TuiCountryIsoCode.DE]: `+49(###) ###-###-##`,\n [TuiCountryIsoCode.DJ]: `+253##-##-##-##`,\n [TuiCountryIsoCode.DK]: `+45##-##-##-##`,\n [TuiCountryIsoCode.DM]: `+1(767) ###-####`,\n [TuiCountryIsoCode.DO]: `+1(###) ###-####`,\n [TuiCountryIsoCode.DZ]: `+213##-###-####`,\n [TuiCountryIsoCode.EC]: `+593##-###-####`,\n [TuiCountryIsoCode.EE]: `+372####-####`,\n [TuiCountryIsoCode.EG]: `+20(###) ###-####`,\n [TuiCountryIsoCode.ER]: `+291#-###-###`,\n [TuiCountryIsoCode.ES]: `+34(###) ###-###`,\n [TuiCountryIsoCode.ET]: `+251##-###-####`,\n [TuiCountryIsoCode.FI]: `+358(###) ###-##-##`,\n [TuiCountryIsoCode.FJ]: `+679##-#####`,\n [TuiCountryIsoCode.FK]: `+500#####`,\n [TuiCountryIsoCode.FM]: `+691###-####`,\n [TuiCountryIsoCode.FR]: `+33 ## ## ## ## ##`,\n [TuiCountryIsoCode.GA]: `+241##-##-##-##`,\n [TuiCountryIsoCode.GB]: `+44##-####-####`,\n [TuiCountryIsoCode.GD]: `+1(473) ###-####`,\n [TuiCountryIsoCode.GE]: `+995(###) ###-###`,\n [TuiCountryIsoCode.GF]: `+594 ## ## ## ## ##`,\n [TuiCountryIsoCode.GH]: `+233(###) ###-###`,\n [TuiCountryIsoCode.GI]: `+350###-#####`,\n [TuiCountryIsoCode.GL]: `+299##-##-##`,\n [TuiCountryIsoCode.GM]: `+220(###) ##-##`,\n [TuiCountryIsoCode.GN]: `+224##-###-###`,\n [TuiCountryIsoCode.GP]: `+590 ## ## ## ## ##`,\n [TuiCountryIsoCode.GQ]: `+240##-###-####`,\n [TuiCountryIsoCode.GR]: `+30(###) ###-####`,\n [TuiCountryIsoCode.GT]: `+502#-###-####`,\n [TuiCountryIsoCode.GW]: `+245#-######`,\n [TuiCountryIsoCode.GY]: `+592###-####`,\n [TuiCountryIsoCode.HK]: `+852####-####`,\n [TuiCountryIsoCode.HN]: `+504####-####`,\n [TuiCountryIsoCode.HR]: `+385##-###-####`,\n [TuiCountryIsoCode.HT]: `+509##-##-####`,\n [TuiCountryIsoCode.HU]: `+36(###) ###-###`,\n [TuiCountryIsoCode.ID]: `+62(###) ###-##-###`,\n [TuiCountryIsoCode.IE]: `+353(###) ###-###`,\n [TuiCountryIsoCode.IL]: `+972##-###-####`,\n [TuiCountryIsoCode.IN]: `+91(####) ###-###`,\n [TuiCountryIsoCode.IQ]: `+964(###) ###-####`,\n [TuiCountryIsoCode.IR]: `+98(###) ###-####`,\n [TuiCountryIsoCode.IS]: `+354###-####`,\n [TuiCountryIsoCode.IT]: `+39(###) ####-###`,\n [TuiCountryIsoCode.JM]: `+1(876) ###-####`,\n [TuiCountryIsoCode.JO]: `+962#-####-####`,\n [TuiCountryIsoCode.JP]: `+81-##-####-####`,\n [TuiCountryIsoCode.KE]: `+254###-######`,\n [TuiCountryIsoCode.KG]: `+996(###) ###-###`,\n [TuiCountryIsoCode.KH]: `+855##-###-###`,\n [TuiCountryIsoCode.KM]: `+269##-#####`,\n [TuiCountryIsoCode.KN]: `+1(869) ###-####`,\n [TuiCountryIsoCode.KP]: `+850####-#############`,\n [TuiCountryIsoCode.KR]: `+82##-###-####`,\n [TuiCountryIsoCode.KW]: `+965####-####`,\n [TuiCountryIsoCode.KY]: `+1(345) ###-####`,\n [TuiCountryIsoCode.KZ]: `+7(###) ###-##-##`,\n [TuiCountryIsoCode.LA]: `+856##-##-###-###`,\n [TuiCountryIsoCode.LB]: `+961##-###-###`,\n [TuiCountryIsoCode.LC]: `+1(758) ###-####`,\n [TuiCountryIsoCode.LI]: `+423(###) ###-####`,\n [TuiCountryIsoCode.LK]: `+94##-###-####`,\n [TuiCountryIsoCode.LR]: `+231##-###-###`,\n [TuiCountryIsoCode.LS]: `+266#-###-####`,\n [TuiCountryIsoCode.LT]: `+370(###) ##-###`,\n [TuiCountryIsoCode.LU]: `+352(###) ###-###`,\n [TuiCountryIsoCode.LV]: `+371##-###-###`,\n [TuiCountryIsoCode.LY]: `+218##-###-####`,\n [TuiCountryIsoCode.MA]: `+212##-####-###`,\n [TuiCountryIsoCode.MC]: `+377###-###-###`,\n [TuiCountryIsoCode.MD]: `+373####-####`,\n [TuiCountryIsoCode.ME]: `+382##-###-###`,\n [TuiCountryIsoCode.MF]: `+590 ## ## ## ## ##`,\n [TuiCountryIsoCode.MG]: `+261##-##-#####`,\n [TuiCountryIsoCode.MK]: `+389##-###-###`,\n [TuiCountryIsoCode.ML]: `+223##-##-####`,\n [TuiCountryIsoCode.MM]: `+95##-###-###`,\n [TuiCountryIsoCode.MN]: `+976##-##-####`,\n [TuiCountryIsoCode.MO]: `+853####-####`,\n [TuiCountryIsoCode.MQ]: `+596 ## ## ## ## ##`,\n [TuiCountryIsoCode.MR]: `+222##-##-####`,\n [TuiCountryIsoCode.MS]: `+1(664) ###-####`,\n [TuiCountryIsoCode.MT]: `+356####-####`,\n [TuiCountryIsoCode.MU]: `+230####-####`,\n [TuiCountryIsoCode.MV]: `+960###-####`,\n [TuiCountryIsoCode.MW]: `+265#-####-####`,\n [TuiCountryIsoCode.MX]: `+52(###) ###-####`,\n [TuiCountryIsoCode.MY]: `+60(###) ###-###`,\n [TuiCountryIsoCode.MZ]: `+258##-###-###`,\n [TuiCountryIsoCode.NA]: `+264##-###-####`,\n [TuiCountryIsoCode.NC]: `+687 ### ###`,\n [TuiCountryIsoCode.NE]: `+227##-##-####`,\n [TuiCountryIsoCode.NG]: `+234(###) ###-####`,\n [TuiCountryIsoCode.NI]: `+505####-####`,\n [TuiCountryIsoCode.NL]: `+31##-###-####`,\n [TuiCountryIsoCode.NO]: `+47(###) ##-###`,\n [TuiCountryIsoCode.NP]: `+977##-###-###`,\n [TuiCountryIsoCode.NZ]: `+64(###) ###-####`,\n [TuiCountryIsoCode.OM]: `+968##-###-###`,\n [TuiCountryIsoCode.PA]: `+507###-####`,\n [TuiCountryIsoCode.PE]: `+51(###) ###-###`,\n [TuiCountryIsoCode.PF]: `+689 ## ## ## ##`,\n [TuiCountryIsoCode.PG]: `+675(###) ##-###`,\n [TuiCountryIsoCode.PH]: `+63(###) ###-####`,\n [TuiCountryIsoCode.PK]: `+92(###) ###-####`,\n [TuiCountryIsoCode.PL]: `+48(###) ###-###`,\n [TuiCountryIsoCode.PT]: `+351##-###-####`,\n [TuiCountryIsoCode.PW]: `+680###-####`,\n [TuiCountryIsoCode.PY]: `+595(###) ###-###`,\n [TuiCountryIsoCode.QA]: `+974####-####`,\n [TuiCountryIsoCode.RE]: `+262 ## ## ## ## ##`,\n [TuiCountryIsoCode.RO]: `+40##-###-####`,\n [TuiCountryIsoCode.RS]: `+381##-###-####`,\n [TuiCountryIsoCode.RU]: `+7### ###-##-##`,\n [TuiCountryIsoCode.RW]: `+250(###) ###-###`,\n [TuiCountryIsoCode.SA]: `+966#-####-####`,\n [TuiCountryIsoCode.SB]: `+677###-####`,\n [TuiCountryIsoCode.SC]: `+248#-###-###`,\n [TuiCountryIsoCode.SD]: `+249##-###-####`,\n [TuiCountryIsoCode.SE]: `+46##-###-####`,\n [TuiCountryIsoCode.SG]: `+65####-####`,\n [TuiCountryIsoCode.SH]: `+290####`,\n [TuiCountryIsoCode.SI]: `+386##-###-###`,\n [TuiCountryIsoCode.SK]: `+421(###) ###-###`,\n [TuiCountryIsoCode.SL]: `+232##-######`,\n [TuiCountryIsoCode.SM]: `+378####-######`,\n [TuiCountryIsoCode.SN]: `+221##-###-####`,\n [TuiCountryIsoCode.SO]: `+252##-###-###`,\n [TuiCountryIsoCode.SR]: `+597###-####`,\n [TuiCountryIsoCode.ST]: `+239##-#####`,\n [TuiCountryIsoCode.SV]: `+503##-##-####`,\n [TuiCountryIsoCode.SX]: `+1(721) ###-####`,\n [TuiCountryIsoCode.SY]: `+963##-####-###`,\n [TuiCountryIsoCode.SZ]: `+268##-##-####`,\n [TuiCountryIsoCode.TC]: `+1(649) ###-####`,\n [TuiCountryIsoCode.TD]: `+235##-##-##-##`,\n [TuiCountryIsoCode.TG]: `+228##-###-###`,\n [TuiCountryIsoCode.TH]: `+66##-###-####`,\n [TuiCountryIsoCode.TJ]: `+992##-###-####`,\n [TuiCountryIsoCode.TL]: `+670###-#####`,\n [TuiCountryIsoCode.TM]: `+993#-###-####`,\n [TuiCountryIsoCode.TN]: `+216##-###-###`,\n [TuiCountryIsoCode.TO]: `+676#####`,\n [TuiCountryIsoCode.TR]: `+90(###) ###-####`,\n [TuiCountryIsoCode.TT]: `+1(868) ###-####`,\n [TuiCountryIsoCode.TW]: `+886#-####-####`,\n [TuiCountryIsoCode.TZ]: `+255##-###-####`,\n [TuiCountryIsoCode.UA]: `+380(##) ###-##-##`,\n [TuiCountryIsoCode.UG]: `+256(###) ###-###`,\n [TuiCountryIsoCode.US]: `+1(###) ###-####`,\n [TuiCountryIsoCode.UY]: `+598#-###-##-##`,\n [TuiCountryIsoCode.UZ]: `+998##-###-####`,\n [TuiCountryIsoCode.VC]: `+1(784) ###-####`,\n [TuiCountryIsoCode.VE]: `+58(###) ###-####`,\n [TuiCountryIsoCode.VG]: `+1(284)###-####`,\n [TuiCountryIsoCode.VN]: `+84(###) ####-###`,\n [TuiCountryIsoCode.VU]: `+678##-#####`,\n [TuiCountryIsoCode.WS]: `+685##-####`,\n [TuiCountryIsoCode.XK]: `+383##-###-###`,\n [TuiCountryIsoCode.YE]: `+967###-###-###`,\n [TuiCountryIsoCode.YT]: `+262 ## ## ## ## ##`,\n [TuiCountryIsoCode.ZA]: `+27##-###-####`,\n [TuiCountryIsoCode.ZM]: `+260##-###-####`,\n [TuiCountryIsoCode.ZW]: `+263#-######`\n});\n\n// TODO: Refactor to use `AbstractTuiValueTransformer` and add ability to provide it for all controls\n/**\n * Control value transformer of TuiDay to custom value format for InputDate* components\n */\nconst TUI_DATE_VALUE_TRANSFORMER = new InjectionToken(`[TUI_DATE_VALUE_TRANSFORMER]`);\n/**\n * Control value transformer for InputDateRange component\n */\nconst TUI_DATE_RANGE_VALUE_TRANSFORMER = new InjectionToken(`[TUI_DATE_RANGE_VALUE_TRANSFORMER]`);\n/**\n * Control value transformer for InputDateTime component\n */\nconst TUI_DATE_TIME_VALUE_TRANSFORMER = new InjectionToken(`[TUI_DATE_TIME_VALUE_TRANSFORMER]`);\nconst TUI_PROMPT_WORDS = tuiCreateTokenFromFactory(tuiExtractI18n(`prompt`));\nconst TUI_CANCEL_WORD = tuiCreateTokenFromFactory(tuiExtractI18n(`cancel`));\nconst TUI_DONE_WORD = tuiCreateTokenFromFactory(tuiExtractI18n(`done`));\nconst TUI_MORE_WORD = tuiCreateTokenFromFactory(tuiExtractI18n(`more`));\nconst TUI_HIDE_TEXT = tuiCreateTokenFromFactory(tuiExtractI18n(`hide`));\nconst TUI_SHOW_ALL_TEXT = tuiCreateTokenFromFactory(tuiExtractI18n(`showAll`));\nconst TUI_OTHER_DATE_TEXT = tuiCreateTokenFromFactory(tuiExtractI18n(`otherDate`));\nconst TUI_CHOOSE_DAY_OR_RANGE_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`mobileCalendarTexts`));\nconst TUI_FROM_TO_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`range`));\nconst TUI_PLUS_MINUS_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`countTexts`));\nconst TUI_TIME_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`time`));\nconst TUI_DATE_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`dateTexts`));\nconst TUI_DIGITAL_INFORMATION_UNITS = tuiCreateTokenFromFactory(tuiExtractI18n(`digitalInformationUnits`));\nconst TUI_COPY_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`copyTexts`));\nconst TUI_PASSWORD_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`passwordTexts`));\nconst TUI_CALENDAR_MONTHS = tuiCreateTokenFromFactory(tuiExtractI18n(`shortCalendarMonths`));\nconst TUI_FILE_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`fileTexts`));\nconst TUI_PAGINATION_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`pagination`));\nconst TUI_INPUT_FILE_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`inputFileTexts`));\nconst TUI_MULTI_SELECT_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`multiSelectTexts`));\nconst TUI_COUNTRIES = tuiCreateTokenFromFactory(tuiExtractI18n(`countries`));\nconst TUI_INPUT_DATE_DEFAULT_OPTIONS = {\n icon: ({\n $implicit\n }) => $implicit === `s` ? `tuiIconCalendar` : `tuiIconCalendarLarge`,\n min: TUI_FIRST_DAY,\n max: TUI_LAST_DAY,\n nativePicker: false\n};\n/**\n * Default parameters for InputDate component\n */\nconst TUI_INPUT_DATE_OPTIONS = tuiCreateToken(TUI_INPUT_DATE_DEFAULT_OPTIONS);\nfunction tuiInputDateOptionsProvider(options) {\n return tuiProvideOptions(TUI_INPUT_DATE_OPTIONS, options, TUI_INPUT_DATE_DEFAULT_OPTIONS);\n}\nconst TUI_DEFAULT_ITEMS_HANDLERS = {\n stringify: TUI_DEFAULT_STRINGIFY,\n identityMatcher: TUI_DEFAULT_IDENTITY_MATCHER,\n disabledItemHandler: ALWAYS_FALSE_HANDLER\n};\n/**\n * Default items handlers for components\n */\nconst TUI_ITEMS_HANDLERS = tuiCreateToken(TUI_DEFAULT_ITEMS_HANDLERS);\nfunction tuiItemsHandlersProvider(options) {\n return tuiProvideOptions(TUI_ITEMS_HANDLERS, options, TUI_DEFAULT_ITEMS_HANDLERS);\n}\n\n/**\n * A component for mobile data picker\n */\nconst TUI_MOBILE_CALENDAR = new InjectionToken(`[TUI_MOBILE_CALENDAR]`);\n\n/**\n * A function to get localized formatted month\n */\nconst TUI_MONTH_FORMATTER = new InjectionToken(`[TUI_MONTH_FORMATTER]`);\n\n/**\n * Margin between tabs\n */\nconst TUI_TAB_MARGIN = tuiCreateToken(24);\n\n/**\n * Validation errors\n */\nconst TUI_VALIDATION_ERRORS = tuiCreateToken({});\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_CALENDAR_DATE_STREAM, TUI_CALENDAR_MONTHS, TUI_CANCEL_WORD, TUI_CHOOSE_DAY_OR_RANGE_TEXTS, TUI_COPY_TEXTS, TUI_COUNTRIES, TUI_COUNTRIES_MASKS, TUI_DATE_RANGE_VALUE_TRANSFORMER, TUI_DATE_TEXTS, TUI_DATE_TIME_VALUE_TRANSFORMER, TUI_DATE_VALUE_TRANSFORMER, TUI_DEFAULT_ITEMS_HANDLERS, TUI_DIGITAL_INFORMATION_UNITS, TUI_DONE_WORD, TUI_FILE_TEXTS, TUI_FROM_TO_TEXTS, TUI_HIDE_TEXT, TUI_INPUT_DATE_DEFAULT_OPTIONS, TUI_INPUT_DATE_OPTIONS, TUI_INPUT_FILE_TEXTS, TUI_ITEMS_HANDLERS, TUI_MOBILE_CALENDAR, TUI_MONTH_FORMATTER, TUI_MORE_WORD, TUI_MULTI_SELECT_TEXTS, TUI_OTHER_DATE_TEXT, TUI_PAGINATION_TEXTS, TUI_PASSWORD_TEXTS, TUI_PLUS_MINUS_TEXTS, TUI_PROMPT_WORDS, TUI_SHOW_ALL_TEXT, TUI_TAB_MARGIN, TUI_TIME_TEXTS, TUI_VALIDATION_ERRORS, tuiDateStreamWithTransformer, tuiInputDateOptionsProvider, tuiItemsHandlersProvider };\n","const MASKITO_DEFAULT_ELEMENT_PREDICATE = e => e.querySelector('input,textarea') || e;\nconst MASKITO_DEFAULT_OPTIONS = {\n mask: /^.*$/,\n preprocessors: [],\n postprocessors: [],\n plugins: [],\n overwriteMode: 'shift'\n};\nclass MaskHistory {\n constructor() {\n this.now = null;\n this.past = [];\n this.future = [];\n }\n undo() {\n const state = this.past.pop();\n if (state && this.now) {\n this.future.push(this.now);\n this.updateElement(state, 'historyUndo');\n }\n }\n redo() {\n const state = this.future.pop();\n if (state && this.now) {\n this.past.push(this.now);\n this.updateElement(state, 'historyRedo');\n }\n }\n updateHistory(state) {\n if (!this.now) {\n this.now = state;\n return;\n }\n const isValueChanged = this.now.value !== state.value;\n const isSelectionChanged = this.now.selection.some((item, index) => item !== state.selection[index]);\n if (!isValueChanged && !isSelectionChanged) {\n return;\n }\n if (isValueChanged) {\n this.past.push(this.now);\n this.future = [];\n }\n this.now = state;\n }\n updateElement(state, inputType) {\n this.now = state;\n this.updateElementState(state, {\n inputType,\n data: null\n });\n }\n}\nfunction areElementValuesEqual(sampleState, ...states) {\n return states.every(({\n value\n }) => value === sampleState.value);\n}\nfunction areElementStatesEqual(sampleState, ...states) {\n return states.every(({\n value,\n selection\n }) => value === sampleState.value && selection[0] === sampleState.selection[0] && selection[1] === sampleState.selection[1]);\n}\nfunction applyOverwriteMode({\n value,\n selection\n}, newCharacters, mode) {\n const [from, to] = selection;\n const computedMode = typeof mode === 'function' ? mode({\n value,\n selection\n }) : mode;\n return {\n value,\n selection: computedMode === 'replace' ? [from, from + newCharacters.length] : [from, to]\n };\n}\nfunction isFixedCharacter(char) {\n return typeof char === 'string';\n}\nfunction getLeadingFixedCharacters(mask, validatedValuePart, newCharacter, initialElementState) {\n let leadingFixedCharacters = '';\n for (let i = validatedValuePart.length; i < mask.length; i++) {\n const charConstraint = mask[i];\n const isInitiallyExisted = (initialElementState === null || initialElementState === void 0 ? void 0 : initialElementState.value[i]) === charConstraint;\n if (!isFixedCharacter(charConstraint) || charConstraint === newCharacter && !isInitiallyExisted) {\n return leadingFixedCharacters;\n }\n leadingFixedCharacters += charConstraint;\n }\n return leadingFixedCharacters;\n}\nfunction validateValueWithMask(value, maskExpression) {\n if (Array.isArray(maskExpression)) {\n return value.length === maskExpression.length && Array.from(value).every((char, i) => {\n const charConstraint = maskExpression[i];\n return isFixedCharacter(charConstraint) ? char === charConstraint : char.match(charConstraint);\n });\n }\n return maskExpression.test(value);\n}\nfunction guessValidValueByPattern(elementState, mask, initialElementState) {\n let maskedFrom = null;\n let maskedTo = null;\n const maskedValue = Array.from(elementState.value).reduce((validatedCharacters, char, charIndex) => {\n const leadingCharacters = getLeadingFixedCharacters(mask, validatedCharacters, char, initialElementState);\n const newValidatedChars = validatedCharacters + leadingCharacters;\n const charConstraint = mask[newValidatedChars.length];\n if (isFixedCharacter(charConstraint)) {\n return newValidatedChars + charConstraint;\n }\n if (!char.match(charConstraint)) {\n return newValidatedChars;\n }\n if (maskedFrom === null && charIndex >= elementState.selection[0]) {\n maskedFrom = newValidatedChars.length;\n }\n if (maskedTo === null && charIndex >= elementState.selection[1]) {\n maskedTo = newValidatedChars.length;\n }\n return newValidatedChars + char;\n }, '');\n const trailingFixedCharacters = getLeadingFixedCharacters(mask, maskedValue, '', initialElementState);\n return {\n value: validateValueWithMask(maskedValue + trailingFixedCharacters, mask) ? maskedValue + trailingFixedCharacters : maskedValue,\n selection: [maskedFrom !== null && maskedFrom !== void 0 ? maskedFrom : maskedValue.length, maskedTo !== null && maskedTo !== void 0 ? maskedTo : maskedValue.length]\n };\n}\nfunction guessValidValueByRegExp({\n value,\n selection\n}, maskRegExp) {\n const [from, to] = selection;\n let newFrom = from;\n let newTo = to;\n const validatedValue = Array.from(value).reduce((validatedValuePart, char, i) => {\n const newPossibleValue = validatedValuePart + char;\n if (from === i) {\n newFrom = validatedValuePart.length;\n }\n if (to === i) {\n newTo = validatedValuePart.length;\n }\n return newPossibleValue.match(maskRegExp) ? newPossibleValue : validatedValuePart;\n }, '');\n return {\n value: validatedValue,\n selection: [newFrom, newTo]\n };\n}\nfunction calibrateValueByMask(elementState, mask, initialElementState = null) {\n if (validateValueWithMask(elementState.value, mask)) {\n return elementState;\n }\n const {\n value,\n selection\n } = Array.isArray(mask) ? guessValidValueByPattern(elementState, mask, initialElementState) : guessValidValueByRegExp(elementState, mask);\n return {\n selection,\n value: Array.isArray(mask) ? value.slice(0, mask.length) : value\n };\n}\nfunction removeFixedMaskCharacters(initialElementState, mask) {\n if (!Array.isArray(mask)) {\n return initialElementState;\n }\n const [from, to] = initialElementState.selection;\n const selection = [];\n const unmaskedValue = Array.from(initialElementState.value).reduce((rawValue, char, i) => {\n const charConstraint = mask[i];\n if (i === from) {\n selection.push(rawValue.length);\n }\n if (i === to) {\n selection.push(rawValue.length);\n }\n return isFixedCharacter(charConstraint) && charConstraint === char ? rawValue : rawValue + char;\n }, '');\n if (selection.length < 2) {\n selection.push(...new Array(2 - selection.length).fill(unmaskedValue.length));\n }\n return {\n value: unmaskedValue,\n selection: [selection[0], selection[1]]\n };\n}\nclass MaskModel {\n constructor(initialElementState, maskOptions) {\n this.initialElementState = initialElementState;\n this.maskOptions = maskOptions;\n this.value = '';\n this.selection = [0, 0];\n const {\n value,\n selection\n } = calibrateValueByMask(initialElementState, this.getMaskExpression(initialElementState));\n this.value = value;\n this.selection = selection;\n }\n addCharacters([from, to], newCharacters) {\n const {\n value\n } = this;\n const maskExpression = this.getMaskExpression({\n value: value.slice(0, from) + newCharacters + value.slice(to),\n selection: [from + newCharacters.length, from + newCharacters.length]\n });\n const initialElementState = {\n value,\n selection: [from, to]\n };\n const unmaskedElementState = removeFixedMaskCharacters(initialElementState, maskExpression);\n const [unmaskedFrom, unmaskedTo] = applyOverwriteMode(unmaskedElementState, newCharacters, this.maskOptions.overwriteMode).selection;\n const newUnmaskedLeadingValuePart = unmaskedElementState.value.slice(0, unmaskedFrom) + newCharacters;\n const newCaretIndex = newUnmaskedLeadingValuePart.length;\n const maskedElementState = calibrateValueByMask({\n value: newUnmaskedLeadingValuePart + unmaskedElementState.value.slice(unmaskedTo),\n selection: [newCaretIndex, newCaretIndex]\n }, maskExpression, initialElementState);\n const isInvalidCharsInsertion =\n // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with\n value.slice(0, unmaskedFrom) === calibrateValueByMask({\n value: newUnmaskedLeadingValuePart,\n selection: [newCaretIndex, newCaretIndex]\n }, maskExpression, initialElementState).value;\n if (isInvalidCharsInsertion || areElementStatesEqual(this, maskedElementState) // If typing new characters does not change value\n ) {\n throw new Error('Invalid mask value');\n }\n this.value = maskedElementState.value;\n this.selection = maskedElementState.selection;\n }\n deleteCharacters([from, to]) {\n if (from === to || !to) {\n return;\n }\n const {\n value\n } = this;\n const maskExpression = this.getMaskExpression({\n value: value.slice(0, from) + value.slice(to),\n selection: [from, from]\n });\n const initialElementState = {\n value,\n selection: [from, to]\n };\n const unmaskedElementState = removeFixedMaskCharacters(initialElementState, maskExpression);\n const [unmaskedFrom, unmaskedTo] = unmaskedElementState.selection;\n const newUnmaskedValue = unmaskedElementState.value.slice(0, unmaskedFrom) + unmaskedElementState.value.slice(unmaskedTo);\n const maskedElementState = calibrateValueByMask({\n value: newUnmaskedValue,\n selection: [unmaskedFrom, unmaskedFrom]\n }, maskExpression, initialElementState);\n this.value = maskedElementState.value;\n this.selection = maskedElementState.selection;\n }\n getMaskExpression(elementState) {\n const {\n mask\n } = this.maskOptions;\n return typeof mask === 'function' ? mask(elementState) : mask;\n }\n}\nclass EventListener {\n constructor(element) {\n this.element = element;\n this.listeners = [];\n }\n listen(eventType, fn, options) {\n const untypedFn = fn;\n this.element.addEventListener(eventType, untypedFn, options);\n this.listeners.push(() => this.element.removeEventListener(eventType, untypedFn));\n }\n destroy() {\n this.listeners.forEach(stopListen => stopListen());\n }\n}\n\n/**\r\n * Checks if the passed keyboard event match the required hotkey.\r\n *\r\n * We intentionally use legacy {@link KeyboardEvent#keyCode `keyCode`} property. It is more\r\n * \"keyboard-layout\"-independent than {@link KeyboardEvent#key `key`} or {@link KeyboardEvent#code `code`} properties.\r\n *\r\n * @example\r\n * input.addEventListener('keydown', (event) => {\r\n * if (isHotkey(event, HotkeyModifier.CTRL | HotkeyModifier.SHIFT, HotkeyCode.Z)) {\r\n * // redo hotkey pressed\r\n * }\r\n * })\r\n *\r\n * @see {@link https://github.com/taiga-family/maskito/issues/315 `KeyboardEvent#code` issue}\r\n *\r\n * @return will return `true` only if the {@link HotkeyCode} matches and only the necessary\r\n * {@link HotkeyModifier modifiers} have been pressed\r\n */\nfunction isHotkey(event, modifiers, hotkeyCode) {\n return event.ctrlKey === !!(modifiers & 1\n /* CTRL */) && event.altKey === !!(modifiers & 2\n /* ALT */) && event.shiftKey === !!(modifiers & 4\n /* SHIFT */) && event.metaKey === !!(modifiers & 8\n /* META */) && event.keyCode === hotkeyCode;\n}\nfunction isRedo(event) {\n return isHotkey(event, 1\n /* CTRL */, 89\n /* Y */) ||\n // Windows\n isHotkey(event, 1\n /* CTRL */ | 4\n /* SHIFT */, 90\n /* Z */) ||\n // Windows & Android\n isHotkey(event, 8\n /* META */ | 4\n /* SHIFT */, 90\n /* Z */) // macOS & iOS\n ;\n}\n\nfunction isUndo(event) {\n return isHotkey(event, 1\n /* CTRL */, 90\n /* Z */) ||\n // Windows & Android\n isHotkey(event, 8\n /* META */, 90\n /* Z */) // macOS & iOS\n ;\n}\n\n/**\r\n * \"beforeinput\" is more appropriate event for preprocessing of the input masking (than `keydown`):\r\n * - `keydown` is not triggered by predictive text from native mobile keyboards.\r\n * - `keydown` is triggered by system key combinations (we don't need them, and they should be manually filtered).\r\n * - Dropping text inside input triggers `beforeinput` (but not `keydown`).\r\n * ___\r\n * \"beforeinput\" is not supported by Chrome 49+ (only from 60+) and by Firefox 52+ (only from 87+).\r\n *\r\n * @see https://caniuse.com/?search=beforeinput\r\n * @see https://taiga-ui.dev/browser-support\r\n */\nfunction isBeforeInputEventSupported(element) {\n return 'onbeforeinput' in element;\n}\nfunction isEventProducingCharacter({\n key,\n ctrlKey,\n metaKey,\n altKey\n}) {\n const isSystemKeyCombinations = ctrlKey || metaKey || altKey;\n const isSingleUnicodeChar = /^.$/u.test(key); // 4-byte characters case (e.g. smile)\n\n return !isSystemKeyCombinations && key !== 'Backspace' && isSingleUnicodeChar;\n}\nfunction getLineSelection({\n value,\n selection\n}, isForward) {\n const [from, to] = selection;\n if (from !== to) {\n return [from, to];\n }\n const nearestBreak = isForward ? value.slice(from).indexOf('\\n') + 1 || value.length : value.slice(0, to).lastIndexOf('\\n') + 1;\n const selectFrom = isForward ? from : nearestBreak;\n const selectTo = isForward ? nearestBreak : to;\n return [selectFrom, selectTo];\n}\nfunction getNotEmptySelection({\n value,\n selection\n}, isForward) {\n const [from, to] = selection;\n if (from !== to) {\n return [from, to];\n }\n const notEmptySelection = isForward ? [from, to + 1] : [from - 1, to];\n return notEmptySelection.map(x => Math.min(Math.max(x, 0), value.length));\n}\nconst TRAILING_SPACES_REG = /\\s+$/g;\nconst LEADING_SPACES_REG = /^\\s+/g;\nconst SPACE_REG = /\\s/;\nfunction getWordSelection({\n value,\n selection\n}, isForward) {\n const [from, to] = selection;\n if (from !== to) {\n return [from, to];\n }\n if (isForward) {\n const valueAfterSelectionStart = value.slice(from);\n const [leadingSpaces] = valueAfterSelectionStart.match(LEADING_SPACES_REG) || [''];\n const nearestWordEndIndex = valueAfterSelectionStart.replace(LEADING_SPACES_REG, '') // TODO replace with `String.trimStart` after bumping Firefox to 61+\n .search(SPACE_REG);\n return [from, nearestWordEndIndex !== -1 ? from + leadingSpaces.length + nearestWordEndIndex : value.length];\n }\n const valueBeforeSelectionEnd = value.slice(0, to);\n const [trailingSpaces] = valueBeforeSelectionEnd.match(TRAILING_SPACES_REG) || [''];\n const selectedWordLength = valueBeforeSelectionEnd.replace(TRAILING_SPACES_REG, '') // TODO replace with `String.trimEnd` after bumping Firefox to 61+\n .split('').reverse().findIndex(char => char.match(SPACE_REG));\n return [selectedWordLength !== -1 ? to - trailingSpaces.length - selectedWordLength : 0, to];\n}\n\n/* eslint-disable @typescript-eslint/ban-types */\n\n/**\r\n * @internal\r\n */\nfunction maskitoPipe(processors = []) {\n return (initialData, ...readonlyArgs) => processors.reduce((data, fn) => Object.assign(Object.assign({}, data), fn(data, ...readonlyArgs)), initialData);\n}\nfunction maskitoTransform(valueOrState, maskitoOptions) {\n const options = Object.assign(Object.assign({}, MASKITO_DEFAULT_OPTIONS), maskitoOptions);\n const preprocessor = maskitoPipe(options.preprocessors);\n const postprocessor = maskitoPipe(options.postprocessors);\n const initialElementState = typeof valueOrState === 'string' ? {\n value: valueOrState,\n selection: [0, 0]\n } : valueOrState;\n const {\n elementState\n } = preprocessor({\n elementState: initialElementState,\n data: ''\n }, 'validation');\n const maskModel = new MaskModel(elementState, options);\n const {\n value,\n selection\n } = postprocessor(maskModel, initialElementState);\n return typeof valueOrState === 'string' ? value : {\n value,\n selection\n };\n}\nclass Maskito extends MaskHistory {\n constructor(element, maskitoOptions) {\n super();\n this.element = element;\n this.maskitoOptions = maskitoOptions;\n this.isTextArea = this.element.nodeName === 'TEXTAREA';\n this.eventListener = new EventListener(this.element);\n this.options = Object.assign(Object.assign({}, MASKITO_DEFAULT_OPTIONS), this.maskitoOptions);\n this.preprocessor = maskitoPipe(this.options.preprocessors);\n this.postprocessor = maskitoPipe(this.options.postprocessors);\n this.teardowns = this.options.plugins.map(plugin => plugin(this.element, this.options));\n this.ensureValueFitsMask();\n this.updateHistory(this.elementState);\n this.eventListener.listen('keydown', event => {\n if (isRedo(event)) {\n event.preventDefault();\n return this.redo();\n }\n if (isUndo(event)) {\n event.preventDefault();\n return this.undo();\n }\n });\n if (isBeforeInputEventSupported(element)) {\n this.eventListener.listen('beforeinput', event => {\n const isForward = event.inputType.includes('Forward');\n this.updateHistory(this.elementState);\n switch (event.inputType) {\n // historyUndo/historyRedo will not be triggered if value was modified programmatically\n case 'historyUndo':\n event.preventDefault();\n return this.undo();\n case 'historyRedo':\n event.preventDefault();\n return this.redo();\n case 'deleteByCut':\n case 'deleteContentBackward':\n case 'deleteContentForward':\n return this.handleDelete({\n event,\n isForward,\n selection: getNotEmptySelection(this.elementState, isForward)\n });\n case 'deleteWordForward':\n case 'deleteWordBackward':\n return this.handleDelete({\n event,\n isForward,\n selection: getWordSelection(this.elementState, isForward),\n force: true\n });\n case 'deleteSoftLineBackward':\n case 'deleteSoftLineForward':\n case 'deleteHardLineBackward':\n case 'deleteHardLineForward':\n return this.handleDelete({\n event,\n isForward,\n selection: getLineSelection(this.elementState, isForward),\n force: true\n });\n case 'insertCompositionText':\n return;\n // will be handled inside `compositionend` event\n\n case 'insertLineBreak':\n return this.handleEnter(event);\n case 'insertFromPaste':\n case 'insertText':\n case 'insertFromDrop':\n default:\n return this.handleInsert(event, event.data || '');\n }\n });\n } else {\n /** TODO: drop it after browser support bump (Firefox 87+)\r\n * Also, replace union types `Event | TypedInputEvent` with `TypedInputEvent` inside:\r\n *** {@link handleDelete}\r\n *** {@link handleInsert}\r\n */\n this.eventListener.listen('keydown', event => this.handleKeydown(event));\n this.eventListener.listen('paste', event => {\n var _a;\n return this.handleInsert(event, ((_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text/plain')) || '');\n });\n }\n this.eventListener.listen('input', ({\n inputType\n }) => {\n if (inputType === 'insertCompositionText') {\n return; // will be handled inside `compositionend` event\n }\n\n this.ensureValueFitsMask();\n this.updateHistory(this.elementState);\n });\n this.eventListener.listen('compositionend', () => {\n this.ensureValueFitsMask();\n this.updateHistory(this.elementState);\n });\n }\n get elementState() {\n const {\n value,\n selectionStart,\n selectionEnd\n } = this.element;\n return {\n value,\n selection: [selectionStart || 0, selectionEnd || 0]\n };\n }\n get maxLength() {\n const {\n maxLength\n } = this.element;\n return maxLength === -1 ? Infinity : maxLength;\n }\n destroy() {\n this.eventListener.destroy();\n this.teardowns.forEach(teardown => teardown === null || teardown === void 0 ? void 0 : teardown());\n }\n updateElementState({\n value,\n selection\n }, eventInit = {\n inputType: 'insertText',\n data: null\n }) {\n const initialValue = this.elementState.value;\n this.updateValue(value);\n this.updateSelectionRange(selection);\n if (initialValue !== value) {\n this.dispatchInputEvent(eventInit);\n }\n }\n updateSelectionRange([from, to]) {\n var _a, _b;\n if (this.element.selectionStart !== from || this.element.selectionEnd !== to) {\n (_b = (_a = this.element).setSelectionRange) === null || _b === void 0 ? void 0 : _b.call(_a, from, to);\n }\n }\n updateValue(value) {\n this.element.value = value;\n }\n ensureValueFitsMask() {\n this.updateElementState(maskitoTransform(this.elementState, this.options));\n }\n dispatchInputEvent(eventInit = {\n inputType: 'insertText',\n data: null\n }) {\n const globalObject = typeof window !== 'undefined' ? window : globalThis; // TODO: replace `globalObject` with `globalThis` after bumping Firefox to 65+\n // @see https://caniuse.com/?search=globalThis\n\n if (globalObject === null || globalObject === void 0 ? void 0 : globalObject.InputEvent) {\n this.element.dispatchEvent(new InputEvent('input', Object.assign(Object.assign({}, eventInit), {\n bubbles: true,\n cancelable: false\n })));\n }\n }\n handleKeydown(event) {\n const pressedKey = event.key;\n const isForward = pressedKey === 'Delete';\n switch (pressedKey) {\n case 'Backspace':\n case 'Delete':\n return this.handleDelete({\n event,\n isForward,\n selection: getNotEmptySelection(this.elementState, isForward)\n });\n case 'Enter':\n return this.handleEnter(event);\n }\n if (!isEventProducingCharacter(event)) {\n return;\n }\n this.handleInsert(event, pressedKey);\n }\n handleDelete({\n event,\n selection,\n isForward,\n force = false\n }) {\n const initialState = {\n value: this.elementState.value,\n selection\n };\n const [initialFrom, initialTo] = initialState.selection;\n const {\n elementState\n } = this.preprocessor({\n elementState: initialState,\n data: ''\n }, isForward ? 'deleteForward' : 'deleteBackward');\n const maskModel = new MaskModel(elementState, this.options);\n const [from, to] = elementState.selection;\n maskModel.deleteCharacters([from, to]);\n const newElementState = this.postprocessor(maskModel, initialState);\n const newPossibleValue = initialState.value.slice(0, initialFrom) + initialState.value.slice(initialTo);\n if (newPossibleValue === newElementState.value && !force) {\n return;\n }\n event.preventDefault();\n if (areElementValuesEqual(initialState, elementState, maskModel, newElementState)) {\n // User presses Backspace/Delete for the fixed value\n return this.updateSelectionRange(isForward ? [to, to] : [from, from]);\n } // TODO: drop it when `event: Event | TypedInputEvent` => `event: TypedInputEvent`\n\n const inputTypeFallback = isForward ? 'deleteContentForward' : 'deleteContentBackward';\n this.updateElementState(newElementState, {\n inputType: 'inputType' in event ? event.inputType : inputTypeFallback,\n data: null\n });\n this.updateHistory(newElementState);\n }\n handleInsert(event, data) {\n const initialElementState = this.elementState;\n const {\n elementState,\n data: insertedText = data\n } = this.preprocessor({\n data,\n elementState: initialElementState\n }, 'insert');\n const maskModel = new MaskModel(elementState, this.options);\n try {\n maskModel.addCharacters(elementState.selection, insertedText);\n } catch (_a) {\n return event.preventDefault();\n }\n const [from, to] = elementState.selection;\n const newPossibleValue = elementState.value.slice(0, from) + data + elementState.value.slice(to);\n const newElementState = this.postprocessor(maskModel, initialElementState);\n if (newElementState.value.length > this.maxLength) {\n return event.preventDefault();\n }\n if (newPossibleValue !== newElementState.value) {\n event.preventDefault();\n this.updateElementState(newElementState, {\n data,\n inputType: 'inputType' in event ? event.inputType : 'insertText'\n });\n this.updateHistory(newElementState);\n }\n }\n handleEnter(event) {\n if (this.isTextArea) {\n this.handleInsert(event, '\\n');\n }\n }\n}\nexport { MASKITO_DEFAULT_ELEMENT_PREDICATE, MASKITO_DEFAULT_OPTIONS, Maskito, maskitoPipe, maskitoTransform };","import { TuiMonthPipe, tuiDropdownOptionsProvider, TUI_VALUE_ACCESSOR } from '@taiga-ui/core';\nimport { TUI_MONTH_FORMATTER } from '@taiga-ui/kit/tokens';\nimport { of, identity } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { Optional, Self } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nconst TUI_MONTH_FORMATTER_PROVIDER = {\n provide: TUI_MONTH_FORMATTER,\n deps: [TuiMonthPipe],\n useFactory: pipe => month => month ? pipe.transform(month).pipe(map(formatted => `${formatted} ${month.formattedYear}`)) : of(``)\n};\nconst FIXED_DROPDOWN_CONTROLLER_PROVIDER = tuiDropdownOptionsProvider({\n limitWidth: `fixed`,\n align: `right`\n});\nconst TUI_VALUE_ACCESSOR_PROVIDER = {\n provide: TUI_VALUE_ACCESSOR,\n deps: [[new Optional(), new Self(), NG_VALUE_ACCESSOR]],\n useFactory: identity\n};\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { FIXED_DROPDOWN_CONTROLLER_PROVIDER, TUI_MONTH_FORMATTER_PROVIDER, TUI_VALUE_ACCESSOR_PROVIDER };\n","import * as i0 from '@angular/core';\nimport { Directive, NgModule } from '@angular/core';\nimport { TUI_VALUE_ACCESSOR_PROVIDER } from '@taiga-ui/kit/providers';\nlet TuiValueAccessorDirective = /*#__PURE__*/(() => {\n class TuiValueAccessorDirective {}\n TuiValueAccessorDirective.ɵfac = function TuiValueAccessorDirective_Factory(t) {\n return new (t || TuiValueAccessorDirective)();\n };\n TuiValueAccessorDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiValueAccessorDirective,\n selectors: [[\"\", \"tuiValueAccessor\", \"\"]],\n features: [i0.ɵɵProvidersFeature([TUI_VALUE_ACCESSOR_PROVIDER])]\n });\n return TuiValueAccessorDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiValueAccessorModule = /*#__PURE__*/(() => {\n class TuiValueAccessorModule {}\n TuiValueAccessorModule.ɵfac = function TuiValueAccessorModule_Factory(t) {\n return new (t || TuiValueAccessorModule)();\n };\n TuiValueAccessorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiValueAccessorModule\n });\n TuiValueAccessorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiValueAccessorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiValueAccessorDirective, TuiValueAccessorModule };\n","import * as i0 from '@angular/core';\nimport { ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, HostBinding, NgModule } from '@angular/core';\nimport * as i3 from '@angular/forms';\nimport { NgControl } from '@angular/forms';\nimport * as i2 from '@taiga-ui/cdk';\nimport { AbstractTuiNullableControl, tuiIsNativeFocused, tuiAsFocusableItemAccessor, tuiAsControl, TuiCheckedModule, TuiFocusableModule, TuiFocusedModule, TuiFocusVisibleModule } from '@taiga-ui/cdk';\nimport * as i1 from '@taiga-ui/core';\nimport { TUI_CHECKBOX_OPTIONS, TuiPrimitiveCheckboxModule } from '@taiga-ui/core';\nimport { CommonModule } from '@angular/common';\nconst _c0 = [\"focusableElement\"];\nlet TuiCheckboxComponent = /*#__PURE__*/(() => {\n class TuiCheckboxComponent extends AbstractTuiNullableControl {\n constructor(control, options, cdr) {\n super(control, cdr);\n this.options = options;\n this.size = this.options.size;\n }\n get nativeFocusableElement() {\n return !this.focusableElement || this.computedDisabled ? null : this.focusableElement.nativeElement;\n }\n get focused() {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n get computedFocusable() {\n return this.interactive && this.focusable;\n }\n /** @deprecated use 'value' setter */\n onChecked(checked) {\n this.value = checked;\n }\n onFocused(focused) {\n this.updateFocused(focused);\n }\n onFocusVisible(focusVisible) {\n this.updateFocusVisible(focusVisible);\n }\n }\n TuiCheckboxComponent.ɵfac = function TuiCheckboxComponent_Factory(t) {\n return new (t || TuiCheckboxComponent)(i0.ɵɵdirectiveInject(NgControl, 10), i0.ɵɵdirectiveInject(TUI_CHECKBOX_OPTIONS), i0.ɵɵdirectiveInject(ChangeDetectorRef));\n };\n TuiCheckboxComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiCheckboxComponent,\n selectors: [[\"tui-checkbox\"]],\n viewQuery: function TuiCheckboxComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusableElement = _t.first);\n }\n },\n hostVars: 1,\n hostBindings: function TuiCheckboxComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"data-size\", ctx.size);\n }\n },\n inputs: {\n size: \"size\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiCheckboxComponent), tuiAsControl(TuiCheckboxComponent)]), i0.ɵɵInheritDefinitionFeature],\n decls: 3,\n vars: 11,\n consts: [[3, \"disabled\", \"focused\", \"hovered\", \"invalid\", \"pressed\", \"size\", \"value\"], [\"automation-id\", \"tui-checkbox__native\", \"type\", \"checkbox\", 1, \"t-native\", 3, \"disabled\", \"id\", \"tuiFocusable\", \"tuiChecked\", \"tuiCheckedChange\", \"tuiFocusedChange\", \"tuiFocusVisibleChange\"], [\"focusableElement\", \"\"]],\n template: function TuiCheckboxComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-primitive-checkbox\", 0)(1, \"input\", 1, 2);\n i0.ɵɵlistener(\"tuiCheckedChange\", function TuiCheckboxComponent_Template_input_tuiCheckedChange_1_listener($event) {\n return ctx.value = $event;\n })(\"tuiFocusedChange\", function TuiCheckboxComponent_Template_input_tuiFocusedChange_1_listener($event) {\n return ctx.onFocused($event);\n })(\"tuiFocusVisibleChange\", function TuiCheckboxComponent_Template_input_tuiFocusVisibleChange_1_listener($event) {\n return ctx.onFocusVisible($event);\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"disabled\", ctx.disabled)(\"focused\", ctx.computedFocusVisible)(\"hovered\", ctx.pseudoHover)(\"invalid\", ctx.computedInvalid)(\"pressed\", ctx.pseudoActive)(\"size\", ctx.size)(\"value\", ctx.value);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"disabled\", ctx.disabled)(\"id\", ctx.id)(\"tuiFocusable\", ctx.computedFocusable)(\"tuiChecked\", ctx.value);\n }\n },\n dependencies: [i1.TuiPrimitiveCheckboxComponent, i2.TuiCheckedDirective, i2.TuiFocusableDirective, i2.TuiFocusedDirective, i2.TuiFocusVisibleDirective],\n styles: [\"[_nghost-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;flex-shrink:0}[data-size=m][_nghost-%COMP%]{width:1rem;height:1rem}[data-size=l][_nghost-%COMP%]{width:1.5rem;height:1.5rem}._readonly[_nghost-%COMP%] tui-primitive-checkbox[_ngcontent-%COMP%]{pointer-events:none}.t-native[_ngcontent-%COMP%]{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.t-native[_ngcontent-%COMP%]:-webkit-autofill, .t-native[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-native[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}\"],\n changeDetection: 0\n });\n return TuiCheckboxComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiCheckboxModule = /*#__PURE__*/(() => {\n class TuiCheckboxModule {}\n TuiCheckboxModule.ɵfac = function TuiCheckboxModule_Factory(t) {\n return new (t || TuiCheckboxModule)();\n };\n TuiCheckboxModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiCheckboxModule\n });\n TuiCheckboxModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiCheckedModule, TuiFocusableModule, TuiFocusedModule, TuiFocusVisibleModule, TuiPrimitiveCheckboxModule]]\n });\n return TuiCheckboxModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiCheckboxComponent, TuiCheckboxModule };\n","import * as i0 from '@angular/core';\nimport { ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, NgModule } from '@angular/core';\nimport * as i2 from '@angular/forms';\nimport { NgControl, FormsModule } from '@angular/forms';\nimport { AbstractTuiNullableControl, tuiIsNativeFocused, tuiAsFocusableItemAccessor, tuiAsControl } from '@taiga-ui/cdk';\nimport { TUI_MODE, TUI_CHECKBOX_OPTIONS, MODE_PROVIDER } from '@taiga-ui/core';\nimport * as i1 from '@taiga-ui/kit/components/checkbox';\nimport { TuiCheckboxComponent, TuiCheckboxModule } from '@taiga-ui/kit/components/checkbox';\nimport * as i3 from 'rxjs';\nimport { CommonModule } from '@angular/common';\nconst _c0 = [\"*\"];\nlet TuiCheckboxLabeledComponent = /*#__PURE__*/(() => {\n class TuiCheckboxLabeledComponent extends AbstractTuiNullableControl {\n constructor(control, cdr, mode$, options) {\n super(control, cdr);\n this.mode$ = mode$;\n this.options = options;\n this.size = this.options.size;\n }\n get focused() {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n get nativeFocusableElement() {\n var _a, _b;\n return (_b = (_a = this.checkbox) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) !== null && _b !== void 0 ? _b : null;\n }\n onFocused(focused) {\n this.updateFocused(focused);\n }\n /** @deprecated use 'value' setter */\n onModelChange(value) {\n this.value = value;\n }\n }\n TuiCheckboxLabeledComponent.ɵfac = function TuiCheckboxLabeledComponent_Factory(t) {\n return new (t || TuiCheckboxLabeledComponent)(i0.ɵɵdirectiveInject(NgControl, 10), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(TUI_MODE), i0.ɵɵdirectiveInject(TUI_CHECKBOX_OPTIONS));\n };\n TuiCheckboxLabeledComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiCheckboxLabeledComponent,\n selectors: [[\"tui-checkbox-labeled\"]],\n viewQuery: function TuiCheckboxLabeledComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TuiCheckboxComponent, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.checkbox = _t.first);\n }\n },\n hostVars: 1,\n hostBindings: function TuiCheckboxLabeledComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"$.data-mode.attr\", function TuiCheckboxLabeledComponent___data_mode_attr_HostBindingHandler() {\n return ctx.mode$;\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-size\", ctx.size);\n }\n },\n inputs: {\n size: \"size\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiCheckboxLabeledComponent), tuiAsControl(TuiCheckboxLabeledComponent), MODE_PROVIDER]), i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c0,\n decls: 4,\n vars: 12,\n consts: [[1, \"t-wrapper\"], [3, \"disabled\", \"focusable\", \"nativeId\", \"pseudoActive\", \"pseudoFocus\", \"pseudoHover\", \"pseudoInvalid\", \"readOnly\", \"size\", \"ngModel\", \"ngModelChange\", \"focusedChange\"], [1, \"t-content\"]],\n template: function TuiCheckboxLabeledComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"label\", 0)(1, \"tui-checkbox\", 1);\n i0.ɵɵlistener(\"ngModelChange\", function TuiCheckboxLabeledComponent_Template_tui_checkbox_ngModelChange_1_listener($event) {\n return ctx.value = $event;\n })(\"focusedChange\", function TuiCheckboxLabeledComponent_Template_tui_checkbox_focusedChange_1_listener($event) {\n return ctx.onFocused($event);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"div\", 2);\n i0.ɵɵprojection(3);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"disabled\", ctx.computedDisabled)(\"focusable\", ctx.focusable)(\"nativeId\", ctx.nativeId)(\"pseudoActive\", ctx.pseudoActive)(\"pseudoFocus\", ctx.pseudoFocus)(\"pseudoHover\", ctx.pseudoHover)(\"pseudoInvalid\", ctx.computedInvalid)(\"readOnly\", ctx.readOnly)(\"size\", ctx.size)(\"ngModel\", ctx.value);\n i0.ɵɵadvance(1);\n i0.ɵɵclassProp(\"t-content_disabled\", ctx.computedDisabled);\n }\n },\n dependencies: [i1.TuiCheckboxComponent, i2.NgControlStatus, i2.NgModel],\n styles: [\"[_nghost-%COMP%]{position:relative;display:block;line-height:0}._disabled[_nghost-%COMP%], ._readonly[_nghost-%COMP%]{pointer-events:none}.t-wrapper[_ngcontent-%COMP%]{display:inline-flex;max-width:100%;cursor:pointer}._disabled[_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{cursor:default}[data-mode=onDark][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{color:var(--tui-text-01-night)}.t-content[_ngcontent-%COMP%]{font:var(--tui-font-text-s);line-height:1rem;word-wrap:break-word;min-width:0}.t-content_disabled[_ngcontent-%COMP%]{opacity:var(--tui-disabled-opacity)}[data-size=m][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{margin-left:.5rem}[data-size=l][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{font:var(--tui-font-text-m);margin-left:.75rem}\"],\n changeDetection: 0\n });\n return TuiCheckboxLabeledComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiCheckboxLabeledModule = /*#__PURE__*/(() => {\n class TuiCheckboxLabeledModule {}\n TuiCheckboxLabeledModule.ɵfac = function TuiCheckboxLabeledModule_Factory(t) {\n return new (t || TuiCheckboxLabeledModule)();\n };\n TuiCheckboxLabeledModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiCheckboxLabeledModule\n });\n TuiCheckboxLabeledModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, FormsModule, TuiCheckboxModule]]\n });\n return TuiCheckboxLabeledModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiCheckboxLabeledComponent, TuiCheckboxLabeledModule };\n","import { MASKITO_DEFAULT_OPTIONS, maskitoTransform } from '@maskito/core';\nconst DEFAULT_DECIMAL_PSEUDO_SEPARATORS = ['.', ',', 'б', 'ю'];\nconst DEFAULT_MIN_DATE = new Date('0001-01-01');\nconst DEFAULT_MAX_DATE = new Date('9999-12-31');\nconst DEFAULT_TIME_SEGMENT_MAX_VALUES = {\n hours: 23,\n minutes: 59,\n seconds: 59,\n milliseconds: 999\n};\n\n/**\r\n * {@link https://unicode-table.com/en/00A0/ Non-breaking space}.\r\n */\nconst CHAR_NO_BREAK_SPACE = '\\u00A0';\n/**\r\n * {@link https://unicode-table.com/en/2013/ EN dash}\r\n * is used to indicate a range of numbers or a span of time.\r\n * @example 2006–2022\r\n */\n\nconst CHAR_EN_DASH = '\\u2013';\n/**\r\n * {@link https://unicode-table.com/en/2014/ EM dash}\r\n * is used to mark a break in a sentence.\r\n * @example Taiga UI — powerful set of open source components for Angular\r\n * ___\r\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_HYPHEN}!\r\n */\n\nconst CHAR_EM_DASH = '\\u2014';\n/**\r\n * {@link https://unicode-table.com/en/002D/ Hyphen (minus sign)}\r\n * is used to combine words.\r\n * @example well-behaved\r\n * ___\r\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_EM_DASH}!\r\n */\n\nconst CHAR_HYPHEN = '\\u002D';\n/**\r\n * {@link https://unicode-table.com/en/2212/ Minus}\r\n * is used as math operator symbol or before negative digits.\r\n * ---\r\n * Can be used as `−`. Don't confuse with {@link CHAR_HYPHEN}\r\n */\n\nconst CHAR_MINUS = '\\u2212';\nconst POSSIBLE_DATE_RANGE_SEPARATOR = [CHAR_HYPHEN, CHAR_EN_DASH, CHAR_EM_DASH, CHAR_MINUS];\nconst POSSIBLE_DATE_TIME_SEPARATOR = [',', ' '];\nconst TIME_FIXED_CHARACTERS = [':', '.'];\nconst TIME_SEGMENT_VALUE_LENGTHS = {\n hours: 2,\n minutes: 2,\n seconds: 2,\n milliseconds: 3\n};\n\n/**\r\n * Clamps a value between two inclusive limits\r\n *\r\n * @param value\r\n * @param min lower limit\r\n * @param max upper limit\r\n */\nfunction clamp(value, min, max) {\n const clampedValue = Math.min(Number(max), Math.max(Number(min), Number(value)));\n return value instanceof Date ? new Date(clampedValue) : clampedValue;\n}\nfunction appendDate(initialDate, {\n day,\n month,\n year\n} = {}) {\n const date = new Date(initialDate);\n if (day) {\n date.setDate(date.getDate() + day);\n }\n if (month) {\n date.setMonth(date.getMonth() + month);\n }\n if (year) {\n date.setFullYear(date.getFullYear() + year);\n }\n return date;\n}\nconst getDateSegmentValueLength = dateString => {\n var _a, _b, _c;\n return {\n day: ((_a = dateString.match(/d/g)) === null || _a === void 0 ? void 0 : _a.length) || 0,\n month: ((_b = dateString.match(/m/g)) === null || _b === void 0 ? void 0 : _b.length) || 0,\n year: ((_c = dateString.match(/y/g)) === null || _c === void 0 ? void 0 : _c.length) || 0\n };\n};\nfunction dateToSegments(date) {\n return {\n day: String(date.getDate()).padStart(2, '0'),\n month: String(date.getMonth() + 1).padStart(2, '0'),\n year: String(date.getFullYear()).padStart(4, '0'),\n hours: String(date.getHours()).padStart(2, '0'),\n minutes: String(date.getMinutes()).padStart(2, '0'),\n seconds: String(date.getSeconds()).padStart(2, '0'),\n milliseconds: String(date.getMilliseconds()).padStart(3, '0')\n };\n}\nfunction isDateStringComplete(dateString, dateModeTemplate) {\n if (dateString.length < dateModeTemplate.length) {\n return false;\n }\n return dateString.split(/\\D/).every(segment => !segment.match(/^0+$/));\n}\nfunction parseDateRangeString(dateRange, dateModeTemplate, rangeSeparator) {\n const digitsInDate = dateModeTemplate.replace(/\\W/g, '').length;\n return dateRange.replace(rangeSeparator, '').match(new RegExp(`(\\\\D*\\\\d[^\\\\d\\\\s]*){1,${digitsInDate}}`, 'g')) || [];\n}\n\n/**\r\n * @deprecated use `Object.fromEntries` instead\r\n * (check browser support first https://caniuse.com/mdn-javascript_builtins_object_fromentries)\r\n * ___\r\n * TODO: after we bump Firefox to 63+ replace this function with `Object.fromEntries`.\r\n * TODO: Add `es2019.object` to `tsconfig.json` => `compilerOptions.lib`.\r\n *\r\n */\nfunction getObjectFromEntries(keyValuePairs) {\n return keyValuePairs.reduce((obj, [key, val]) => Object.assign(Object.assign({}, obj), {\n [key]: val\n }), {});\n}\nfunction parseDateString(dateString, fullMode) {\n const cleanMode = fullMode.replace(/[^dmy]/g, '');\n const onlyDigitsDate = dateString.replace(/\\D+/g, '');\n const dateSegments = {\n day: onlyDigitsDate.slice(cleanMode.indexOf('d'), cleanMode.lastIndexOf('d') + 1),\n month: onlyDigitsDate.slice(cleanMode.indexOf('m'), cleanMode.lastIndexOf('m') + 1),\n year: onlyDigitsDate.slice(cleanMode.indexOf('y'), cleanMode.lastIndexOf('y') + 1)\n };\n return getObjectFromEntries(Object.entries(dateSegments).filter(([_, value]) => Boolean(value)).sort(([a], [b]) => fullMode.toLowerCase().indexOf(a[0]) > fullMode.toLowerCase().indexOf(b[0]) ? 1 : -1));\n}\nfunction segmentsToDate(parsedDate, parsedTime) {\n var _a, _b, _c, _d, _e, _f, _g;\n const year = ((_a = parsedDate.year) === null || _a === void 0 ? void 0 : _a.length) === 2 ? `20${parsedDate.year}` : parsedDate.year;\n const date = new Date(Number(year !== null && year !== void 0 ? year : '0'), Number((_b = parsedDate.month) !== null && _b !== void 0 ? _b : '1') - 1, Number((_c = parsedDate.day) !== null && _c !== void 0 ? _c : '1'), Number((_d = parsedTime === null || parsedTime === void 0 ? void 0 : parsedTime.hours) !== null && _d !== void 0 ? _d : '0'), Number((_e = parsedTime === null || parsedTime === void 0 ? void 0 : parsedTime.minutes) !== null && _e !== void 0 ? _e : '0'), Number((_f = parsedTime === null || parsedTime === void 0 ? void 0 : parsedTime.seconds) !== null && _f !== void 0 ? _f : '0'), Number((_g = parsedTime === null || parsedTime === void 0 ? void 0 : parsedTime.milliseconds) !== null && _g !== void 0 ? _g : '0')); // needed for years less than 1900\n\n date.setFullYear(Number(year !== null && year !== void 0 ? year : '0'));\n return date;\n}\nconst DATE_TIME_SEPARATOR = ', ';\nfunction toDateString({\n day,\n month,\n year,\n hours,\n minutes,\n seconds,\n milliseconds\n}, dateMode, timeMode) {\n var _a;\n const safeYear = ((_a = dateMode.match(/y/g)) === null || _a === void 0 ? void 0 : _a.length) === 2 ? year === null || year === void 0 ? void 0 : year.slice(-2) : year;\n const fullMode = dateMode + (timeMode ? DATE_TIME_SEPARATOR + timeMode : '');\n return fullMode.replace(/d+/g, day !== null && day !== void 0 ? day : '').replace(/m+/g, month !== null && month !== void 0 ? month : '').replace(/y+/g, safeYear !== null && safeYear !== void 0 ? safeYear : '').replace(/H+/g, hours !== null && hours !== void 0 ? hours : '').replace(/MSS/g, milliseconds !== null && milliseconds !== void 0 ? milliseconds : '').replace(/M+/g, minutes !== null && minutes !== void 0 ? minutes : '').replace(/S+/g, seconds !== null && seconds !== void 0 ? seconds : '').replace(/^\\D+/g, '').replace(/\\D+$/g, '');\n}\nfunction padWithZeroesUntilValid(segmentValue, paddedMaxValue, prefixedZeroesCount = 0) {\n if (Number(segmentValue.padEnd(paddedMaxValue.length, '0')) <= Number(paddedMaxValue)) {\n return {\n validatedSegmentValue: segmentValue,\n prefixedZeroesCount\n };\n }\n if (segmentValue.endsWith('0')) {\n // 00:|00 => Type 9 => 00:09|\n return padWithZeroesUntilValid(`0${segmentValue.slice(0, paddedMaxValue.length - 1)}`, paddedMaxValue, prefixedZeroesCount + 1);\n } // |19:00 => Type 2 => 2|0:00\n\n return padWithZeroesUntilValid(`${segmentValue.slice(0, paddedMaxValue.length - 1)}0`, paddedMaxValue, prefixedZeroesCount);\n}\nconst dateMaxValues = {\n day: 31,\n month: 12,\n year: 9999\n};\nfunction validateDateString({\n dateString,\n dateModeTemplate,\n offset,\n selection: [from, to]\n}) {\n const parsedDate = parseDateString(dateString, dateModeTemplate);\n const dateSegments = Object.entries(parsedDate);\n const validatedDateSegments = {};\n let paddedZeroes = 0;\n for (const [segmentName, segmentValue] of dateSegments) {\n const validatedDate = toDateString(validatedDateSegments, dateModeTemplate);\n const maxSegmentValue = dateMaxValues[segmentName];\n const fantomSeparator = validatedDate.length && 1;\n const lastSegmentDigitIndex = offset + validatedDate.length + fantomSeparator + getDateSegmentValueLength(dateModeTemplate)[segmentName];\n const isLastSegmentDigitAdded = lastSegmentDigitIndex >= from && lastSegmentDigitIndex === to;\n if (isLastSegmentDigitAdded && Number(segmentValue) > Number(maxSegmentValue)) {\n // 3|1.10.2010 => Type 9 => 3|1.10.2010\n return {\n validatedDateString: '',\n updatedSelection: [from, to]\n }; // prevent changes\n }\n\n if (isLastSegmentDigitAdded && Number(segmentValue) < 1) {\n // 31.0|1.2010 => Type 0 => 31.0|1.2010\n return {\n validatedDateString: '',\n updatedSelection: [from, to]\n }; // prevent changes\n }\n\n const {\n validatedSegmentValue,\n prefixedZeroesCount\n } = padWithZeroesUntilValid(segmentValue, `${maxSegmentValue}`);\n paddedZeroes += prefixedZeroesCount;\n validatedDateSegments[segmentName] = validatedSegmentValue;\n }\n const validatedDateString = toDateString(validatedDateSegments, dateModeTemplate);\n const addedDateSegmentSeparators = validatedDateString.length - dateString.length;\n return {\n validatedDateString,\n updatedSelection: [from + paddedZeroes + addedDateSegmentSeparators, to + paddedZeroes + addedDateSegmentSeparators]\n };\n}\n\n/**\r\n * Copy-pasted solution from lodash\r\n * @see https://lodash.com/docs/4.17.15#escapeRegExp\r\n */\nconst reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\nconst reHasRegExpChar = new RegExp(reRegExpChar.source);\nfunction escapeRegExp(str) {\n return str && reHasRegExpChar.test(str) ? str.replace(reRegExpChar, '\\\\$&') : str;\n}\nfunction findCommonBeginningSubstr(a, b) {\n let res = '';\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return res;\n }\n res += a[i];\n }\n return res;\n}\n\n/**\r\n * Returns current active element, including shadow dom\r\n *\r\n * @return element or null\r\n */\nfunction getFocused({\n activeElement\n}) {\n if (!(activeElement === null || activeElement === void 0 ? void 0 : activeElement.shadowRoot)) {\n return activeElement;\n }\n let element = activeElement.shadowRoot.activeElement;\n while (element === null || element === void 0 ? void 0 : element.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n return element;\n}\nfunction identity(x) {\n return x;\n}\nfunction isEmpty(entity) {\n return !entity || typeof entity === 'object' && Object.keys(entity).length === 0;\n}\nfunction raiseSegmentValueToMin(segments, fullMode) {\n const segmentsLength = getDateSegmentValueLength(fullMode);\n return getObjectFromEntries(Object.entries(segments).map(([key, value]) => {\n const segmentLength = segmentsLength[key];\n return [key, value.length === segmentLength && value.match(/^0+$/) ? '1'.padStart(segmentLength, '0') : value];\n }));\n}\nfunction createMinMaxDatePostprocessor({\n dateModeTemplate,\n min = DEFAULT_MIN_DATE,\n max = DEFAULT_MAX_DATE,\n rangeSeparator = '',\n dateSegmentSeparator = '.'\n}) {\n return ({\n value,\n selection\n }) => {\n const endsWithRangeSeparator = rangeSeparator && value.endsWith(rangeSeparator);\n const dateStrings = parseDateRangeString(value, dateModeTemplate, rangeSeparator);\n let validatedValue = '';\n for (const dateString of dateStrings) {\n validatedValue += validatedValue ? rangeSeparator : '';\n const parsedDate = parseDateString(dateString, dateModeTemplate);\n if (!isDateStringComplete(dateString, dateModeTemplate)) {\n const fixedDate = raiseSegmentValueToMin(parsedDate, dateModeTemplate);\n const fixedValue = toDateString(fixedDate, dateModeTemplate);\n const tail = dateString.endsWith(dateSegmentSeparator) ? dateSegmentSeparator : '';\n validatedValue += fixedValue + tail;\n continue;\n }\n const date = segmentsToDate(parsedDate);\n const clampedDate = clamp(date, min, max);\n validatedValue += toDateString(dateToSegments(clampedDate), dateModeTemplate);\n }\n return {\n selection,\n value: validatedValue + (endsWithRangeSeparator ? rangeSeparator : '')\n };\n };\n}\nfunction normalizeDatePreprocessor({\n dateModeTemplate,\n dateSegmentsSeparator,\n rangeSeparator = ''\n}) {\n return ({\n elementState,\n data\n }) => {\n const separator = rangeSeparator ? new RegExp(`${rangeSeparator}|-`) : DATE_TIME_SEPARATOR;\n const possibleDates = data.split(separator);\n const dates = data.includes(DATE_TIME_SEPARATOR) ? [possibleDates[0]] : possibleDates;\n if (dates.every(date => date.trim().split(/\\D/).length === dateModeTemplate.split(dateSegmentsSeparator).length)) {\n const newData = dates.map(date => normalizeDateString(date, dateModeTemplate, dateSegmentsSeparator)).join(rangeSeparator);\n return {\n elementState,\n data: `${newData}${data.includes(DATE_TIME_SEPARATOR) ? DATE_TIME_SEPARATOR + possibleDates[1] || '' : ''}`\n };\n }\n return {\n elementState,\n data\n };\n };\n}\nfunction normalizeDateString(dateString, template, separator) {\n const dateSegments = dateString.split(/\\D/);\n const templateSegments = template.split(separator);\n const normalizedSegments = dateSegments.map((segment, index) => index === templateSegments.length - 1 ? segment : segment.padStart(templateSegments[index].length, '0'));\n return normalizedSegments.join(separator);\n}\nfunction maskitoPostfixPostprocessorGenerator(postfix) {\n const postfixRE = new RegExp(`${escapeRegExp(postfix)}$`);\n return postfix ? ({\n value,\n selection\n }, initialElementState) => {\n if (!value && !initialElementState.value.endsWith(postfix)) {\n // cases when developer wants input to be empty (programmatically)\n return {\n value,\n selection\n };\n }\n if (!value.endsWith(postfix) && !initialElementState.value.endsWith(postfix)) {\n return {\n selection,\n value: value + postfix\n };\n }\n const initialValueBeforePostfix = initialElementState.value.replace(postfixRE, '');\n const postfixWasModified = initialElementState.selection[1] >= initialValueBeforePostfix.length;\n const alreadyExistedValueBeforePostfix = findCommonBeginningSubstr(initialValueBeforePostfix, value);\n return {\n selection,\n value: Array.from(postfix).reverse().reduce((newValue, char, index) => {\n const i = newValue.length - 1 - index;\n const isInitiallyMirroredChar = alreadyExistedValueBeforePostfix[i] === char && postfixWasModified;\n return newValue[i] !== char || isInitiallyMirroredChar ? newValue.slice(0, i + 1) + char + newValue.slice(i + 1) : newValue;\n }, value)\n };\n } : identity;\n}\nfunction maskitoPrefixPostprocessorGenerator(prefix) {\n return prefix ? ({\n value,\n selection\n }, initialElementState) => {\n if (value.startsWith(prefix) ||\n // already valid\n !value && !initialElementState.value.startsWith(prefix) // cases when developer wants input to be empty\n ) {\n return {\n value,\n selection\n };\n }\n const [from, to] = selection;\n const prefixedValue = Array.from(prefix).reduce((modifiedValue, char, i) => modifiedValue[i] === char ? modifiedValue : modifiedValue.slice(0, i) + char + modifiedValue.slice(i), value);\n const addedCharsCount = prefixedValue.length - value.length;\n return {\n selection: [from + addedCharsCount, to + addedCharsCount],\n value: prefixedValue\n };\n } : identity;\n}\nfunction createValidDatePreprocessor({\n dateModeTemplate,\n dateSegmentsSeparator,\n rangeSeparator = ''\n}) {\n return ({\n elementState,\n data\n }) => {\n const {\n value,\n selection\n } = elementState;\n if (data === dateSegmentsSeparator) {\n return {\n elementState,\n data: selection[0] === value.length ? data : ''\n };\n }\n if (POSSIBLE_DATE_RANGE_SEPARATOR.includes(data)) {\n return {\n elementState,\n data: rangeSeparator\n };\n }\n const newCharacters = data.replace(new RegExp(`[^\\\\d${escapeRegExp(dateSegmentsSeparator)}${rangeSeparator}]`, 'g'), '');\n if (!newCharacters) {\n return {\n elementState,\n data: ''\n };\n }\n const [from, rawTo] = selection;\n let to = rawTo + data.length;\n const newPossibleValue = value.slice(0, from) + newCharacters + value.slice(to);\n const dateStrings = parseDateRangeString(newPossibleValue, dateModeTemplate, rangeSeparator);\n let validatedValue = '';\n const hasRangeSeparator = Boolean(rangeSeparator) && newPossibleValue.includes(rangeSeparator);\n for (const dateString of dateStrings) {\n const {\n validatedDateString,\n updatedSelection\n } = validateDateString({\n dateString,\n dateModeTemplate,\n offset: validatedValue ? validatedValue.length + rangeSeparator.length : 0,\n selection: [from, to]\n });\n if (dateString && !validatedDateString) {\n return {\n elementState,\n data: ''\n }; // prevent changes\n }\n\n to = updatedSelection[1];\n validatedValue += hasRangeSeparator && validatedValue ? rangeSeparator + validatedDateString : validatedDateString;\n }\n const newData = validatedValue.slice(from, to);\n return {\n elementState: {\n selection,\n value: validatedValue.slice(0, from) + newData.split(dateSegmentsSeparator).map(segment => '0'.repeat(segment.length)).join(dateSegmentsSeparator) + validatedValue.slice(to)\n },\n data: newData\n };\n };\n}\nfunction maskitoEventHandler(name, handler, eventListenerOptions) {\n return (element, maskitoOptions) => {\n const listener = () => handler(element, maskitoOptions);\n element.addEventListener(name, listener, eventListenerOptions);\n return () => element.removeEventListener(name, listener, eventListenerOptions);\n };\n}\nfunction maskitoAddOnFocusPlugin(value) {\n return maskitoEventHandler('focus', element => {\n if (!element.value) {\n element.value = value;\n element.dispatchEvent(new Event('input'));\n }\n });\n}\nfunction maskitoCaretGuard(guard) {\n return element => {\n const document = element.ownerDocument;\n let isPointerDown = 0;\n const onPointerDown = () => isPointerDown++;\n const onPointerUp = () => {\n isPointerDown = Math.max(--isPointerDown, 0);\n };\n const listener = () => {\n if (getFocused(document) !== element) {\n return;\n }\n if (isPointerDown) {\n return document.addEventListener('mouseup', listener, {\n once: true,\n passive: true\n });\n }\n const start = element.selectionStart || 0;\n const end = element.selectionEnd || 0;\n const [fromLimit, toLimit] = guard(element.value, [start, end]);\n if (fromLimit > start || toLimit < end) {\n element.setSelectionRange(clamp(start, fromLimit, toLimit), clamp(end, fromLimit, toLimit));\n }\n };\n document.addEventListener('selectionchange', listener, {\n passive: true\n });\n element.addEventListener('mousedown', onPointerDown, {\n passive: true\n });\n document.addEventListener('mouseup', onPointerUp, {\n passive: true\n });\n return () => {\n document.removeEventListener('selectionchange', listener);\n document.removeEventListener('mousedown', onPointerDown);\n document.removeEventListener('mouseup', onPointerUp);\n };\n };\n}\nfunction maskitoRejectEvent(element) {\n const listener = () => {\n const value = element.value;\n element.addEventListener('beforeinput', event => {\n if (event.defaultPrevented && value === element.value) {\n element.dispatchEvent(new CustomEvent('maskitoReject', {\n bubbles: true\n }));\n }\n }, {\n once: true\n });\n };\n element.addEventListener('beforeinput', listener, true);\n return () => element.removeEventListener('beforeinput', listener, true);\n}\nfunction maskitoRemoveOnBlurPlugin(value) {\n return maskitoEventHandler('blur', element => {\n if (element.value === value) {\n element.value = '';\n element.dispatchEvent(new Event('input'));\n }\n });\n}\nfunction maskitoWithPlaceholder(placeholder, focusedOnly = false) {\n const removePlaceholder = value => {\n for (let i = value.length - 1; i >= 0; i--) {\n if (value[i] !== placeholder[i]) {\n return value.slice(0, i + 1);\n }\n }\n return '';\n };\n const plugins = [maskitoCaretGuard(value => [0, removePlaceholder(value).length])];\n let focused = false;\n if (focusedOnly) {\n const focus = maskitoEventHandler('focus', element => {\n focused = true;\n element.value += placeholder.slice(element.value.length);\n element.dispatchEvent(new Event('input'));\n }, {\n capture: true\n });\n const blur = maskitoEventHandler('blur', element => {\n focused = false;\n element.value = removePlaceholder(element.value);\n element.dispatchEvent(new Event('input'));\n }, {\n capture: true\n });\n plugins.push(focus, blur);\n }\n return {\n plugins,\n removePlaceholder,\n preprocessors: [({\n elementState,\n data\n }) => {\n const {\n value,\n selection\n } = elementState;\n return {\n elementState: {\n selection,\n value: removePlaceholder(value)\n },\n data\n };\n }],\n postprocessors: [({\n value,\n selection\n }, initialElementState) => initialElementState.value && (focused || !focusedOnly) ? {\n value: value + placeholder.slice(value.length),\n selection\n } : {\n value,\n selection\n }]\n };\n}\nfunction createZeroPlaceholdersPreprocessor() {\n return ({\n elementState\n }, actionType) => {\n const {\n value,\n selection\n } = elementState;\n if (!value || isLastChar(value, selection)) {\n return {\n elementState\n };\n }\n const [from, to] = selection;\n const zeroes = value.slice(from, to).replace(/\\d/g, '0');\n const newValue = value.slice(0, from) + zeroes + value.slice(to);\n if (actionType === 'validation' || actionType === 'insert' && from === to) {\n return {\n elementState: {\n selection,\n value: newValue\n }\n };\n }\n return {\n elementState: {\n selection: actionType === 'deleteBackward' || actionType === 'insert' ? [from, from] : [to, to],\n value: newValue\n }\n };\n };\n}\nfunction isLastChar(value, [_, to]) {\n return to === value.length;\n}\nfunction maskitoDateOptionsGenerator({\n mode,\n separator = '.',\n max,\n min\n}) {\n const dateModeTemplate = mode.split('/').join(separator);\n return Object.assign(Object.assign({}, MASKITO_DEFAULT_OPTIONS), {\n mask: Array.from(dateModeTemplate).map(char => char === separator ? char : /\\d/),\n overwriteMode: 'replace',\n preprocessors: [createZeroPlaceholdersPreprocessor(), normalizeDatePreprocessor({\n dateModeTemplate,\n dateSegmentsSeparator: separator\n }), createValidDatePreprocessor({\n dateModeTemplate,\n dateSegmentsSeparator: separator\n })],\n postprocessors: [createMinMaxDatePostprocessor({\n min,\n max,\n dateModeTemplate,\n dateSegmentSeparator: separator\n })]\n });\n}\nfunction createMinMaxRangeLengthPostprocessor({\n dateModeTemplate,\n rangeSeparator,\n minLength,\n maxLength,\n max = DEFAULT_MAX_DATE\n}) {\n if (isEmpty(minLength) && isEmpty(maxLength)) {\n return identity;\n }\n return ({\n value,\n selection\n }) => {\n const dateStrings = parseDateRangeString(value, dateModeTemplate, rangeSeparator);\n if (dateStrings.length !== 2 || dateStrings.some(date => !isDateStringComplete(date, dateModeTemplate))) {\n return {\n value,\n selection\n };\n }\n const [fromDate, toDate] = dateStrings.map(dateString => segmentsToDate(parseDateString(dateString, dateModeTemplate)));\n const minDistantToDate = appendDate(fromDate, Object.assign(Object.assign({}, minLength), {\n // 06.02.2023 - 07.02.2023 => {minLength: {day: 3}} => 06.02.2023 - 08.02.2023\n // \"from\"-day is included in the range\n day: (minLength === null || minLength === void 0 ? void 0 : minLength.day) && minLength.day - 1\n }));\n const maxDistantToDate = !isEmpty(maxLength) ? appendDate(fromDate, Object.assign(Object.assign({}, maxLength), {\n day: (maxLength === null || maxLength === void 0 ? void 0 : maxLength.day) && maxLength.day - 1\n })) : max;\n const minLengthClampedToDate = clamp(toDate, minDistantToDate, max);\n const minMaxLengthClampedToDate = minLengthClampedToDate > maxDistantToDate ? maxDistantToDate : minLengthClampedToDate;\n return {\n selection,\n value: dateStrings[0] + rangeSeparator + toDateString(dateToSegments(minMaxLengthClampedToDate), dateModeTemplate)\n };\n };\n}\nfunction createSwapDatesPostprocessor({\n dateModeTemplate,\n rangeSeparator\n}) {\n return ({\n value,\n selection\n }) => {\n const dateStrings = parseDateRangeString(value, dateModeTemplate, rangeSeparator);\n const isDateRangeComplete = dateStrings.length === 2 && dateStrings.every(date => isDateStringComplete(date, dateModeTemplate));\n const [from, to] = selection;\n const caretAtTheEnd = from >= value.length;\n const allValueSelected = from === 0 && to >= value.length; // dropping text inside with a pointer\n\n if (!(caretAtTheEnd || allValueSelected) || !isDateRangeComplete) {\n return {\n value,\n selection\n };\n }\n const [fromDate, toDate] = dateStrings.map(dateString => segmentsToDate(parseDateString(dateString, dateModeTemplate)));\n return {\n selection,\n value: fromDate > toDate ? dateStrings.reverse().join(rangeSeparator) : value\n };\n };\n}\nfunction maskitoDateRangeOptionsGenerator({\n mode,\n separator = '.',\n min,\n max,\n minLength,\n maxLength,\n dateSeparator = separator,\n rangeSeparator = `${CHAR_NO_BREAK_SPACE}${CHAR_EN_DASH}${CHAR_NO_BREAK_SPACE}`\n}) {\n const dateModeTemplate = mode.split('/').join(dateSeparator);\n const dateMask = Array.from(dateModeTemplate).map(char => char === dateSeparator ? char : /\\d/);\n return Object.assign(Object.assign({}, MASKITO_DEFAULT_OPTIONS), {\n mask: [...dateMask, ...Array.from(rangeSeparator), ...dateMask],\n overwriteMode: 'replace',\n preprocessors: [createZeroPlaceholdersPreprocessor(), normalizeDatePreprocessor({\n dateModeTemplate,\n rangeSeparator,\n dateSegmentsSeparator: dateSeparator\n }), createValidDatePreprocessor({\n dateModeTemplate,\n rangeSeparator,\n dateSegmentsSeparator: dateSeparator\n })],\n postprocessors: [createMinMaxDatePostprocessor({\n min,\n max,\n dateModeTemplate,\n rangeSeparator,\n dateSegmentSeparator: dateSeparator\n }), createMinMaxRangeLengthPostprocessor({\n dateModeTemplate,\n minLength,\n maxLength,\n max,\n rangeSeparator\n }), createSwapDatesPostprocessor({\n dateModeTemplate,\n rangeSeparator\n })]\n });\n}\nfunction padTimeSegments(timeSegments) {\n return getObjectFromEntries(Object.entries(timeSegments).map(([segmentName, segmentValue]) => [segmentName, `${segmentValue}`.padEnd(TIME_SEGMENT_VALUE_LENGTHS[segmentName], '0')]));\n}\n\n/**\r\n * @param timeString can be with/without fixed characters\r\n */\n\nfunction parseTimeString(timeString) {\n const onlyDigits = timeString.replace(/\\D+/g, '');\n const timeSegments = {\n hours: onlyDigits.slice(0, 2),\n minutes: onlyDigits.slice(2, 4),\n seconds: onlyDigits.slice(4, 6),\n milliseconds: onlyDigits.slice(6, 9)\n };\n return getObjectFromEntries(Object.entries(timeSegments).filter(([_, value]) => Boolean(value)));\n}\nfunction toTimeString({\n hours = '',\n minutes = '',\n seconds = '',\n milliseconds = ''\n}) {\n const mm = minutes && `:${minutes}`;\n const ss = seconds && `:${seconds}`;\n const ms = milliseconds && `.${milliseconds}`;\n return `${hours}${mm}${ss}${ms}`;\n}\nconst TRAILING_TIME_SEGMENT_SEPARATOR_REG = new RegExp(`[${TIME_FIXED_CHARACTERS.map(escapeRegExp).join('')}]$`);\nfunction validateTimeString({\n timeString,\n paddedMaxValues,\n offset,\n selection: [from, to]\n}) {\n const parsedTime = parseTimeString(timeString);\n const possibleTimeSegments = Object.entries(parsedTime);\n const validatedTimeSegments = {};\n let paddedZeroes = 0;\n for (const [segmentName, segmentValue] of possibleTimeSegments) {\n const validatedTime = toTimeString(validatedTimeSegments);\n const maxSegmentValue = paddedMaxValues[segmentName];\n const fantomSeparator = validatedTime.length && 1;\n const lastSegmentDigitIndex = offset + validatedTime.length + fantomSeparator + TIME_SEGMENT_VALUE_LENGTHS[segmentName];\n const isLastSegmentDigitAdded = lastSegmentDigitIndex >= from && lastSegmentDigitIndex <= to;\n if (isLastSegmentDigitAdded && Number(segmentValue) > Number(maxSegmentValue)) {\n // 2|0:00 => Type 9 => 2|0:00\n return {\n validatedTimeString: '',\n updatedTimeSelection: [from, to]\n }; // prevent changes\n }\n\n const {\n validatedSegmentValue,\n prefixedZeroesCount\n } = padWithZeroesUntilValid(segmentValue, `${maxSegmentValue}`);\n paddedZeroes += prefixedZeroesCount;\n validatedTimeSegments[segmentName] = validatedSegmentValue;\n }\n const [trailingSegmentSeparator = ''] = timeString.match(TRAILING_TIME_SEGMENT_SEPARATOR_REG) || [];\n const validatedTimeString = toTimeString(validatedTimeSegments) + trailingSegmentSeparator;\n const addedDateSegmentSeparators = Math.max(validatedTimeString.length - timeString.length, 0);\n return {\n validatedTimeString,\n updatedTimeSelection: [from + paddedZeroes + addedDateSegmentSeparators, to + paddedZeroes + addedDateSegmentSeparators]\n };\n}\nfunction isDateTimeStringComplete(dateTimeString, dateMode, timeMode) {\n return dateTimeString.length >= dateMode.length + timeMode.length + DATE_TIME_SEPARATOR.length && dateTimeString.split(DATE_TIME_SEPARATOR)[0].split(/\\D/).every(segment => !segment.match(/^0+$/));\n}\nfunction parseDateTimeString(dateTime, dateModeTemplate) {\n const hasSeparator = dateTime.includes(DATE_TIME_SEPARATOR);\n return [dateTime.slice(0, dateModeTemplate.length), dateTime.slice(hasSeparator ? dateModeTemplate.length + DATE_TIME_SEPARATOR.length : dateModeTemplate.length)];\n}\nfunction createMinMaxDateTimePostprocessor({\n dateModeTemplate,\n timeMode,\n min = DEFAULT_MIN_DATE,\n max = DEFAULT_MAX_DATE\n}) {\n return ({\n value,\n selection\n }) => {\n const [dateString, timeString] = parseDateTimeString(value, dateModeTemplate);\n const parsedDate = parseDateString(dateString, dateModeTemplate);\n const parsedTime = parseTimeString(timeString);\n if (!isDateTimeStringComplete(value, dateModeTemplate, timeMode)) {\n const fixedDate = raiseSegmentValueToMin(parsedDate, dateModeTemplate);\n const {\n year,\n month,\n day\n } = isDateStringComplete(dateString, dateModeTemplate) ? dateToSegments(clamp(segmentsToDate(fixedDate), min, max)) : fixedDate;\n const fixedValue = toDateString(Object.assign({\n year,\n month,\n day\n }, parsedTime), dateModeTemplate, timeMode);\n const tail = value.slice(fixedValue.length);\n return {\n selection,\n value: fixedValue + tail\n };\n }\n const date = segmentsToDate(parsedDate, parsedTime);\n const clampedDate = clamp(date, min, max);\n const validatedValue = toDateString(dateToSegments(clampedDate), dateModeTemplate, timeMode);\n return {\n selection,\n value: validatedValue\n };\n };\n}\nfunction createValidDateTimePreprocessor({\n dateModeTemplate,\n dateSegmentsSeparator\n}) {\n const invalidCharsRegExp = new RegExp(`[^\\\\d${TIME_FIXED_CHARACTERS.map(escapeRegExp).join('')}${escapeRegExp(dateSegmentsSeparator)}]+`);\n return ({\n elementState,\n data\n }) => {\n const {\n value,\n selection\n } = elementState;\n if (data === dateSegmentsSeparator) {\n return {\n elementState,\n data: selection[0] === value.length ? data : ''\n };\n }\n if (POSSIBLE_DATE_TIME_SEPARATOR.includes(data)) {\n return {\n elementState,\n data: DATE_TIME_SEPARATOR\n };\n }\n const newCharacters = data.replace(invalidCharsRegExp, '');\n if (!newCharacters) {\n return {\n elementState,\n data: ''\n };\n }\n const [from, rawTo] = selection;\n let to = rawTo + data.length;\n const newPossibleValue = value.slice(0, from) + newCharacters + value.slice(to);\n const [dateString, timeString] = parseDateTimeString(newPossibleValue, dateModeTemplate);\n let validatedValue = '';\n const hasDateTimeSeparator = newPossibleValue.includes(DATE_TIME_SEPARATOR);\n const {\n validatedDateString,\n updatedSelection\n } = validateDateString({\n dateString,\n dateModeTemplate,\n offset: 0,\n selection: [from, to]\n });\n if (dateString && !validatedDateString) {\n return {\n elementState,\n data: ''\n }; // prevent changes\n }\n\n to = updatedSelection[1];\n validatedValue += validatedDateString;\n const paddedMaxValues = padTimeSegments(DEFAULT_TIME_SEGMENT_MAX_VALUES);\n const {\n validatedTimeString,\n updatedTimeSelection\n } = validateTimeString({\n timeString,\n paddedMaxValues,\n offset: validatedValue.length + DATE_TIME_SEPARATOR.length,\n selection: [from, to]\n });\n if (timeString && !validatedTimeString) {\n return {\n elementState,\n data: ''\n }; // prevent changes\n }\n\n to = updatedTimeSelection[1];\n validatedValue += hasDateTimeSeparator ? DATE_TIME_SEPARATOR + validatedTimeString : validatedTimeString;\n const newData = validatedValue.slice(from, to);\n return {\n elementState: {\n selection,\n value: validatedValue.slice(0, from) + newData.split(dateSegmentsSeparator).map(segment => '0'.repeat(segment.length)).join(dateSegmentsSeparator) + validatedValue.slice(to)\n },\n data: newData\n };\n };\n}\nfunction maskitoDateTimeOptionsGenerator({\n dateMode,\n timeMode,\n dateSeparator = '.',\n min,\n max\n}) {\n const dateModeTemplate = dateMode.split('/').join(dateSeparator);\n return Object.assign(Object.assign({}, MASKITO_DEFAULT_OPTIONS), {\n mask: [...Array.from(dateModeTemplate).map(char => char === dateSeparator ? char : /\\d/), ...DATE_TIME_SEPARATOR.split(''), ...Array.from(timeMode).map(char => TIME_FIXED_CHARACTERS.includes(char) ? char : /\\d/)],\n overwriteMode: 'replace',\n preprocessors: [createZeroPlaceholdersPreprocessor(), normalizeDatePreprocessor({\n dateModeTemplate,\n dateSegmentsSeparator: dateSeparator\n }), createValidDateTimePreprocessor({\n dateModeTemplate,\n dateSegmentsSeparator: dateSeparator\n })],\n postprocessors: [createMinMaxDateTimePostprocessor({\n min,\n max,\n dateModeTemplate,\n timeMode\n })]\n });\n}\nfunction generateMaskExpression({\n decimalSeparator,\n isNegativeAllowed,\n precision,\n thousandSeparator,\n prefix,\n postfix,\n decimalPseudoSeparators = [],\n pseudoMinuses = []\n}) {\n const computedPrefix = computeAllOptionalCharsRegExp(prefix);\n const digit = '\\\\d';\n const optionalMinus = isNegativeAllowed ? `[${CHAR_MINUS}${pseudoMinuses.map(x => `\\\\${x}`).join('')}]?` : '';\n const integerPart = thousandSeparator ? `[${digit}${escapeRegExp(thousandSeparator).replace(/\\s/g, '\\\\s')}]*` : `[${digit}]*`;\n const decimalPart = precision > 0 ? `([${escapeRegExp(decimalSeparator)}${decimalPseudoSeparators.map(escapeRegExp).join('')}]${digit}{0,${Number.isFinite(precision) ? precision : ''}})?` : '';\n const computedPostfix = computeAllOptionalCharsRegExp(postfix);\n return new RegExp(`^${computedPrefix}${optionalMinus}${integerPart}${decimalPart}${computedPostfix}$`);\n}\nfunction computeAllOptionalCharsRegExp(str) {\n return str ? `${str.split('').map(char => `${escapeRegExp(char)}?`).join('')}` : '';\n}\nfunction maskitoParseNumber(maskedNumber, decimalSeparator = '.') {\n const hasNegativeSign = !!maskedNumber.match(new RegExp(`^\\\\D*[${CHAR_MINUS}\\\\${CHAR_HYPHEN}${CHAR_EN_DASH}${CHAR_EM_DASH}]`));\n const unmaskedNumber = maskedNumber.replace(new RegExp(`[^\\\\d${escapeRegExp(decimalSeparator)}]`, 'g'), '').replace(decimalSeparator, '.');\n return unmaskedNumber ? Number((hasNegativeSign ? CHAR_HYPHEN : '') + unmaskedNumber) : NaN;\n}\n\n/**\r\n * Convert number to string with replacing exponent part on decimals\r\n *\r\n * @param value the number\r\n * @return string representation of a number\r\n */\nfunction stringifyNumberWithoutExp(value) {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split('e-');\n let valueWithoutExp = valueAsString;\n if (expPart) {\n const [, fractionalPart] = numberPart.split('.');\n const decimalDigits = Number(expPart) + ((fractionalPart === null || fractionalPart === void 0 ? void 0 : fractionalPart.length) || 0);\n valueWithoutExp = value.toFixed(decimalDigits);\n }\n return valueWithoutExp;\n}\nfunction validateDecimalPseudoSeparators({\n decimalSeparator,\n thousandSeparator,\n decimalPseudoSeparators = DEFAULT_DECIMAL_PSEUDO_SEPARATORS\n}) {\n return decimalPseudoSeparators.filter(char => char !== thousandSeparator && char !== decimalSeparator);\n}\n\n/**\r\n * If `decimalZeroPadding` is `true`, it pads decimal part with zeroes\r\n * (until number of digits after decimalSeparator is equal to the `precision`).\r\n * @example 1,42 => (`precision` is equal to 4) => 1,4200.\r\n */\n\nfunction createDecimalZeroPaddingPostprocessor({\n decimalSeparator,\n precision,\n decimalZeroPadding,\n postfix\n}) {\n if (precision <= 0 || !decimalZeroPadding) {\n return identity;\n }\n const trailingPostfixRegExp = new RegExp(`${escapeRegExp(postfix)}$`);\n return ({\n value,\n selection\n }) => {\n if (Number.isNaN(maskitoParseNumber(value, decimalSeparator))) {\n return {\n value,\n selection\n };\n }\n const [integerPart, decimalPart = ''] = value.replace(trailingPostfixRegExp, '').split(decimalSeparator);\n return {\n value: integerPart + decimalSeparator + decimalPart.padEnd(precision, '0') + postfix,\n selection\n };\n };\n}\n\n/**\r\n * This preprocessor works only once at initialization phase (when `new Maskito(...)` is executed).\r\n * This preprocessor helps to avoid conflicts during transition from one mask to another (for the same input).\r\n * For example, the developer changes postfix (or other mask's props) during run-time.\r\n * ```\r\n * let maskitoOptions = maskitoNumberOptionsGenerator({postfix: ' year'});\r\n * // [3 seconds later]\r\n * maskitoOptions = maskitoNumberOptionsGenerator({postfix: ' years'});\r\n * ```\r\n */\n\nfunction createInitializationOnlyPreprocessor({\n decimalSeparator,\n decimalPseudoSeparators,\n pseudoMinuses\n}) {\n let isInitializationPhase = true;\n const cleanNumberMask = generateMaskExpression({\n decimalSeparator,\n decimalPseudoSeparators,\n pseudoMinuses,\n prefix: '',\n postfix: '',\n thousandSeparator: '',\n precision: Infinity,\n isNegativeAllowed: true\n });\n return ({\n elementState,\n data\n }) => {\n if (!isInitializationPhase) {\n return {\n elementState,\n data\n };\n }\n isInitializationPhase = false;\n return {\n elementState: maskitoTransform(elementState, {\n mask: cleanNumberMask\n }),\n data\n };\n };\n}\n\n/**\r\n * It removes repeated leading zeroes for integer part.\r\n * @example 0,|00005 => Backspace => |5\r\n * @example -0,|00005 => Backspace => -|5\r\n * @example User types \"000000\" => 0|\r\n * @example 0| => User types \"5\" => 5|\r\n */\n\nfunction createLeadingZeroesValidationPostprocessor(decimalSeparator, thousandSeparator) {\n const trimLeadingZeroes = value => {\n const escapedThousandSeparator = escapeRegExp(thousandSeparator);\n return value.replace(\n // all leading zeroes followed by another zero\n new RegExp(`^(\\\\D+)?[0${escapedThousandSeparator}]+(?=0)`), '$1').replace(\n // zero followed by not-zero digit\n new RegExp(`^(\\\\D+)?[0${escapedThousandSeparator}]+(?=[1-9])`), '$1');\n };\n const countTrimmedZeroesBefore = (value, index) => {\n const valueBefore = value.slice(0, index);\n const followedByZero = value.slice(index).startsWith('0');\n return valueBefore.length - trimLeadingZeroes(valueBefore).length + (followedByZero ? 1 : 0);\n };\n return ({\n value,\n selection\n }) => {\n const [from, to] = selection;\n const hasDecimalSeparator = value.includes(decimalSeparator);\n const [integerPart, decimalPart = ''] = value.split(decimalSeparator);\n const zeroTrimmedIntegerPart = trimLeadingZeroes(integerPart);\n if (integerPart === zeroTrimmedIntegerPart) {\n return {\n value,\n selection\n };\n }\n const newFrom = from - countTrimmedZeroesBefore(value, from);\n const newTo = to - countTrimmedZeroesBefore(value, to);\n return {\n value: zeroTrimmedIntegerPart + (hasDecimalSeparator ? decimalSeparator : '') + decimalPart,\n selection: [Math.max(newFrom, 0), Math.max(newTo, 0)]\n };\n };\n}\n\n/**\r\n * This postprocessor is connected with {@link createMinMaxPlugin}:\r\n * both validate `min`/`max` bounds of entered value (but at the different point of time).\r\n */\n\nfunction createMinMaxPostprocessor({\n min,\n max,\n decimalSeparator\n}) {\n return ({\n value,\n selection\n }) => {\n const parsedNumber = maskitoParseNumber(value, decimalSeparator);\n const limitedValue =\n /**\r\n * We cannot limit lower bound if user enters positive number.\r\n * The same for upper bound and negative number.\r\n * ___\r\n * @example (min = 5)\r\n * Empty input => Without this condition user cannot type 42 (the first digit will be rejected)\r\n * ___\r\n * @example (max = -10)\r\n * Value is -10 => Without this condition user cannot delete 0 to enter another digit\r\n */\n parsedNumber > 0 ? Math.min(parsedNumber, max) : Math.max(parsedNumber, min);\n if (!Number.isNaN(parsedNumber) && limitedValue !== parsedNumber) {\n const newValue = `${limitedValue}`.replace('.', decimalSeparator).replace(CHAR_HYPHEN, CHAR_MINUS);\n return {\n value: newValue,\n selection: [newValue.length, newValue.length]\n };\n }\n return {\n value,\n selection\n };\n };\n}\n\n/**\r\n * Manage caret-navigation when user \"deletes\" non-removable digits or separators\r\n * @example 1,|42 => Backspace => 1|,42 (only if `decimalZeroPadding` is `true`)\r\n * @example 1|,42 => Delete => 1,|42 (only if `decimalZeroPadding` is `true`)\r\n * @example 0,|00 => Delete => 0,0|0 (only if `decimalZeroPadding` is `true`)\r\n * @example 1 |000 => Backspace => 1| 000 (always)\r\n */\nfunction createNonRemovableCharsDeletionPreprocessor({\n decimalSeparator,\n thousandSeparator,\n decimalZeroPadding\n}) {\n return ({\n elementState,\n data\n }, actionType) => {\n const {\n value,\n selection\n } = elementState;\n const [from, to] = selection;\n const selectedCharacters = value.slice(from, to);\n const nonRemovableSeparators = decimalZeroPadding ? [decimalSeparator, thousandSeparator] : [thousandSeparator];\n const areNonRemovableZeroesSelected = decimalZeroPadding && from > value.indexOf(decimalSeparator) && Boolean(selectedCharacters.match(/^0+$/gi));\n if (actionType !== 'deleteBackward' && actionType !== 'deleteForward' || !nonRemovableSeparators.includes(selectedCharacters) && !areNonRemovableZeroesSelected) {\n return {\n elementState,\n data\n };\n }\n return {\n elementState: {\n value,\n selection: actionType === 'deleteForward' ? [to, to] : [from, from]\n },\n data\n };\n };\n}\n\n/**\r\n * It pads integer part with zero if user types decimal separator (for empty input).\r\n * @example Empty input => User types \",\" (decimal separator) => 0,|\r\n */\n\nfunction createNotEmptyIntegerPartPreprocessor({\n decimalSeparator,\n precision\n}) {\n const startWithDecimalSepRegExp = new RegExp(`^\\\\D*${escapeRegExp(decimalSeparator)}`);\n return ({\n elementState,\n data\n }) => {\n const {\n value,\n selection\n } = elementState;\n const [from] = selection;\n if (precision <= 0 || value.includes(decimalSeparator) || !data.match(startWithDecimalSepRegExp)) {\n return {\n elementState,\n data\n };\n }\n const digitsBeforeCursor = value.slice(0, from).match(/\\d+/);\n return {\n elementState,\n data: digitsBeforeCursor ? data : `0${data}`\n };\n };\n}\n\n/**\r\n * It replaces pseudo characters with valid one.\r\n * @example User types '.' (but separator is equal to comma) => dot is replaced with comma.\r\n * @example User types hyphen / en-dash / em-dash => it is replaced with minus.\r\n */\nfunction createPseudoCharactersPreprocessor(validCharacter, pseudoCharacters) {\n const pseudoCharactersRegExp = new RegExp(`[${pseudoCharacters.join('')}]`, 'gi');\n return ({\n elementState,\n data\n }) => {\n const {\n value,\n selection\n } = elementState;\n return {\n elementState: {\n selection,\n value: value.replace(pseudoCharactersRegExp, validCharacter)\n },\n data: data.replace(pseudoCharactersRegExp, validCharacter)\n };\n };\n}\n\n/**\r\n * It rejects new typed decimal separator if it already exists in text field.\r\n * Behaviour is similar to native (Chrome).\r\n * @example 1|23,45 => Press comma (decimal separator) => 1|23,45 (do nothing).\r\n */\n\nfunction createRepeatedDecimalSeparatorPreprocessor(decimalSeparator) {\n return ({\n elementState,\n data\n }) => {\n const {\n value,\n selection\n } = elementState;\n const [from, to] = selection;\n return {\n elementState,\n data: !value.includes(decimalSeparator) || value.slice(from, to + 1).includes(decimalSeparator) ? data : data.replace(new RegExp(escapeRegExp(decimalSeparator), 'gi'), '')\n };\n };\n}\n\n/**\r\n * It adds symbol for separating thousands.\r\n * @example 1000000 => (thousandSeparator is equal to space) => 1 000 000.\r\n */\n\nfunction createThousandSeparatorPostprocessor({\n thousandSeparator,\n decimalSeparator,\n prefix,\n postfix\n}) {\n if (!thousandSeparator) {\n return identity;\n }\n const prefixReg = new RegExp(`^${escapeRegExp(prefix)}${CHAR_MINUS}?`);\n const postfixReg = new RegExp(`${escapeRegExp(postfix)}$`);\n const isAllSpaces = (...chars) => chars.every(x => /\\s/.test(x));\n return ({\n value,\n selection\n }) => {\n const [integerPart, decimalPart = ''] = value.split(decimalSeparator);\n const [initialFrom, initialTo] = selection;\n let [from, to] = selection;\n const cleanIntegerPart = integerPart.replace(prefixReg, '').replace(postfixReg, '');\n const [integerPartPrefix = ''] = integerPart.match(prefixReg) || [];\n const [integerPartPostfix = ''] = integerPart.match(postfixReg) || [];\n const processedIntegerPart = Array.from(cleanIntegerPart).reduceRight((formattedValuePart, char, i) => {\n const isLeadingThousandSeparator = !i && char === thousandSeparator;\n const isPositionForSeparator = !isLeadingThousandSeparator && formattedValuePart.length && (formattedValuePart.length + 1) % 4 === 0;\n if (isPositionForSeparator && (char === thousandSeparator || isAllSpaces(char, thousandSeparator))) {\n return thousandSeparator + formattedValuePart;\n }\n if (char === thousandSeparator && !isPositionForSeparator) {\n if (i && i <= initialFrom) {\n from--;\n }\n if (i && i <= initialTo) {\n to--;\n }\n return formattedValuePart;\n }\n if (!isPositionForSeparator) {\n return char + formattedValuePart;\n }\n if (i <= initialFrom) {\n from++;\n }\n if (i <= initialTo) {\n to++;\n }\n return char + thousandSeparator + formattedValuePart;\n }, '');\n return {\n value: integerPartPrefix + processedIntegerPart + integerPartPostfix + (value.includes(decimalSeparator) ? decimalSeparator : '') + decimalPart,\n selection: [from, to]\n };\n };\n}\n\n/**\r\n * It drops decimal part if precision is zero.\r\n * @example User pastes '123.45' (but precision is zero) => 123\r\n */\n\nfunction createZeroPrecisionPreprocessor(precision, decimalSeparator) {\n if (precision > 0) {\n return identity;\n }\n const decimalPartRegExp = new RegExp(`${escapeRegExp(decimalSeparator)}.*$`, 'g');\n return ({\n elementState,\n data\n }) => {\n const {\n value,\n selection\n } = elementState;\n const [from, to] = selection;\n const newValue = value.replace(decimalPartRegExp, '');\n return {\n elementState: {\n selection: [Math.min(from, newValue.length), Math.min(to, newValue.length)],\n value: newValue\n },\n data: data.replace(decimalPartRegExp, '')\n };\n };\n}\nconst DUMMY_SELECTION = [0, 0];\n/**\r\n * It removes repeated leading zeroes for integer part on blur-event.\r\n * @example 000000 => blur => 0\r\n * @example 00005 => blur => 5\r\n */\n\nfunction createLeadingZeroesValidationPlugin(decimalSeparator, thousandSeparator) {\n const dropRepeatedLeadingZeroes = createLeadingZeroesValidationPostprocessor(decimalSeparator, thousandSeparator);\n return maskitoEventHandler('blur', element => {\n const newValue = dropRepeatedLeadingZeroes({\n value: element.value,\n selection: DUMMY_SELECTION\n }, {\n value: '',\n selection: DUMMY_SELECTION\n }).value;\n if (element.value !== newValue) {\n element.value = newValue;\n element.dispatchEvent(new Event('input'));\n }\n }, {\n capture: true\n });\n}\n\n/**\r\n * This plugin is connected with {@link createMinMaxPostprocessor}:\r\n * both validate `min`/`max` bounds of entered value (but at the different point of time).\r\n */\n\nfunction createMinMaxPlugin({\n min,\n max,\n decimalSeparator\n}) {\n return maskitoEventHandler('blur', (element, options) => {\n const parsedNumber = maskitoParseNumber(element.value, decimalSeparator);\n const clampedNumber = clamp(parsedNumber, min, max);\n if (!Number.isNaN(parsedNumber) && parsedNumber !== clampedNumber) {\n element.value = maskitoTransform(stringifyNumberWithoutExp(clampedNumber), options);\n element.dispatchEvent(new Event('input'));\n }\n }, {\n capture: true\n });\n}\n\n/**\r\n * It pads EMPTY integer part with zero if decimal parts exists.\r\n * It works on blur event only!\r\n * @example 1|,23 => Backspace => Blur => 0,23\r\n */\n\nfunction createNotEmptyIntegerPlugin(decimalSeparator) {\n return maskitoEventHandler('blur', element => {\n const newValue = element.value.replace(new RegExp(`^(\\\\D+)?${escapeRegExp(decimalSeparator)}`), `$10${decimalSeparator}`);\n if (newValue !== element.value) {\n element.value = newValue;\n element.dispatchEvent(new Event('input'));\n }\n }, {\n capture: true\n });\n}\nfunction maskitoNumberOptionsGenerator({\n max = Number.MAX_SAFE_INTEGER,\n min = Number.MIN_SAFE_INTEGER,\n precision = 0,\n thousandSeparator = CHAR_NO_BREAK_SPACE,\n decimalSeparator = '.',\n decimalPseudoSeparators,\n decimalZeroPadding = false,\n prefix = '',\n postfix = ''\n} = {}) {\n const pseudoMinuses = [CHAR_HYPHEN, CHAR_EN_DASH, CHAR_EM_DASH].filter(char => char !== thousandSeparator && char !== decimalSeparator);\n const validatedDecimalPseudoSeparators = validateDecimalPseudoSeparators({\n decimalSeparator,\n thousandSeparator,\n decimalPseudoSeparators\n });\n return Object.assign(Object.assign({}, MASKITO_DEFAULT_OPTIONS), {\n mask: generateMaskExpression({\n decimalSeparator,\n precision,\n thousandSeparator,\n prefix,\n postfix,\n isNegativeAllowed: min < 0\n }),\n preprocessors: [createInitializationOnlyPreprocessor({\n decimalSeparator,\n decimalPseudoSeparators: validatedDecimalPseudoSeparators,\n pseudoMinuses\n }), createPseudoCharactersPreprocessor(CHAR_MINUS, pseudoMinuses), createPseudoCharactersPreprocessor(decimalSeparator, validatedDecimalPseudoSeparators), createNotEmptyIntegerPartPreprocessor({\n decimalSeparator,\n precision\n }), createNonRemovableCharsDeletionPreprocessor({\n decimalSeparator,\n decimalZeroPadding,\n thousandSeparator\n }), createZeroPrecisionPreprocessor(precision, decimalSeparator), createRepeatedDecimalSeparatorPreprocessor(decimalSeparator)],\n postprocessors: [createMinMaxPostprocessor({\n decimalSeparator,\n min,\n max\n }), maskitoPrefixPostprocessorGenerator(prefix), maskitoPostfixPostprocessorGenerator(postfix), createThousandSeparatorPostprocessor({\n decimalSeparator,\n thousandSeparator,\n prefix,\n postfix\n }), createDecimalZeroPaddingPostprocessor({\n decimalSeparator,\n decimalZeroPadding,\n precision,\n postfix\n })],\n plugins: [createLeadingZeroesValidationPlugin(decimalSeparator, thousandSeparator), createNotEmptyIntegerPlugin(decimalSeparator), createMinMaxPlugin({\n min,\n max,\n decimalSeparator\n })],\n overwriteMode: decimalZeroPadding ? ({\n value,\n selection: [from]\n }) => from <= value.indexOf(decimalSeparator) ? 'shift' : 'replace' : 'shift'\n });\n}\nfunction createMaxValidationPreprocessor(timeSegmentMaxValues) {\n const paddedMaxValues = padTimeSegments(timeSegmentMaxValues);\n const invalidCharsRegExp = new RegExp(`[^\\\\d${TIME_FIXED_CHARACTERS.map(escapeRegExp).join('')}]+`);\n return ({\n elementState,\n data\n }, actionType) => {\n if (actionType === 'deleteBackward' || actionType === 'deleteForward') {\n return {\n elementState,\n data\n };\n }\n const {\n value,\n selection\n } = elementState;\n if (actionType === 'validation') {\n const {\n validatedTimeString,\n updatedTimeSelection\n } = validateTimeString({\n timeString: value,\n paddedMaxValues,\n offset: 0,\n selection\n });\n return {\n elementState: {\n value: validatedTimeString,\n selection: updatedTimeSelection\n },\n data\n };\n }\n const newCharacters = data.replace(invalidCharsRegExp, '');\n const [from, rawTo] = selection;\n let to = rawTo + newCharacters.length; // to be conformed with `overwriteMode: replace`\n\n const newPossibleValue = value.slice(0, from) + newCharacters + value.slice(to);\n const {\n validatedTimeString,\n updatedTimeSelection\n } = validateTimeString({\n timeString: newPossibleValue,\n paddedMaxValues,\n offset: 0,\n selection: [from, to]\n });\n if (newPossibleValue && !validatedTimeString) {\n return {\n elementState,\n data: ''\n }; // prevent changes\n }\n\n to = updatedTimeSelection[1];\n const newData = validatedTimeString.slice(from, to);\n return {\n elementState: {\n selection,\n value: validatedTimeString.slice(0, from) + '0'.repeat(newData.length) + validatedTimeString.slice(to)\n },\n data: newData\n };\n };\n}\nfunction maskitoTimeOptionsGenerator({\n mode,\n timeSegmentMaxValues = {}\n}) {\n const enrichedTimeSegmentMaxValues = Object.assign(Object.assign({}, DEFAULT_TIME_SEGMENT_MAX_VALUES), timeSegmentMaxValues);\n return Object.assign(Object.assign({}, MASKITO_DEFAULT_OPTIONS), {\n mask: Array.from(mode).map(char => TIME_FIXED_CHARACTERS.includes(char) ? char : /\\d/),\n preprocessors: [createZeroPlaceholdersPreprocessor(), createMaxValidationPreprocessor(enrichedTimeSegmentMaxValues)],\n overwriteMode: 'replace'\n });\n}\nexport { maskitoAddOnFocusPlugin, maskitoCaretGuard, maskitoDateOptionsGenerator, maskitoDateRangeOptionsGenerator, maskitoDateTimeOptionsGenerator, maskitoEventHandler, maskitoNumberOptionsGenerator, maskitoParseNumber, maskitoPostfixPostprocessorGenerator, maskitoPrefixPostprocessorGenerator, maskitoRejectEvent, maskitoRemoveOnBlurPlugin, maskitoTimeOptionsGenerator, maskitoWithPlaceholder };","import * as i0 from '@angular/core';\nimport { Directive, Input, NgZone, ElementRef, Inject, Pipe, NgModule } from '@angular/core';\nimport * as i1 from '@angular/forms';\nimport { DefaultValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MASKITO_DEFAULT_OPTIONS, maskitoTransform, MASKITO_DEFAULT_ELEMENT_PREDICATE, Maskito } from '@maskito/core';\nimport { __awaiter } from 'tslib';\nlet MaskitoCva = /*#__PURE__*/(() => {\n class MaskitoCva {\n constructor(accessor) {\n this.accessor = accessor;\n this.maskito = MASKITO_DEFAULT_OPTIONS;\n const original = accessor.writeValue.bind(accessor);\n accessor.writeValue = value => {\n var _a;\n original(maskitoTransform(String(value !== null && value !== void 0 ? value : ''), (_a = this.maskito) !== null && _a !== void 0 ? _a : MASKITO_DEFAULT_OPTIONS));\n };\n }\n }\n MaskitoCva.ɵfac = function MaskitoCva_Factory(t) {\n return new (t || MaskitoCva)(i0.ɵɵdirectiveInject(i1.DefaultValueAccessor));\n };\n MaskitoCva.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MaskitoCva,\n selectors: [[\"input\", \"maskito\", \"\"], [\"textarea\", \"maskito\", \"\"]],\n hostBindings: function MaskitoCva_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"input\", function MaskitoCva_input_HostBindingHandler($event) {\n return ctx.accessor._handleInput($event.target.value);\n })(\"blur\", function MaskitoCva_blur_HostBindingHandler() {\n return ctx.accessor.onTouched();\n })(\"compositionstart\", function MaskitoCva_compositionstart_HostBindingHandler() {\n return ctx.accessor._compositionStart();\n })(\"compositionend\", function MaskitoCva_compositionend_HostBindingHandler($event) {\n return ctx.accessor._compositionEnd($event.target.value);\n });\n }\n },\n inputs: {\n maskito: \"maskito\"\n },\n features: [i0.ɵɵProvidersFeature([DefaultValueAccessor, {\n provide: NG_VALUE_ACCESSOR,\n multi: true,\n useExisting: DefaultValueAccessor\n }])]\n });\n return MaskitoCva;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MaskitoDirective = /*#__PURE__*/(() => {\n class MaskitoDirective {\n constructor(ngZone, elementRef) {\n this.ngZone = ngZone;\n this.elementRef = elementRef;\n this.maskedElement = null;\n this.maskito = MASKITO_DEFAULT_OPTIONS;\n this.maskitoElement = MASKITO_DEFAULT_ELEMENT_PREDICATE;\n }\n ngOnChanges() {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n (_a = this.maskedElement) === null || _a === void 0 ? void 0 : _a.destroy();\n const predicate = this.maskitoElement;\n const predicateResult = yield predicate(this.elementRef.nativeElement);\n if (this.maskitoElement !== predicate) {\n // Ignore the result of the predicate if the\n // maskito element has changed before the predicate was resolved.\n return;\n }\n this.ngZone.runOutsideAngular(() => {\n var _a;\n this.maskedElement = new Maskito(predicateResult, (_a = this.maskito) !== null && _a !== void 0 ? _a : MASKITO_DEFAULT_OPTIONS);\n });\n });\n }\n ngOnDestroy() {\n var _a;\n (_a = this.maskedElement) === null || _a === void 0 ? void 0 : _a.destroy();\n }\n }\n MaskitoDirective.ɵfac = function MaskitoDirective_Factory(t) {\n return new (t || MaskitoDirective)(i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(ElementRef));\n };\n MaskitoDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MaskitoDirective,\n selectors: [[\"\", \"maskito\", \"\"]],\n inputs: {\n maskito: \"maskito\",\n maskitoElement: \"maskitoElement\"\n },\n features: [i0.ɵɵNgOnChangesFeature]\n });\n return MaskitoDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MaskitoPipe = /*#__PURE__*/(() => {\n class MaskitoPipe {\n transform(value, maskitoOptions) {\n return maskitoTransform(String(value !== null && value !== void 0 ? value : ''), maskitoOptions !== null && maskitoOptions !== void 0 ? maskitoOptions : MASKITO_DEFAULT_OPTIONS);\n }\n }\n MaskitoPipe.ɵfac = function MaskitoPipe_Factory(t) {\n return new (t || MaskitoPipe)();\n };\n MaskitoPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"maskito\",\n type: MaskitoPipe,\n pure: true\n });\n return MaskitoPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MaskitoModule = /*#__PURE__*/(() => {\n class MaskitoModule {}\n MaskitoModule.ɵfac = function MaskitoModule_Factory(t) {\n return new (t || MaskitoModule)();\n };\n MaskitoModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MaskitoModule\n });\n MaskitoModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return MaskitoModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MaskitoCva, MaskitoDirective, MaskitoModule, MaskitoPipe };\n","import { __decorate } from 'tslib';\nimport * as i0 from '@angular/core';\nimport { Directive, Inject, ChangeDetectorRef, Injector, Component, ChangeDetectionStrategy, Optional, Self, ViewChild, Input, HostBinding, HostListener, NgModule } from '@angular/core';\nimport * as i8 from '@angular/forms';\nimport { NgControl } from '@angular/forms';\nimport { MASKITO_DEFAULT_OPTIONS } from '@maskito/core';\nimport { maskitoDateOptionsGenerator } from '@maskito/kit';\nimport * as i2 from '@taiga-ui/cdk';\nimport { DATE_FILLER_LENGTH, TuiDay, TUI_DATE_FORMAT, AbstractTuiNullableControl, ALWAYS_FALSE_HANDLER, TuiMonth, changeDateSeparator, tuiDateClamp, tuiNullableSame, TUI_IS_MOBILE, TUI_DATE_SEPARATOR, tuiAsFocusableItemAccessor, tuiAsControl, tuiPure, TuiPreventDefaultModule, TuiLetModule } from '@taiga-ui/cdk';\nimport * as i1 from '@taiga-ui/core';\nimport { TUI_TEXTFIELD_HOST, TUI_DEFAULT_MARKER_HANDLER, TuiDialogService, TUI_TEXTFIELD_SIZE, TuiPrimitiveTextfieldComponent, AbstractTuiTextfieldHost, tuiAsTextfieldHost, TuiWrapperModule, TuiCalendarModule, TuiSvgModule, TuiLinkModule, TuiHostedDropdownModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiTextfieldComponent } from '@taiga-ui/core';\nimport { TUI_DATE_MODE_MASKITO_ADAPTER } from '@taiga-ui/kit/constants';\nimport { TUI_MOBILE_CALENDAR, TUI_DATE_TEXTS, TUI_DATE_VALUE_TRANSFORMER, TUI_INPUT_DATE_OPTIONS, tuiDateStreamWithTransformer } from '@taiga-ui/kit/tokens';\nimport * as i5 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport { map, takeUntil } from 'rxjs/operators';\nimport * as i3 from '@taiga-ui/kit/directives';\nimport { TuiValueAccessorModule } from '@taiga-ui/kit/directives';\nimport * as i4 from '@maskito/angular';\nimport { MaskitoModule } from '@maskito/angular';\nimport * as i6 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i9 from 'rxjs';\nfunction TuiInputDateComponent_tui_primitive_textfield_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-primitive-textfield\", 5);\n i0.ɵɵlistener(\"focusedChange\", function TuiInputDateComponent_tui_primitive_textfield_1_Template_tui_primitive_textfield_focusedChange_0_listener($event) {\n i0.ɵɵrestoreView(_r7);\n const ctx_r6 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r6.onFocused($event));\n })(\"valueChange\", function TuiInputDateComponent_tui_primitive_textfield_1_Template_tui_primitive_textfield_valueChange_0_listener($event) {\n i0.ɵɵrestoreView(_r7);\n const ctx_r8 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r8.onValueChange($event));\n });\n i0.ɵɵprojection(1);\n i0.ɵɵprojection(2, 1, [\"ngProjectAs\", \"input\", 5, [\"input\"]]);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const filler_r5 = ctx.tuiLet;\n const ctx_r0 = i0.ɵɵnextContext();\n const _r2 = i0.ɵɵreference(4);\n i0.ɵɵproperty(\"disabled\", ctx_r0.computedDisabled)(\"focusable\", ctx_r0.computedFocusable)(\"invalid\", ctx_r0.computedInvalid)(\"maskito\", ctx_r0.computedMask)(\"nativeId\", ctx_r0.nativeId)(\"pseudoFocus\", ctx_r0.pseudoFocus)(\"pseudoHover\", ctx_r0.pseudoHover)(\"readOnly\", ctx_r0.readOnly)(\"tuiTextfieldFiller\", ctx_r0.getComputedFiller(filler_r5 || \"\"))(\"tuiTextfieldIcon\", ctx_r0.calendarIcon && _r2)(\"value\", ctx_r0.computedValue);\n }\n}\nfunction TuiInputDateComponent_ng_template_3_tui_svg_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r13 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-svg\", 8);\n i0.ɵɵlistener(\"click\", function TuiInputDateComponent_ng_template_3_tui_svg_0_Template_tui_svg_click_0_listener() {\n i0.ɵɵrestoreView(_r13);\n const ctx_r12 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r12.onIconClick());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const src_r11 = ctx.polymorpheusOutlet;\n const ctx_r9 = i0.ɵɵnextContext(2);\n i0.ɵɵclassProp(\"t-icon\", !ctx_r9.computedDisabled);\n i0.ɵɵproperty(\"src\", src_r11);\n }\n}\nfunction TuiInputDateComponent_ng_template_3_input_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"input\", 9);\n }\n}\nconst _c0 = a0 => ({\n $implicit: a0\n});\nfunction TuiInputDateComponent_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiInputDateComponent_ng_template_3_tui_svg_0_Template, 1, 3, \"tui-svg\", 6)(1, TuiInputDateComponent_ng_template_3_input_1_Template, 1, 0, \"input\", 7);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.calendarIcon)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(3, _c0, ctx_r1.size));\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isMobile && ctx_r1.nativePicker);\n }\n}\nfunction TuiInputDateComponent_ng_template_5_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r16 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 12)(1, \"button\", 13);\n i0.ɵɵlistener(\"click\", function TuiInputDateComponent_ng_template_5_div_1_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r16);\n const ctx_r15 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r15.onDayClick(ctx_r15.items[0].day));\n });\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r14 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", ctx_r14.items[0], \" \");\n }\n}\nfunction TuiInputDateComponent_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r18 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-calendar\", 10);\n i0.ɵɵlistener(\"dayClick\", function TuiInputDateComponent_ng_template_5_Template_tui_calendar_dayClick_0_listener($event) {\n i0.ɵɵrestoreView(_r18);\n const ctx_r17 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r17.onDayClick($event));\n })(\"monthChange\", function TuiInputDateComponent_ng_template_5_Template_tui_calendar_monthChange_0_listener($event) {\n i0.ɵɵrestoreView(_r18);\n const ctx_r19 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r19.onMonthChange($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(1, TuiInputDateComponent_ng_template_5_div_1_Template, 3, 1, \"div\", 11);\n }\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"disabledItemHandler\", ctx_r3.disabledItemHandler)(\"markerHandler\", ctx_r3.markerHandler)(\"max\", ctx_r3.computedMax)(\"min\", ctx_r3.computedMin)(\"month\", ctx_r3.computedActiveYearMonth)(\"value\", ctx_r3.value);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx_r3.items.length === 1);\n }\n}\nconst _c1 = [\"*\", [[\"input\"]]];\nconst _c2 = [\"*\", \"input\"];\nlet TuiNativeDateDirective = /*#__PURE__*/(() => {\n class TuiNativeDateDirective {\n constructor(host, dateFormat) {\n this.host = host;\n this.dateFormat = dateFormat;\n }\n get value() {\n return this.host.value.length === DATE_FILLER_LENGTH ? TuiDay.normalizeParse(this.host.value, this.dateFormat).toString('YMD', '-') : '';\n }\n get max() {\n return this.host.max.toJSON();\n }\n get min() {\n return this.host.min.toJSON();\n }\n onChange(value) {\n this.host.onValueChange(value ? TuiDay.normalizeParse(value, 'YMD').toString(this.dateFormat) : '');\n }\n }\n TuiNativeDateDirective.ɵfac = function TuiNativeDateDirective_Factory(t) {\n return new (t || TuiNativeDateDirective)(i0.ɵɵdirectiveInject(TUI_TEXTFIELD_HOST), i0.ɵɵdirectiveInject(TUI_DATE_FORMAT));\n };\n TuiNativeDateDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiNativeDateDirective,\n selectors: [[\"input\", \"tuiDate\", \"\"]],\n hostAttrs: [\"type\", \"date\"],\n hostVars: 4,\n hostBindings: function TuiNativeDateDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"change\", function TuiNativeDateDirective_change_HostBindingHandler($event) {\n return ctx.onChange($event.target.value);\n })(\"click.stop.silent\", function TuiNativeDateDirective_click_stop_silent_HostBindingHandler() {\n return 0;\n })(\"input.stop.silent\", function TuiNativeDateDirective_input_stop_silent_HostBindingHandler() {\n return 0;\n })(\"mousedown.stop.silent\", function TuiNativeDateDirective_mousedown_stop_silent_HostBindingHandler() {\n return 0;\n });\n }\n if (rf & 2) {\n i0.ɵɵhostProperty(\"tabIndex\", -1)(\"value\", ctx.value)(\"max\", ctx.max)(\"min\", ctx.min);\n }\n }\n });\n return TuiNativeDateDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiInputDateComponent = /*#__PURE__*/(() => {\n class TuiInputDateComponent extends AbstractTuiNullableControl {\n constructor(control, cdr, injector, isMobile, dialogs, mobileCalendar, dateFormat, dateSeparator, dateTexts$, valueTransformer, options, textfieldSize) {\n super(control, cdr, valueTransformer);\n this.injector = injector;\n this.isMobile = isMobile;\n this.dialogs = dialogs;\n this.mobileCalendar = mobileCalendar;\n this.dateFormat = dateFormat;\n this.dateSeparator = dateSeparator;\n this.dateTexts$ = dateTexts$;\n this.valueTransformer = valueTransformer;\n this.options = options;\n this.textfieldSize = textfieldSize;\n this.month = null;\n this.min = this.options.min;\n this.max = this.options.max;\n this.disabledItemHandler = ALWAYS_FALSE_HANDLER;\n this.markerHandler = TUI_DEFAULT_MARKER_HANDLER;\n this.items = [];\n this.defaultActiveYearMonth = TuiMonth.currentLocal();\n this.open = false;\n this.filler$ = this.dateTexts$.pipe(map(dateTexts => changeDateSeparator(dateTexts[this.dateFormat], this.dateSeparator)));\n }\n get size() {\n return this.textfieldSize.size;\n }\n get computedMin() {\n var _a;\n return (_a = this.min) !== null && _a !== void 0 ? _a : this.options.min;\n }\n get computedMax() {\n var _a;\n return (_a = this.max) !== null && _a !== void 0 ? _a : this.options.max;\n }\n get nativeFocusableElement() {\n var _a, _b;\n return (_b = (_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) !== null && _b !== void 0 ? _b : null;\n }\n get focused() {\n var _a;\n return !!((_a = this.textfield) === null || _a === void 0 ? void 0 : _a.focused);\n }\n get computedMobile() {\n return this.isMobile && (!!this.mobileCalendar || this.nativePicker);\n }\n get nativePicker() {\n return this.options.nativePicker;\n }\n get calendarIcon() {\n return this.options.icon;\n }\n get computedValue() {\n const {\n value,\n nativeValue,\n activeItem\n } = this;\n if (activeItem) {\n return String(activeItem);\n }\n return value ? value.toString(this.dateFormat, this.dateSeparator) : nativeValue;\n }\n get computedActiveYearMonth() {\n if (this.items[0] && this.value && this.value.daySame(this.items[0].day)) {\n return this.items[0].displayDay;\n }\n return this.month || this.value || tuiDateClamp(this.defaultActiveYearMonth, this.computedMin, this.computedMax);\n }\n get nativeValue() {\n var _a;\n return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.value) || '';\n }\n set nativeValue(value) {\n if (!this.nativeFocusableElement) {\n return;\n }\n this.nativeFocusableElement.value = value;\n }\n get canOpen() {\n return this.interactive && !this.computedMobile;\n }\n get computedMask() {\n return this.activeItem ? MASKITO_DEFAULT_OPTIONS : this.computeMaskOptions(this.dateFormat, this.dateSeparator, this.computedMin, this.computedMax);\n }\n get activeItem() {\n const {\n value\n } = this;\n return value && this.items.find(item => item.day.daySame(value)) || null;\n }\n onClick() {\n if (!this.isMobile) {\n this.open = !this.open;\n }\n }\n getComputedFiller(filler) {\n return this.activeItem ? '' : filler;\n }\n // noinspection JSUnusedGlobalSymbols\n /**\n * TODO: Remove in 4.0\n * @deprecated: use {@link onIconClick} instead\n */\n onMobileClick() {\n this.onIconClick();\n }\n onIconClick() {\n if (!this.computedMobile || !this.mobileCalendar) {\n return;\n }\n this.dialogs.open(new PolymorpheusComponent(this.mobileCalendar, this.injector), {\n size: 'fullscreen',\n closeable: false,\n data: {\n single: true,\n min: this.min,\n max: this.max,\n disabledItemHandler: this.disabledItemHandler\n }\n }).pipe(takeUntil(this.destroy$)).subscribe(value => {\n this.value = value;\n });\n }\n onValueChange(value) {\n if (this.control) {\n this.control.updateValueAndValidity({\n emitEvent: false\n });\n }\n if (!value) {\n this.onOpenChange(true);\n }\n this.value = value.length !== DATE_FILLER_LENGTH ? null : TuiDay.normalizeParse(value, this.dateFormat);\n }\n onDayClick(value) {\n this.value = value;\n this.open = false;\n }\n onMonthChange(month) {\n this.month = month;\n }\n onOpenChange(open) {\n this.open = open;\n }\n onFocused(focused) {\n this.updateFocused(focused);\n }\n setDisabledState() {\n super.setDisabledState();\n this.open = false;\n }\n writeValue(value) {\n super.writeValue(value);\n this.nativeValue = value ? this.computedValue : '';\n }\n valueIdenticalComparator(oldValue, newValue) {\n return tuiNullableSame(oldValue, newValue, (a, b) => a.daySame(b));\n }\n computeMaskOptions(mode, separator, min, max) {\n return maskitoDateOptionsGenerator({\n separator,\n mode: TUI_DATE_MODE_MASKITO_ADAPTER[mode],\n min: min.toLocalNativeDate(),\n max: max.toLocalNativeDate()\n });\n }\n }\n TuiInputDateComponent.ɵfac = function TuiInputDateComponent_Factory(t) {\n return new (t || TuiInputDateComponent)(i0.ɵɵdirectiveInject(NgControl, 10), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(Injector), i0.ɵɵdirectiveInject(TUI_IS_MOBILE), i0.ɵɵdirectiveInject(TuiDialogService), i0.ɵɵdirectiveInject(TUI_MOBILE_CALENDAR, 8), i0.ɵɵdirectiveInject(TUI_DATE_FORMAT), i0.ɵɵdirectiveInject(TUI_DATE_SEPARATOR), i0.ɵɵdirectiveInject(TUI_DATE_TEXTS), i0.ɵɵdirectiveInject(TUI_DATE_VALUE_TRANSFORMER, 8), i0.ɵɵdirectiveInject(TUI_INPUT_DATE_OPTIONS), i0.ɵɵdirectiveInject(TUI_TEXTFIELD_SIZE));\n };\n TuiInputDateComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiInputDateComponent,\n selectors: [[\"tui-input-date\"]],\n viewQuery: function TuiInputDateComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TuiPrimitiveTextfieldComponent, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.textfield = _t.first);\n }\n },\n hostVars: 1,\n hostBindings: function TuiInputDateComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function TuiInputDateComponent_click_HostBindingHandler() {\n return ctx.onClick();\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-size\", ctx.size);\n }\n },\n inputs: {\n min: \"min\",\n max: \"max\",\n disabledItemHandler: \"disabledItemHandler\",\n markerHandler: \"markerHandler\",\n items: \"items\",\n defaultActiveYearMonth: \"defaultActiveYearMonth\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiInputDateComponent), tuiAsControl(TuiInputDateComponent), tuiDateStreamWithTransformer(TUI_DATE_VALUE_TRANSFORMER)]), i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c2,\n decls: 7,\n vars: 7,\n consts: [[1, \"t-hosted\", 3, \"canOpen\", \"content\", \"open\", \"openChange\"], [\"automation-id\", \"tui-input-date-range__textfield\", \"tuiValueAccessor\", \"\", \"class\", \"t-textfield\", 3, \"disabled\", \"focusable\", \"invalid\", \"maskito\", \"nativeId\", \"pseudoFocus\", \"pseudoHover\", \"readOnly\", \"tuiTextfieldFiller\", \"tuiTextfieldIcon\", \"value\", \"focusedChange\", \"valueChange\", 4, \"tuiLet\"], [\"iconContent\", \"\"], [3, \"polymorpheus\"], [\"dropdown\", \"polymorpheus\"], [\"automation-id\", \"tui-input-date-range__textfield\", \"tuiValueAccessor\", \"\", 1, \"t-textfield\", 3, \"disabled\", \"focusable\", \"invalid\", \"maskito\", \"nativeId\", \"pseudoFocus\", \"pseudoHover\", \"readOnly\", \"tuiTextfieldFiller\", \"tuiTextfieldIcon\", \"value\", \"focusedChange\", \"valueChange\"], [\"appearance\", \"icon\", \"automation-id\", \"tui-input-date-range__icon\", \"tuiWrapper\", \"\", 3, \"t-icon\", \"src\", \"click\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [\"tuiDate\", \"\", \"class\", \"t-native-input\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"automation-id\", \"tui-input-date-range__icon\", \"tuiWrapper\", \"\", 3, \"src\", \"click\"], [\"tuiDate\", \"\", 1, \"t-native-input\"], [\"automation-id\", \"tui-input-date__calendar\", \"tuiPreventDefault\", \"mousedown\", 3, \"disabledItemHandler\", \"markerHandler\", \"max\", \"min\", \"month\", \"value\", \"dayClick\", \"monthChange\"], [\"tuiPreventDefault\", \"mousedown\", \"class\", \"t-button\", 4, \"ngIf\"], [\"tuiPreventDefault\", \"mousedown\", 1, \"t-button\"], [\"tuiLink\", \"\", \"type\", \"button\", 3, \"click\"]],\n template: function TuiInputDateComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c1);\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 0);\n i0.ɵɵlistener(\"openChange\", function TuiInputDateComponent_Template_tui_hosted_dropdown_openChange_0_listener($event) {\n return ctx.onOpenChange($event);\n });\n i0.ɵɵtemplate(1, TuiInputDateComponent_tui_primitive_textfield_1_Template, 3, 11, \"tui-primitive-textfield\", 1);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵtemplate(3, TuiInputDateComponent_ng_template_3_Template, 2, 5, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor)(5, TuiInputDateComponent_ng_template_5_Template, 2, 7, \"ng-template\", 3, 4, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const _r4 = i0.ɵɵreference(6);\n i0.ɵɵproperty(\"canOpen\", ctx.canOpen)(\"content\", _r4)(\"open\", ctx.open && ctx.canOpen);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(2, 5, ctx.filler$));\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"polymorpheus\", ctx.type);\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiPrimitiveTextfieldComponent, i1.TuiSvgComponent, i1.TuiCalendarComponent, i1.TuiLinkComponent, i2.TuiLetDirective, i1.TuiPrimitiveTextfieldDirective, i3.TuiValueAccessorDirective, i4.MaskitoDirective, i1.TuiTextfieldFillerDirective, i1.TuiTextfieldIconDirective, i5.PolymorpheusOutletDirective, i1.TuiWrapperDirective, i6.NgIf, TuiNativeDateDirective, i5.PolymorpheusTemplate, i2.TuiPreventDefaultDirective, i6.AsyncPipe],\n styles: [\"[_nghost-%COMP%]{display:block;border-radius:var(--tui-radius-m);text-align:left}.t-hosted[_ngcontent-%COMP%]{display:block;border-radius:inherit}.t-textfield[_ngcontent-%COMP%]{border-radius:inherit;text-align:inherit}.t-icon[_ngcontent-%COMP%]{pointer-events:auto}.t-button[_ngcontent-%COMP%]{display:flex;height:2.75rem;justify-content:center;box-shadow:inset 0 1px var(--tui-base-03)}.t-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1;text-align:center}.t-native-input[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;pointer-events:auto;font-size:2rem}\"],\n changeDetection: 0\n });\n __decorate([tuiPure], TuiInputDateComponent.prototype, \"computeMaskOptions\", null);\n return TuiInputDateComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiInputDateDirective = /*#__PURE__*/(() => {\n class TuiInputDateDirective extends AbstractTuiTextfieldHost {\n get value() {\n return this.host.computedValue;\n }\n get max() {\n return this.host.computedMax;\n }\n get min() {\n return this.host.computedMin;\n }\n onValueChange(value) {\n if (!value) {\n this.host.nativeValue = '';\n }\n this.host.onValueChange(value);\n }\n process(input) {\n input.inputMode = 'numeric';\n }\n }\n TuiInputDateDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiInputDateDirective_BaseFactory;\n return function TuiInputDateDirective_Factory(t) {\n return (ɵTuiInputDateDirective_BaseFactory || (ɵTuiInputDateDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiInputDateDirective)))(t || TuiInputDateDirective);\n };\n })();\n TuiInputDateDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiInputDateDirective,\n selectors: [[\"tui-input-date\"]],\n features: [i0.ɵɵProvidersFeature([tuiAsTextfieldHost(TuiInputDateDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiInputDateDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiInputDateModule = /*#__PURE__*/(() => {\n class TuiInputDateModule {}\n TuiInputDateModule.ɵfac = function TuiInputDateModule_Factory(t) {\n return new (t || TuiInputDateModule)();\n };\n TuiInputDateModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiInputDateModule\n });\n TuiInputDateModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, MaskitoModule, PolymorpheusModule, TuiWrapperModule, TuiPreventDefaultModule, TuiCalendarModule, TuiSvgModule, TuiLinkModule, TuiHostedDropdownModule, TuiPrimitiveTextfieldModule, TuiValueAccessorModule, TuiLetModule, TuiTextfieldControllerModule]]\n });\n return TuiInputDateModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiInputDateComponent, TuiInputDateDirective, TuiInputDateModule };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, ElementRef, Component, ChangeDetectionStrategy, Inject, Input, HostBinding, Output, ViewChild, HostListener, NgModule } from '@angular/core';\nimport * as i1 from '@taiga-ui/core';\nimport { tuiSizeBigger, TUI_MODE, TUI_COMMON_ICONS, MODE_PROVIDER, TuiSvgModule, TuiLoaderModule } from '@taiga-ui/core';\nimport { tuiStringHashToHsl } from '@taiga-ui/kit/utils/format';\nimport { tuiCreateToken, tuiProvideOptions } from '@taiga-ui/cdk';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport * as i4 from '@angular/forms';\nimport { FormsModule } from '@angular/forms';\nimport * as i5 from 'rxjs';\n\n/** Default values for the tag options. */\nconst _c0 = [\"input\"];\nfunction TuiTagComponent_div_1_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtext(1);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const text_r5 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", text_r5, \" \");\n }\n}\nfunction TuiTagComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵtemplate(1, TuiTagComponent_div_1_ng_container_1_Template, 2, 1, \"ng-container\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r0.leftContent);\n }\n}\nfunction TuiTagComponent_tui_loader_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-loader\", 8);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"inheritColor\", true)(\"size\", ctx_r1.loaderSize);\n }\n}\nfunction TuiTagComponent_tui_svg_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-svg\", 9);\n i0.ɵɵlistener(\"click\", function TuiTagComponent_tui_svg_4_Template_tui_svg_click_0_listener($event) {\n i0.ɵɵrestoreView(_r7);\n const ctx_r6 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r6.remove($event));\n })(\"mousedown.stop.prevent.silent\", function TuiTagComponent_tui_svg_4_Template_tui_svg_mousedown_stop_prevent_silent_0_listener() {\n return 0;\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"src\", ctx_r2.icons.close);\n }\n}\nfunction TuiTagComponent_input_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r11 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"input\", 10, 11);\n i0.ɵɵlistener(\"blur\", function TuiTagComponent_input_5_Template_input_blur_0_listener() {\n i0.ɵɵrestoreView(_r11);\n const ctx_r10 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r10.onBlur());\n })(\"keydown\", function TuiTagComponent_input_5_Template_input_keydown_0_listener($event) {\n i0.ɵɵrestoreView(_r11);\n const ctx_r12 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r12.onKeyDown($event));\n })(\"ngModelChange\", function TuiTagComponent_input_5_Template_input_ngModelChange_0_listener($event) {\n i0.ɵɵrestoreView(_r11);\n const ctx_r13 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r13.onInput($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngModel\", ctx_r3.editedText);\n i0.ɵɵattribute(\"maxLength\", ctx_r3.maxLength);\n }\n}\nconst TUI_TAG_DEFAULT_OPTIONS = {\n size: `m`,\n status: `default`,\n autoColor: false\n};\n/**\n * Default parameters for Tag component\n */\nconst TUI_TAG_OPTIONS = tuiCreateToken(TUI_TAG_DEFAULT_OPTIONS);\nfunction tuiTagOptionsProvider(options) {\n return tuiProvideOptions(TUI_TAG_OPTIONS, options, TUI_TAG_DEFAULT_OPTIONS);\n}\nlet TuiTagComponent = /*#__PURE__*/(() => {\n class TuiTagComponent {\n constructor(el, mode$, options, icons) {\n this.el = el;\n this.mode$ = mode$;\n this.options = options;\n this.icons = icons;\n // TODO: Possibly implement standard focus mechanisms and outline\n this.value = '';\n this.editable = false;\n this.separator = ',';\n this.maxLength = null;\n this.size = this.options.size;\n this.showLoader = false;\n this.status = this.options.status;\n this.hoverable = false;\n this.removable = false;\n this.disabled = false;\n this.autoColor = this.options.autoColor;\n this.edited = new EventEmitter();\n this.editing = false;\n this.editedText = null;\n }\n set input(input) {\n if (input) {\n input.nativeElement.focus();\n }\n }\n get backgroundColor() {\n return this.autoColor ? tuiStringHashToHsl(this.value) : null;\n }\n get canRemove() {\n return this.removable && !this.disabled && !this.showLoader;\n }\n get displayText() {\n return this.editedText === null ? this.value : this.editedText;\n }\n get loaderSize() {\n return tuiSizeBigger(this.size) ? 's' : 'xs';\n }\n edit(event) {\n if (!this.canEdit) {\n return;\n }\n event.preventDefault();\n this.editing = true;\n this.editedText = this.value;\n }\n remove(event) {\n if (!this.canRemove) {\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n this.edited.emit('');\n }\n onInput(value) {\n const newTags = value.split(this.separator);\n if (newTags.length > 1) {\n this.save(String(newTags));\n return;\n }\n this.editedText = value;\n }\n onKeyDown(event) {\n event.stopPropagation();\n switch (event.key.toLowerCase()) {\n case 'enter':\n event.preventDefault();\n this.save(this.editedText || '');\n break;\n case 'escape':\n case 'esc':\n event.preventDefault();\n this.stopEditing();\n this.el.nativeElement.focus();\n break;\n default:\n break;\n }\n }\n onBlur() {\n if (this.editedText !== null) {\n this.save(this.editedText);\n }\n }\n get canEdit() {\n return this.editable && !this.disabled && !this.showLoader;\n }\n stopEditing() {\n this.editing = false;\n this.editedText = null;\n }\n save(value) {\n this.stopEditing();\n this.edited.emit(value.trim());\n }\n }\n TuiTagComponent.ɵfac = function TuiTagComponent_Factory(t) {\n return new (t || TuiTagComponent)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_MODE), i0.ɵɵdirectiveInject(TUI_TAG_OPTIONS), i0.ɵɵdirectiveInject(TUI_COMMON_ICONS));\n };\n TuiTagComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTagComponent,\n selectors: [[\"tui-tag\"], [\"a\", \"tuiTag\", \"\"], [\"button\", \"tuiTag\", \"\"]],\n viewQuery: function TuiTagComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.input = _t.first);\n }\n },\n hostVars: 10,\n hostBindings: function TuiTagComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"$.data-mode.attr\", function TuiTagComponent___data_mode_attr_HostBindingHandler() {\n return ctx.mode$;\n })(\"keydown.enter\", function TuiTagComponent_keydown_enter_HostBindingHandler($event) {\n return ctx.edit($event);\n })(\"keydown.delete\", function TuiTagComponent_keydown_delete_HostBindingHandler($event) {\n return ctx.remove($event);\n })(\"keydown.backspace\", function TuiTagComponent_keydown_backspace_HostBindingHandler($event) {\n return ctx.remove($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-size\", ctx.size)(\"data-status\", ctx.status);\n i0.ɵɵclassProp(\"_hoverable\", ctx.hoverable)(\"_disabled\", ctx.disabled)(\"_autocolor\", ctx.autoColor)(\"_editing\", ctx.editing);\n }\n },\n inputs: {\n value: \"value\",\n editable: \"editable\",\n separator: \"separator\",\n maxLength: \"maxLength\",\n size: \"size\",\n showLoader: \"showLoader\",\n status: \"status\",\n hoverable: \"hoverable\",\n removable: \"removable\",\n disabled: \"disabled\",\n autoColor: \"autoColor\",\n leftContent: \"leftContent\"\n },\n outputs: {\n edited: \"edited\"\n },\n features: [i0.ɵɵProvidersFeature([MODE_PROVIDER])],\n decls: 6,\n vars: 7,\n consts: [[1, \"t-tag\", 3, \"dblclick\"], [\"class\", \"t-content\", 4, \"ngIf\"], [\"automation-id\", \"tui-tag__text\", 1, \"t-text\", 3, \"textContent\"], [\"class\", \"t-content\", 3, \"inheritColor\", \"size\", 4, \"ngIf\"], [\"automation-id\", \"tui-tag__remove\", \"class\", \"t-icon\", 3, \"src\", \"click\", \"mousedown.stop.prevent.silent\", 4, \"ngIf\"], [\"automation-id\", \"tui-tag__edit\", \"type\", \"text\", \"class\", \"t-edit\", 3, \"ngModel\", \"blur\", \"keydown\", \"ngModelChange\", 4, \"ngIf\"], [1, \"t-content\"], [4, \"polymorpheusOutlet\"], [1, \"t-content\", 3, \"inheritColor\", \"size\"], [\"automation-id\", \"tui-tag__remove\", 1, \"t-icon\", 3, \"src\", \"click\", \"mousedown.stop.prevent.silent\"], [\"automation-id\", \"tui-tag__edit\", \"type\", \"text\", 1, \"t-edit\", 3, \"ngModel\", \"blur\", \"keydown\", \"ngModelChange\"], [\"input\", \"\"]],\n template: function TuiTagComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵlistener(\"dblclick\", function TuiTagComponent_Template_div_dblclick_0_listener($event) {\n return ctx.edit($event);\n });\n i0.ɵɵtemplate(1, TuiTagComponent_div_1_Template, 2, 1, \"div\", 1);\n i0.ɵɵelement(2, \"span\", 2);\n i0.ɵɵtemplate(3, TuiTagComponent_tui_loader_3_Template, 1, 2, \"tui-loader\", 3)(4, TuiTagComponent_tui_svg_4_Template, 1, 1, \"tui-svg\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(5, TuiTagComponent_input_5_Template, 2, 2, \"input\", 5);\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"background-color\", ctx.backgroundColor);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.leftContent);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"textContent\", ctx.displayText);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.showLoader);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.canRemove);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.editing);\n }\n },\n dependencies: [i1.TuiLoaderComponent, i1.TuiSvgComponent, i2.NgIf, i3.PolymorpheusOutletDirective, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgModel],\n styles: [\"[_nghost-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-block;font:var(--tui-font-text-s);line-height:1.25rem;max-width:100%;cursor:default;outline:none;text-decoration:none;padding:0;border:0}[_nghost-%COMP%]:after{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;content:\\\"\\\";box-sizing:border-box;border-radius:inherit;pointer-events:none}._hoverable[_nghost-%COMP%]:hover[data-status=custom]:after, ._hoverable[_nghost-%COMP%]:active[data-status=custom]:after{background-color:var(--tui-clear)}[_nghost-%COMP%]:focus:after{border:2px solid var(--tui-focus)}[data-size=s][_nghost-%COMP%]{font:var(--tui-font-text-xs);line-height:1.25rem;border-radius:var(--tui-radius-xs)}[data-size=m][_nghost-%COMP%]{border-radius:var(--tui-radius-xs)}[data-size=l][_nghost-%COMP%]{border-radius:var(--tui-radius-s)}[data-status=primary][_nghost-%COMP%]{background-color:var(--tui-primary);color:var(--tui-primary-text)}[data-status=primary]._hoverable[_nghost-%COMP%]:hover{background-color:var(--tui-primary-hover)}[data-status=primary]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-primary-active)}[data-status=error][_nghost-%COMP%]{background-color:var(--tui-error-bg);color:var(--tui-text-01)}[data-status=error]._hoverable[_nghost-%COMP%]:hover, [data-status=error]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-error-bg-hover)}[data-status=error][data-mode=onDark][_nghost-%COMP%]{background-color:var(--tui-error-bg-night);color:var(--tui-text-01-night)}[data-status=error][data-mode=onDark]._hoverable[_nghost-%COMP%]:hover, [data-status=error][data-mode=onDark]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-error-bg-night-hover)}[data-status=success][_nghost-%COMP%]{background-color:var(--tui-success-bg);color:var(--tui-text-01)}[data-status=success]._hoverable[_nghost-%COMP%]:hover, [data-status=success]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-success-bg-hover)}[data-status=success][data-mode=onDark][_nghost-%COMP%]{background-color:var(--tui-success-bg-night);color:var(--tui-text-01-night)}[data-status=success][data-mode=onDark]._hoverable[_nghost-%COMP%]:hover, [data-status=success][data-mode=onDark]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-success-bg-night-hover)}[data-status=warning][_nghost-%COMP%]{background-color:var(--tui-warning-bg);color:var(--tui-text-01)}[data-status=warning]._hoverable[_nghost-%COMP%]:hover, [data-status=warning]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-warning-bg-hover)}[data-status=warning][data-mode=onDark][_nghost-%COMP%]{background-color:var(--tui-warning-bg-night);color:var(--tui-text-01-night)}[data-status=warning][data-mode=onDark]._hoverable[_nghost-%COMP%]:hover, [data-status=warning][data-mode=onDark]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-warning-bg-night-hover)}[data-status=default][_nghost-%COMP%]{color:var(--tui-text-01-night);background-color:var(--tui-base-06)}[data-status=default][_nghost-%COMP%]:not([data-mode])._hoverable:hover{background-color:var(--tui-base-07)}[data-status=default][_nghost-%COMP%]:not([data-mode])._hoverable:active{background-color:var(--tui-base-08)}[data-status=default][data-mode=onDark][_nghost-%COMP%]{color:var(--tui-text-01-night);background-color:var(--tui-clear-inverse)}[data-status=default][data-mode=onDark]._hoverable[_nghost-%COMP%]:hover{background-color:var(--tui-clear-inverse-hover)}[data-status=default][data-mode=onDark]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-clear-inverse-active)}[data-status=default][data-mode=onDark][_nghost-%COMP%]:focus:after{border:2px solid var(--tui-base-01)}[data-status=default][data-mode=onLight][_nghost-%COMP%]{background-color:var(--tui-clear);color:var(--tui-text-01)}[data-status=default][data-mode=onLight]._hoverable[_nghost-%COMP%]:hover{background-color:var(--tui-clear-hover)}[data-status=default][data-mode=onLight]._hoverable[_nghost-%COMP%]:active{background-color:var(--tui-clear-active)}._editing[_nghost-%COMP%]{background:transparent!important}._disabled[_nghost-%COMP%]{pointer-events:none;opacity:var(--tui-disabled-opacity)}._hoverable[_nghost-%COMP%]{cursor:pointer}._autocolor[_nghost-%COMP%]{color:#000c}.t-text[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;text-overflow:ellipsis;padding-right:.02em}.t-tag[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:flex;width:auto;align-items:center;font:inherit;border-radius:inherit}[data-size=s][_nghost-%COMP%] .t-tag[_ngcontent-%COMP%]{height:1.25rem;padding:0 .375rem}[data-size=m][_nghost-%COMP%] .t-tag[_ngcontent-%COMP%]{height:var(--tui-height-xs);padding:0 .5rem}[data-size=l][_nghost-%COMP%] .t-tag[_ngcontent-%COMP%]{height:var(--tui-height-s);padding:0 .75rem}._editing[_nghost-%COMP%] .t-tag[_ngcontent-%COMP%]{visibility:hidden}.t-edit[_ngcontent-%COMP%]{margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;font:inherit;color:var(--tui-text-01);width:100%;height:100%;box-sizing:border-box;padding:0 .5rem}.t-edit[_ngcontent-%COMP%]:-webkit-autofill, .t-edit[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-edit[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}[data-size=s][_nghost-%COMP%] .t-edit[_ngcontent-%COMP%]{padding:0 .375rem}[data-size=m][_nghost-%COMP%] .t-edit[_ngcontent-%COMP%]{padding:0 .5rem}[data-size=l][_nghost-%COMP%] .t-edit[_ngcontent-%COMP%]{padding:0 .75rem}.t-icon[_ngcontent-%COMP%]{width:1rem;height:100%;cursor:pointer;pointer-events:all;opacity:var(--tui-disabled-opacity);-webkit-margin-start:.25rem;margin-inline-start:.25rem;-webkit-margin-end:-.25rem;margin-inline-end:-.25rem}.t-icon[_ngcontent-%COMP%]:hover{opacity:1}[data-size=s][_nghost-%COMP%] .t-icon[_ngcontent-%COMP%]{-webkit-margin-start:0;margin-inline-start:0}[data-size=s][_nghost-%COMP%] .t-icon[_ngcontent-%COMP%] svg{transform:scale(.75)}.t-content[_ngcontent-%COMP%]{width:1rem;height:1rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}\"],\n changeDetection: 0\n });\n return TuiTagComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTagModule = /*#__PURE__*/(() => {\n class TuiTagModule {}\n TuiTagModule.ɵfac = function TuiTagModule_Factory(t) {\n return new (t || TuiTagModule)();\n };\n TuiTagModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTagModule\n });\n TuiTagModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, FormsModule, TuiSvgModule, TuiLoaderModule, PolymorpheusModule]]\n });\n return TuiTagModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_TAG_DEFAULT_OPTIONS, TUI_TAG_OPTIONS, TuiTagComponent, TuiTagModule, tuiTagOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, ChangeDetectorRef, ElementRef, TemplateRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, ViewChildren, Input, HostBinding, Output, ContentChild, HostListener, NgModule } from '@angular/core';\nimport * as i6 from '@angular/forms';\nimport { NgControl, FormsModule } from '@angular/forms';\nimport * as i4 from '@taiga-ui/cdk';\nimport { tuiCreateToken, tuiProvideOptions, AbstractTuiMultipleControl, EMPTY_QUERY, ALWAYS_TRUE_HANDLER, ALWAYS_FALSE_HANDLER, tuiIsNativeFocusedIn, tuiRetargetedBoundaryCrossing, tuiGetActualTarget, tuiIsElement, tuiGetClipboardDataText, tuiArrayRemove, tuiAsFocusableItemAccessor, tuiAsControl, TuiFocusableModule, TuiHoveredModule, TuiActiveZoneModule, TuiScrollService } from '@taiga-ui/cdk';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiModeDirective, TUI_MODE, TuiHintOptionsDirective, TUI_TEXTFIELD_WATCHED_CONTROLLER, TUI_COMMON_ICONS, tuiAsDataListHost, TEXTFIELD_CONTROLLER_PROVIDER, MODE_PROVIDER, TuiDataListDirective, TuiHostedDropdownComponent, TuiScrollbarComponent, TuiSvgModule, TuiScrollbarModule, TuiTooltipModule, TuiHostedDropdownModule, TuiWrapperModule } from '@taiga-ui/core';\nimport { FIXED_DROPDOWN_CONTROLLER_PROVIDER } from '@taiga-ui/kit/providers';\nimport { map } from 'rxjs/operators';\nimport * as i2 from '@taiga-ui/kit/components/tag';\nimport { TuiTagModule } from '@taiga-ui/kit/components/tag';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport * as i7 from 'rxjs';\nconst _c0 = [\"focusableElement\"];\nconst _c1 = [\"tagsContainer\"];\nconst _c2 = [\"cleaner\"];\nconst _c3 = [\"errorIcon\"];\nconst _c4 = [\"tag\"];\nfunction TuiInputTagComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction TuiInputTagComponent_div_5_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 21);\n }\n if (rf & 2) {\n const src_r11 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r11);\n }\n}\nconst _c5 = a0 => ({\n $implicit: a0\n});\nfunction TuiInputTagComponent_div_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 19);\n i0.ɵɵtemplate(1, TuiInputTagComponent_div_5_tui_svg_1_Template, 1, 1, \"tui-svg\", 20);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.iconLeft)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c5, ctx_r1.size));\n }\n}\nfunction TuiInputTagComponent_div_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 22);\n i0.ɵɵprojection(1, 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"t-placeholder_raised\", ctx_r2.placeholderRaised);\n }\n}\nfunction TuiInputTagComponent_ng_container_11_tui_tag_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r17 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-tag\", 24, 25);\n i0.ɵɵlistener(\"edited\", function TuiInputTagComponent_ng_container_11_tui_tag_1_Template_tui_tag_edited_0_listener($event) {\n const restoredCtx = i0.ɵɵrestoreView(_r17);\n const index_r14 = restoredCtx.index;\n const ctx_r16 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r16.onTagEdited($event, index_r14));\n })(\"keydown.arrowLeft.prevent\", function TuiInputTagComponent_ng_container_11_tui_tag_1_Template_tui_tag_keydown_arrowLeft_prevent_0_listener() {\n const restoredCtx = i0.ɵɵrestoreView(_r17);\n const index_r14 = restoredCtx.index;\n const ctx_r18 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r18.onTagKeyDownArrowLeft(index_r14));\n })(\"keydown.arrowRight.prevent\", function TuiInputTagComponent_ng_container_11_tui_tag_1_Template_tui_tag_keydown_arrowRight_prevent_0_listener() {\n const restoredCtx = i0.ɵɵrestoreView(_r17);\n const index_r14 = restoredCtx.index;\n const ctx_r19 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r19.onTagKeyDownArrowRight(index_r14));\n });\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const item_r13 = ctx.$implicit;\n const ctx_r12 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"disabled\", ctx_r12.computedDisabled || ctx_r12.disabledItemHandler(item_r13))(\"editable\", ctx_r12.editable && !ctx_r12.readOnly)(\"hoverable\", !ctx_r12.readOnly)(\"leftContent\", ctx_r12.getLeftContent(item_r13))(\"maxLength\", ctx_r12.maxLength)(\"removable\", !ctx_r12.readOnly && ctx_r12.removable)(\"separator\", ctx_r12.separator)(\"size\", ctx_r12.controller.size)(\"status\", i0.ɵɵpipeBind1(2, 11, ctx_r12.status$))(\"tuiFocusable\", false)(\"value\", item_r13.toString());\n }\n}\nfunction TuiInputTagComponent_ng_container_11_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiInputTagComponent_ng_container_11_tui_tag_1_Template, 3, 13, \"tui-tag\", 23);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx_r3.value)(\"ngForTrackBy\", ctx_r3.trackByFn);\n }\n}\nfunction TuiInputTagComponent_ng_template_12_span_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 27);\n }\n if (rf & 2) {\n const item_r21 = ctx.$implicit;\n const ctx_r20 = i0.ɵɵnextContext(2);\n i0.ɵɵclassProp(\"t-text_comma\", ctx_r20.computedFocused && !ctx_r20.inputHidden)(\"t-text_disabled\", ctx_r20.disabledItemHandler(item_r21))(\"t-text_error\", !ctx_r20.tagValidator(item_r21));\n i0.ɵɵproperty(\"textContent\", item_r21);\n }\n}\nfunction TuiInputTagComponent_ng_template_12_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiInputTagComponent_ng_template_12_span_0_Template, 1, 7, \"span\", 26);\n }\n if (rf & 2) {\n const ctx_r4 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngForOf\", ctx_r4.value);\n }\n}\nfunction TuiInputTagComponent_div_22_ng_container_1_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r29 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-svg\", 32, 33);\n i0.ɵɵlistener(\"click.stop\", function TuiInputTagComponent_div_22_ng_container_1_tui_svg_1_Template_tui_svg_click_stop_0_listener() {\n i0.ɵɵrestoreView(_r29);\n const ctx_r28 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r28.onCleanerClick());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const src_r26 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r26);\n }\n}\nfunction TuiInputTagComponent_div_22_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiInputTagComponent_div_22_ng_container_1_tui_svg_1_Template, 2, 1, \"tui-svg\", 31);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r22 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r22.iconCleaner)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c5, ctx_r22.size));\n }\n}\nfunction TuiInputTagComponent_div_22_tui_tooltip_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-tooltip\", 34);\n }\n if (rf & 2) {\n const ctx_r23 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"content\", ctx_r23.hintOptions == null ? null : ctx_r23.hintOptions.content)(\"describeId\", ctx_r23.id);\n }\n}\nfunction TuiInputTagComponent_div_22_div_3_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 21);\n }\n if (rf & 2) {\n const src_r31 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r31);\n }\n}\nfunction TuiInputTagComponent_div_22_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 35);\n i0.ɵɵtemplate(1, TuiInputTagComponent_div_22_div_3_tui_svg_1_Template, 1, 1, \"tui-svg\", 20);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r24 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r24.icon)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c5, ctx_r24.size));\n }\n}\nfunction TuiInputTagComponent_div_22_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 28);\n i0.ɵɵtemplate(1, TuiInputTagComponent_div_22_ng_container_1_Template, 2, 4, \"ng-container\", 0)(2, TuiInputTagComponent_div_22_tui_tooltip_2_Template, 1, 2, \"tui-tooltip\", 29)(3, TuiInputTagComponent_div_22_div_3_Template, 2, 4, \"div\", 30);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r7 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx_r7.hasCleaner);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx_r7.showHint);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx_r7.icon);\n }\n}\nfunction TuiInputTagComponent_ng_template_23_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 36);\n }\n if (rf & 2) {\n const ctx_r8 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"src\", ctx_r8.icons.error);\n }\n}\nconst _c6 = [[[\"tuiContent\"]], [[\"select\"]], \"*\"];\nconst _c7 = [\"tuiContent\", \"select\", \"*\"];\nconst TUI_INPUT_TAG_DEFAULT_OPTIONS = {\n separator: `,`,\n uniqueTags: true,\n tagStatus: `primary`\n};\n/**\n * Default parameters for InputTag component\n */\nconst TUI_INPUT_TAG_OPTIONS = tuiCreateToken(TUI_INPUT_TAG_DEFAULT_OPTIONS);\nfunction tuiInputTagOptionsProvider(options) {\n return tuiProvideOptions(TUI_INPUT_TAG_OPTIONS, options, TUI_INPUT_TAG_DEFAULT_OPTIONS);\n}\nconst TAG_SIZE_REM = {\n s: 1.25,\n m: 1.5,\n l: 2\n};\nconst LINE_HEIGHT_REM = {\n s: 1,\n m: 1.25,\n l: 1.25\n};\nconst TAG_VERTICAL_SPACE_REM = 0.125;\nlet TuiInputTagComponent = /*#__PURE__*/(() => {\n class TuiInputTagComponent extends AbstractTuiMultipleControl {\n constructor(control, cdr, el, modeDirective, mode$, hintOptions, controller, options, icons) {\n super(control, cdr);\n this.el = el;\n this.modeDirective = modeDirective;\n this.mode$ = mode$;\n this.hintOptions = hintOptions;\n this.controller = controller;\n this.options = options;\n this.icons = icons;\n this.tags = EMPTY_QUERY;\n this.separator = this.options.separator;\n this.search = '';\n this.editable = true;\n this.tagValidator = ALWAYS_TRUE_HANDLER;\n // TODO: 4.0 Consider removing and use rows = 1 instead\n this.expandable = true;\n this.rows = Infinity;\n this.inputHidden = false;\n this.uniqueTags = this.options.uniqueTags;\n this.maxLength = null;\n this.placeholder = '';\n this.removable = true;\n this.disabledItemHandler = ALWAYS_FALSE_HANDLER;\n this.searchChange = new EventEmitter();\n this.status$ = this.mode$.pipe(map(() => this.status));\n this.open = false;\n }\n set pseudoFocusedSetter(value) {\n if (!value && !this.focused) {\n this.scrollTo(0);\n }\n this.pseudoFocus = value;\n }\n get nativeFocusableElement() {\n return !this.focusableElement || this.computedDisabled ? null : this.focusableElement.nativeElement;\n }\n get focused() {\n var _a;\n return tuiIsNativeFocusedIn(this.el.nativeElement) || !!((_a = this.hostedDropdown) === null || _a === void 0 ? void 0 : _a.focused);\n }\n get appearance() {\n return this.controller.appearance;\n }\n get size() {\n return this.controller.size;\n }\n get labelOutside() {\n const {\n size,\n labelOutside\n } = this.controller;\n return size === 's' || labelOutside;\n }\n get iconLeft() {\n return this.controller.iconLeft;\n }\n get icon() {\n return this.controller.icon;\n }\n get iconCleaner() {\n return this.controller.options.iconCleaner;\n }\n get hasCleaner() {\n return this.controller.cleaner && this.hasValue && this.interactive;\n }\n get hasNativeValue() {\n return !!this.search;\n }\n get hasValue() {\n return !!this.value.length || this.hasNativeValue;\n }\n get hasPlaceholder() {\n return !this.labelOutside || !this.hasValue && (!this.hasExampleText || this.inputHidden);\n }\n get placeholderRaised() {\n return !this.labelOutside && (this.computedFocused && !this.readOnly || this.hasValue);\n }\n get hasExampleText() {\n var _a;\n return !!((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) && this.computedFocused && !this.hasValue && !this.readOnly;\n }\n get hasRightIcons() {\n var _a;\n return this.hasCleaner || !!this.icon || !!((_a = this.hintOptions) === null || _a === void 0 ? void 0 : _a.content) && !this.computedDisabled;\n }\n get showHint() {\n var _a;\n return !!((_a = this.hintOptions) === null || _a === void 0 ? void 0 : _a.content) && (this.controller.options.hintOnDisabled || !this.computedDisabled);\n }\n get status() {\n var _a;\n return ((_a = this.modeDirective) === null || _a === void 0 ? void 0 : _a.mode) ? 'default' : this.options.tagStatus;\n }\n get canOpen() {\n return this.interactive && !!this.datalist;\n }\n get computeMaxHeight() {\n return this.expandable ? this.rows * this.lineHeight : null;\n }\n onFocusInOut() {\n this.cdr.detectChanges();\n }\n detectRetargetFromLabel(event) {\n if (tuiRetargetedBoundaryCrossing(event)) {\n event.stopImmediatePropagation();\n }\n }\n getLeftContent(tag) {\n return !this.tagValidator(tag) && this.errorIconTemplate ? this.errorIconTemplate : '';\n }\n onCleanerClick() {\n this.updateSearch('');\n this.clear();\n this.focusInput();\n }\n onActiveZone(active) {\n this.open = false;\n this.addTag();\n this.updateFocused(active);\n if (!active && !this.computedFocused) {\n this.scrollTo(0);\n }\n }\n onMouseDown(event) {\n var _a;\n const actualTarget = tuiGetActualTarget(event);\n if (!this.focusableElement || actualTarget === this.focusableElement.nativeElement || !tuiIsElement(event.target) || ((_a = this.cleanerSvg) === null || _a === void 0 ? void 0 : _a.nativeElement.contains(event.target)) || this.tagsContainer && actualTarget !== this.tagsContainer.nativeElement && this.tagsContainer.nativeElement.contains(actualTarget)) {\n return;\n }\n event.preventDefault();\n this.focusInput();\n }\n onFieldKeyDownBackspace(event) {\n if (!this.labelOutside && !this.hasNativeValue && this.value.length) {\n this.deleteLastEnabledItem();\n } else {\n this.onFieldKeyDownArrowLeft(event);\n }\n }\n onFieldKeyDownArrowLeft(event) {\n if (!this.labelOutside || this.hasNativeValue || !this.value.length) {\n return;\n }\n event.preventDefault();\n this.tags.last.nativeElement.focus();\n }\n onFieldKeyDownEnter() {\n this.addTag();\n this.scrollTo();\n }\n onTagKeyDownArrowLeft(currentIndex) {\n if (currentIndex > 0) {\n this.onScrollKeyDown(currentIndex, -1);\n }\n }\n onTagKeyDownArrowRight(currentIndex) {\n if (currentIndex === this.value.length - 1) {\n this.focusInput();\n } else {\n this.onScrollKeyDown(currentIndex, 1);\n }\n }\n onTagEdited(value, index) {\n this.focusInput(value === '');\n this.value = this.filterValue(this.value.map((tag, tagIndex) => tagIndex !== index ? tag : value.split(this.separator).map(tag => tag.trim()).filter(Boolean)).reduce((result, item) => result.concat(item), []));\n }\n handleOption(item) {\n this.focusInput();\n this.updateSearch('');\n this.value = this.filterValue(this.value.concat(item));\n this.open = false;\n this.scrollTo();\n }\n onInput(value) {\n const array = value.split(this.separator);\n const tags = array.map(item => this.clippedValue(item.trim())).filter((item, index, {\n length\n }) => item.length > 0 && index !== length - 1);\n const validated = tags.filter(tag => !this.disabledItemHandler(tag));\n if (array.length > 1) {\n this.updateSearch(this.clippedValue(array[array.length - 1].trim()));\n this.value = this.filterValue([...this.value, ...validated]);\n } else {\n this.updateSearch(this.clippedValue(value));\n }\n this.open = this.hasNativeValue;\n }\n onPaste(event) {\n const pasted = tuiGetClipboardDataText(event);\n this.onInput(pasted || '');\n }\n onDrop({\n dataTransfer\n }) {\n if (dataTransfer) {\n this.onInput(dataTransfer.getData('text') || '');\n }\n }\n setDisabledState() {\n super.setDisabledState();\n this.open = false;\n }\n trackByFn(_, tag) {\n // Actually tag has TuiStringifiableItem type not string\n return tag.toString();\n }\n scrollTo(scrollLeft) {\n var _a;\n if (scrollLeft === void 0) {\n scrollLeft = (_a = this.scrollBar) === null || _a === void 0 ? void 0 : _a.nativeElement.scrollWidth;\n }\n // Allow change detection to run and add new tag to DOM\n setTimeout(() => {\n if (this.scrollBar) {\n this.scrollBar.nativeElement.scrollLeft = scrollLeft || 0;\n }\n });\n }\n filterValue(value) {\n const seen = new Set();\n return value.reverse().filter(item => !this.uniqueTags || item && !seen.has(item) && seen.add(item)).reverse();\n }\n onScrollKeyDown(currentIndex, flag) {\n const tag = this.tags.find((_item, index) => index === currentIndex + flag);\n if (!tag || !this.scrollBar) {\n return;\n }\n tag.nativeElement.focus();\n if (flag * this.scrollBar.nativeElement.clientWidth - flag * tag.nativeElement.offsetLeft - tag.nativeElement.clientWidth < 0) {\n this.scrollBar.nativeElement.scrollLeft += flag * tag.nativeElement.clientWidth;\n }\n }\n updateSearch(value) {\n if (this.focusableElement) {\n this.focusableElement.nativeElement.value = value;\n }\n this.search = value;\n this.searchChange.emit(value);\n }\n addTag() {\n var _a, _b;\n const inputValue = (_b = (_a = this.search) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';\n if (!inputValue || this.disabledItemHandler(inputValue)) {\n return;\n }\n this.updateSearch('');\n this.value = this.filterValue(this.value.concat(inputValue));\n }\n deleteLastEnabledItem() {\n for (let index = this.value.length - 1; index >= 0; index--) {\n if (!this.disabledItemHandler(this.value[index])) {\n this.value = tuiArrayRemove(this.value, index);\n break;\n }\n }\n }\n focusInput(preventScroll = false) {\n var _a;\n (_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.focus({\n preventScroll\n });\n }\n clippedValue(value) {\n return value.slice(0, this.maxLength || value.length);\n }\n get lineHeight() {\n return this.labelOutside ? TAG_SIZE_REM[this.controller.size] + 2 * TAG_VERTICAL_SPACE_REM : LINE_HEIGHT_REM[this.controller.size];\n }\n }\n TuiInputTagComponent.ɵfac = function TuiInputTagComponent_Factory(t) {\n return new (t || TuiInputTagComponent)(i0.ɵɵdirectiveInject(NgControl, 10), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TuiModeDirective, 8), i0.ɵɵdirectiveInject(TUI_MODE), i0.ɵɵdirectiveInject(TuiHintOptionsDirective, 8), i0.ɵɵdirectiveInject(TUI_TEXTFIELD_WATCHED_CONTROLLER), i0.ɵɵdirectiveInject(TUI_INPUT_TAG_OPTIONS), i0.ɵɵdirectiveInject(TUI_COMMON_ICONS));\n };\n TuiInputTagComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiInputTagComponent,\n selectors: [[\"tui-input-tag\"]],\n contentQueries: function TuiInputTagComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, TuiDataListDirective, 5, TemplateRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.datalist = _t.first);\n }\n },\n viewQuery: function TuiInputTagComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TuiHostedDropdownComponent, 5);\n i0.ɵɵviewQuery(_c0, 5);\n i0.ɵɵviewQuery(_c1, 5);\n i0.ɵɵviewQuery(_c2, 5, ElementRef);\n i0.ɵɵviewQuery(TuiScrollbarComponent, 5, ElementRef);\n i0.ɵɵviewQuery(_c3, 5);\n i0.ɵɵviewQuery(_c4, 5, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.hostedDropdown = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusableElement = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tagsContainer = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.cleanerSvg = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.scrollBar = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.errorIconTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tags = _t);\n }\n },\n hostVars: 7,\n hostBindings: function TuiInputTagComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focusin.capture.silent\", function TuiInputTagComponent_focusin_capture_silent_HostBindingHandler() {\n return ctx.onFocusInOut();\n })(\"focusout.capture.silent\", function TuiInputTagComponent_focusout_capture_silent_HostBindingHandler() {\n return ctx.onFocusInOut();\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-size\", ctx.size);\n i0.ɵɵclassProp(\"_expandable\", ctx.expandable)(\"_label-outside\", ctx.labelOutside)(\"_icon-left\", ctx.iconLeft);\n }\n },\n inputs: {\n separator: \"separator\",\n search: \"search\",\n editable: \"editable\",\n tagValidator: \"tagValidator\",\n expandable: \"expandable\",\n rows: \"rows\",\n inputHidden: \"inputHidden\",\n uniqueTags: \"uniqueTags\",\n maxLength: \"maxLength\",\n placeholder: \"placeholder\",\n removable: \"removable\",\n disabledItemHandler: \"disabledItemHandler\",\n pseudoFocusedSetter: [\"pseudoFocused\", \"pseudoFocusedSetter\"]\n },\n outputs: {\n searchChange: \"searchChange\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiInputTagComponent), tuiAsControl(TuiInputTagComponent), tuiAsDataListHost(TuiInputTagComponent), TEXTFIELD_CONTROLLER_PROVIDER, MODE_PROVIDER], [FIXED_DROPDOWN_CONTROLLER_PROVIDER]), i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c7,\n decls: 25,\n vars: 34,\n consts: [[4, \"ngIf\"], [1, \"t-hosted\", 3, \"canOpen\", \"content\", \"open\", \"openChange\", \"tuiActiveZoneChange\"], [\"tuiWrapper\", \"\", 3, \"appearance\", \"disabled\", \"focus\", \"hover\", \"invalid\", \"readOnly\", \"click.prevent.silent\", \"mousedown\"], [1, \"t-content\"], [\"class\", \"t-icon t-icon_left t-textfield-icon t-icon-wrapper\", 4, \"ngIf\"], [1, \"t-wrapper\"], [1, \"t-absolute-wrapper\"], [\"automation-id\", \"tui-input-tag__placeholder\", \"class\", \"t-placeholder\", 3, \"t-placeholder_raised\", 4, \"ngIf\"], [1, \"t-scrollbar\", 3, \"hidden\"], [1, \"t-tags\"], [4, \"ngIf\", \"ngIfElse\"], [\"text\", \"\"], [1, \"t-input-wrapper\"], [1, \"t-ghost\"], [\"automation-id\", \"tui-input-tag__native\", \"type\", \"text\", 1, \"t-native\", 3, \"disabled\", \"id\", \"ngModel\", \"placeholder\", \"readOnly\", \"tuiFocusable\", \"drop.prevent\", \"keydown.arrowLeft\", \"keydown.backspace\", \"keydown.enter.prevent\", \"ngModelChange\", \"paste.prevent\"], [\"focusableElement\", \"\"], [1, \"t-value-content\"], [\"class\", \"t-icons t-icon-wrapper\", 4, \"ngIf\"], [\"errorIcon\", \"\"], [1, \"t-icon\", \"t-icon_left\", \"t-textfield-icon\", \"t-icon-wrapper\"], [\"appearance\", \"icon\", \"tuiWrapper\", \"\", 3, \"src\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [\"appearance\", \"icon\", \"tuiWrapper\", \"\", 3, \"src\"], [\"automation-id\", \"tui-input-tag__placeholder\", 1, \"t-placeholder\"], [\"automation-id\", \"tui-input-tag__tag\", \"class\", \"t-tag\", 3, \"disabled\", \"editable\", \"hoverable\", \"leftContent\", \"maxLength\", \"removable\", \"separator\", \"size\", \"status\", \"tuiFocusable\", \"value\", \"edited\", \"keydown.arrowLeft.prevent\", \"keydown.arrowRight.prevent\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"automation-id\", \"tui-input-tag__tag\", 1, \"t-tag\", 3, \"disabled\", \"editable\", \"hoverable\", \"leftContent\", \"maxLength\", \"removable\", \"separator\", \"size\", \"status\", \"tuiFocusable\", \"value\", \"edited\", \"keydown.arrowLeft.prevent\", \"keydown.arrowRight.prevent\"], [\"tag\", \"\"], [\"class\", \"t-text\", 3, \"t-text_comma\", \"t-text_disabled\", \"t-text_error\", \"textContent\", 4, \"ngFor\", \"ngForOf\"], [1, \"t-text\", 3, \"textContent\"], [1, \"t-icons\", \"t-icon-wrapper\"], [\"automation-id\", \"tui-input-tag__tooltip\", \"class\", \"t-tooltip\", 3, \"content\", \"describeId\", 4, \"ngIf\"], [\"class\", \"t-icon t-textfield-icon\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"automation-id\", \"tui-input-tag__cleaner\", \"tuiWrapper\", \"\", \"class\", \"t-cleaner\", 3, \"src\", \"click.stop\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [\"appearance\", \"icon\", \"automation-id\", \"tui-input-tag__cleaner\", \"tuiWrapper\", \"\", 1, \"t-cleaner\", 3, \"src\", \"click.stop\"], [\"cleaner\", \"\"], [\"automation-id\", \"tui-input-tag__tooltip\", 1, \"t-tooltip\", 3, \"content\", \"describeId\"], [1, \"t-icon\", \"t-textfield-icon\"], [1, \"t-error-icon\", 3, \"src\"]],\n template: function TuiInputTagComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c6);\n i0.ɵɵtemplate(0, TuiInputTagComponent_ng_container_0_Template, 1, 0, \"ng-container\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵelementStart(2, \"tui-hosted-dropdown\", 1);\n i0.ɵɵlistener(\"openChange\", function TuiInputTagComponent_Template_tui_hosted_dropdown_openChange_2_listener($event) {\n return ctx.open = $event;\n })(\"tuiActiveZoneChange\", function TuiInputTagComponent_Template_tui_hosted_dropdown_tuiActiveZoneChange_2_listener($event) {\n return ctx.onActiveZone($event);\n });\n i0.ɵɵelementStart(3, \"div\", 2);\n i0.ɵɵlistener(\"click.prevent.silent\", function TuiInputTagComponent_Template_div_click_prevent_silent_3_listener($event) {\n return ctx.detectRetargetFromLabel($event);\n })(\"mousedown\", function TuiInputTagComponent_Template_div_mousedown_3_listener($event) {\n return ctx.onMouseDown($event);\n });\n i0.ɵɵelementStart(4, \"div\", 3);\n i0.ɵɵtemplate(5, TuiInputTagComponent_div_5_Template, 2, 4, \"div\", 4);\n i0.ɵɵelementStart(6, \"div\", 5)(7, \"div\", 6);\n i0.ɵɵtemplate(8, TuiInputTagComponent_div_8_Template, 2, 2, \"div\", 7);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(9, \"tui-scrollbar\", 8)(10, \"div\", 9);\n i0.ɵɵtemplate(11, TuiInputTagComponent_ng_container_11_Template, 2, 2, \"ng-container\", 10)(12, TuiInputTagComponent_ng_template_12_Template, 1, 1, \"ng-template\", null, 11, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementStart(14, \"div\", 12)(15, \"div\", 13);\n i0.ɵɵtext(16);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(17, \"input\", 14, 15);\n i0.ɵɵlistener(\"drop.prevent\", function TuiInputTagComponent_Template_input_drop_prevent_17_listener($event) {\n return ctx.onDrop($event);\n })(\"keydown.arrowLeft\", function TuiInputTagComponent_Template_input_keydown_arrowLeft_17_listener($event) {\n return ctx.onFieldKeyDownArrowLeft($event);\n })(\"keydown.backspace\", function TuiInputTagComponent_Template_input_keydown_backspace_17_listener($event) {\n return ctx.onFieldKeyDownBackspace($event);\n })(\"keydown.enter.prevent\", function TuiInputTagComponent_Template_input_keydown_enter_prevent_17_listener() {\n return ctx.onFieldKeyDownEnter();\n })(\"ngModelChange\", function TuiInputTagComponent_Template_input_ngModelChange_17_listener($event) {\n return ctx.onInput($event);\n })(\"paste.prevent\", function TuiInputTagComponent_Template_input_paste_prevent_17_listener($event) {\n return ctx.onPaste($event);\n });\n i0.ɵɵelementEnd()()();\n i0.ɵɵelementStart(19, \"div\", 16);\n i0.ɵɵprojection(20);\n i0.ɵɵelementEnd()()();\n i0.ɵɵprojection(21, 1);\n i0.ɵɵtemplate(22, TuiInputTagComponent_div_22_Template, 4, 3, \"div\", 17);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(23, TuiInputTagComponent_ng_template_23_Template, 1, 1, \"ng-template\", null, 18, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const _r5 = i0.ɵɵreference(13);\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 32, ctx.hintOptions == null ? null : ctx.hintOptions.change$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"canOpen\", ctx.canOpen)(\"content\", ctx.datalist || \"\")(\"open\", ctx.open);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"appearance\", ctx.appearance)(\"disabled\", ctx.computedDisabled)(\"focus\", ctx.computedFocused)(\"hover\", ctx.pseudoHover)(\"invalid\", ctx.computedInvalid)(\"readOnly\", ctx.readOnly);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.iconLeft);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", ctx.hasPlaceholder);\n i0.ɵɵadvance(1);\n i0.ɵɵstyleProp(\"max-height\", ctx.computeMaxHeight, \"rem\");\n i0.ɵɵproperty(\"hidden\", !ctx.expandable);\n i0.ɵɵadvance(1);\n i0.ɵɵclassProp(\"t-tags_empty\", (!ctx.focused || ctx.inputHidden) && !(ctx.value == null ? null : ctx.value.length));\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.labelOutside)(\"ngIfElse\", _r5);\n i0.ɵɵadvance(3);\n i0.ɵɵclassProp(\"t-input-wrapper_collapsed\", ctx.computedDisabled || ctx.readOnly || ctx.inputHidden);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(ctx.search);\n i0.ɵɵadvance(1);\n i0.ɵɵclassProp(\"t-native_hidden\", ctx.inputHidden);\n i0.ɵɵproperty(\"disabled\", ctx.computedDisabled)(\"id\", ctx.id)(\"ngModel\", ctx.search)(\"placeholder\", ctx.placeholder)(\"readOnly\", ctx.readOnly || ctx.inputHidden)(\"tuiFocusable\", ctx.computedFocusable);\n i0.ɵɵattribute(\"maxLength\", ctx.maxLength);\n i0.ɵɵadvance(5);\n i0.ɵɵproperty(\"ngIf\", ctx.hasRightIcons);\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiSvgComponent, i1.TuiScrollbarComponent, i2.TuiTagComponent, i1.TuiTooltipComponent, i3.NgIf, i4.TuiActiveZoneDirective, i1.TuiWrapperDirective, i5.PolymorpheusOutletDirective, i3.NgForOf, i4.TuiFocusableDirective, i6.DefaultValueAccessor, i6.NgControlStatus, i6.NgModel, i3.AsyncPipe],\n styles: [\"[_nghost-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;text-align:left;border-radius:var(--tui-radius-m);height:var(--tui-height);min-height:var(--tui-height);max-height:var(--tui-height)}[data-size=s][_nghost-%COMP%]{--tui-height: var(--tui-height-s)}[data-size=m][_nghost-%COMP%]{--tui-height: var(--tui-height-m)}[data-size=l][_nghost-%COMP%]{--tui-height: var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input[_ngcontent-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;border-style:solid;border-color:transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-input[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input[_ngcontent-%COMP%]:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-input[_ngcontent-%COMP%]::-webkit-caps-lock-indicator, .t-input[_ngcontent-%COMP%]::-webkit-contacts-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-credit-card-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-credentials-auto-fill-button, .t-input[_ngcontent-%COMP%]::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}.t-input[_ngcontent-%COMP%]::placeholder{color:var(--tui-text-03);opacity:0}._focused[_nghost-%COMP%]:not(._readonly) .t-input[_ngcontent-%COMP%]::placeholder, tui-primitive-textfield._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-primitive-textfield._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-textarea._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-textarea._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-text-area._focused:not(._readonly)[_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, tui-text-area._focused:not(._readonly) [_nghost-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder{opacity:1}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill, .t-input [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]:-webkit-autofill, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]:-webkit-autofill, [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-input [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]:-webkit-autofill:hover, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]:-webkit-autofill:hover, [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]:-webkit-autofill:focus, .t-input [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]:-webkit-autofill:focus, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-input[_ngcontent-%COMP%]::placeholder, .t-input [tuiWrapper][data-mode=\\\"onDark\\\"][_nghost-%COMP%]::placeholder, [tuiWrapper][data-mode=\\\"onDark\\\"] [_nghost-%COMP%]::placeholder{color:var(--tui-text-03-night)}[data-size=s][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"s\\\"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"s\\\"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size=\\\"s\\\"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size=\\\"s\\\"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size=\\\"s\\\"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size=\\\"s\\\"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-s)}[data-size=m][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"m\\\"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"m\\\"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size=\\\"m\\\"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size=\\\"m\\\"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size=\\\"m\\\"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size=\\\"m\\\"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-m)}[data-size=l][_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"l\\\"][_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"l\\\"] [_nghost-%COMP%]:not(tui-primitive-textfield), .t-input tui-textarea[data-size=\\\"l\\\"][_nghost-%COMP%]:not(tui-textarea), tui-textarea[data-size=\\\"l\\\"] [_nghost-%COMP%]:not(tui-textarea), .t-input tui-text-area[data-size=\\\"l\\\"][_nghost-%COMP%]:not(tui-text-area), tui-text-area[data-size=\\\"l\\\"] [_nghost-%COMP%]:not(tui-text-area){padding:0 var(--tui-padding-l)}._disabled[_nghost-%COMP%] .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield._disabled[_nghost-%COMP%], tui-primitive-textfield._disabled [_nghost-%COMP%], .t-input tui-textarea._disabled[_nghost-%COMP%], tui-textarea._disabled [_nghost-%COMP%], .t-input tui-text-area._disabled[_nghost-%COMP%], tui-text-area._disabled [_nghost-%COMP%]{pointer-events:none}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield){padding-top:1.25rem}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], tui-primitive-textfield[data-size=\\\"l\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield), tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield){padding-top:1rem}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], .t-input tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside)[_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], tui-primitive-textfield[data-size=\\\"m\\\"]:not(._label-outside) [_nghost-%COMP%]:not(tui-primitive-textfield):-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.69rem;transform:translateY(-.5rem)}._hidden[_nghost-%COMP%] input.t-input[_ngcontent-%COMP%], .t-input tui-primitive-textfield._hidden[_nghost-%COMP%], tui-primitive-textfield._hidden [_nghost-%COMP%]{opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;box-sizing:border-box;align-items:center;overflow:hidden}[data-size=s][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-s)}[data-size=m][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-m)}[data-size=l][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0 var(--tui-padding-l)}.t-wrapper[_ngcontent-%COMP%]{flex:1;min-width:0;-webkit-padding-end:.25rem;padding-inline-end:.25rem}.t-placeholder[_ngcontent-%COMP%]{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}@supports (-webkit-hyphens: none){.t-placeholder[_ngcontent-%COMP%]{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised[_ngcontent-%COMP%]{transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}._invalid[_nghost-%COMP%]:not(._focused) .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill)}._invalid[_nghost-%COMP%]:not(._focused) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill-night)}._focused[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-03)}[data-size=l][_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font:var(--tui-font-text-m);line-height:1.25rem}[data-size=l][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font-size:.8156rem}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01-night)}._focused[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}.t-cleaner[_ngcontent-%COMP%]{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}._readonly[_nghost-%COMP%] .t-cleaner[_ngcontent-%COMP%], ._disabled[_nghost-%COMP%] .t-cleaner[_ngcontent-%COMP%]{pointer-events:none}.t-icon[_ngcontent-%COMP%]{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}[data-size=s][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-start:-.375rem;margin-inline-start:-.375rem}[data-size=m][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-start:-.125rem;margin-inline-start:-.125rem;-webkit-margin-end:.375rem;margin-inline-end:.375rem}[data-size=l][_nghost-%COMP%] .t-icon_left[_ngcontent-%COMP%]{-webkit-margin-end:.75rem;margin-inline-end:.75rem}.t-icons[_ngcontent-%COMP%]{display:flex;align-items:center}[data-size=m][_nghost-%COMP%] .t-icons[_ngcontent-%COMP%]{-webkit-margin-end:-.125rem;margin-inline-end:-.125rem}[data-size=s][_nghost-%COMP%] .t-icons[_ngcontent-%COMP%]{-webkit-margin-end:-.375rem;margin-inline-end:-.375rem}[_nghost-%COMP%]:not([data-size=\\\"s\\\"]) .t-icons[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(:first-child){-webkit-margin-start:.25rem;margin-inline-start:.25rem}[_nghost-%COMP%]{cursor:text}._expandable[_nghost-%COMP%]{height:auto;max-height:none}._disabled[_nghost-%COMP%]{pointer-events:none}._readonly[_nghost-%COMP%]{cursor:default}[data-size=m][_nghost-%COMP%]{line-height:1rem}.t-hosted[_ngcontent-%COMP%]{display:block;border-radius:inherit}.t-scrollbar[_ngcontent-%COMP%]{scroll-behavior:smooth;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;min-width:100%}tui-root._reduced-motion[_nghost-%COMP%] .t-scrollbar[_ngcontent-%COMP%], tui-root._reduced-motion [_nghost-%COMP%] .t-scrollbar[_ngcontent-%COMP%]{scroll-behavior:auto}[_nghost-%COMP%]:not(._label-outside) .t-scrollbar[_ngcontent-%COMP%], ._label-outside._icon-left[_nghost-%COMP%] .t-scrollbar[_ngcontent-%COMP%]{margin:0}[data-size=s]._icon-left[_nghost-%COMP%] .t-scrollbar[_ngcontent-%COMP%]{-webkit-margin-start:.25rem;margin-inline-start:.25rem}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-scrollbar[_ngcontent-%COMP%]{border-top:1rem solid transparent}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-scrollbar[_ngcontent-%COMP%]{border-top:1.25rem solid transparent}.t-tags[_ngcontent-%COMP%]{display:flex;-webkit-padding-start:.25rem;padding-inline-start:.25rem}.t-tags_expandable[_ngcontent-%COMP%]{overflow:hidden}.t-tags_empty[_ngcontent-%COMP%]{height:0}._expandable[_nghost-%COMP%] .t-tags[_ngcontent-%COMP%]{flex-wrap:wrap;white-space:normal;overflow:hidden}._readonly[_nghost-%COMP%] .t-tags[_ngcontent-%COMP%]{pointer-events:none}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-tags[_ngcontent-%COMP%], [data-size=l][_nghost-%COMP%]:not(._label-outside) .t-tags[_ngcontent-%COMP%]{padding:0}.t-content[_ngcontent-%COMP%]{align-items:flex-start}[data-size=s][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{min-height:var(--tui-height-s)}[data-size=m][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{min-height:var(--tui-height-m)}[data-size=l][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{min-height:var(--tui-height-l)}[data-size=s][_nghost-%COMP%] .t-icon-wrapper[_ngcontent-%COMP%]{height:var(--tui-height-s)}[data-size=m][_nghost-%COMP%] .t-icon-wrapper[_ngcontent-%COMP%]{height:var(--tui-height-m)}[data-size=l][_nghost-%COMP%] .t-icon-wrapper[_ngcontent-%COMP%]{height:var(--tui-height-l)}.t-absolute-wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center}[data-size=m][_nghost-%COMP%] .t-absolute-wrapper[_ngcontent-%COMP%]{height:var(--tui-height-m)}[data-size=l][_nghost-%COMP%] .t-absolute-wrapper[_ngcontent-%COMP%]{height:var(--tui-height-l)}.t-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;padding:0;box-sizing:border-box}[data-size=s][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{min-height:var(--tui-height-s);padding:calc((var(--tui-height-s) - 1.5rem) / 2) 0}[data-size=m][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{min-height:var(--tui-height-m);padding:calc((var(--tui-height-m) - var(--tui-height-xs) - .25rem) / 2) 0}[data-size=l][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:calc((var(--tui-height-l) - var(--tui-height-s) - .25rem) / 2) 0}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-wrapper[_ngcontent-%COMP%]{padding:calc((var(--tui-height-m) - 2rem) / 2) 0}[data-size=l][_nghost-%COMP%]:not(._label-outside) .t-wrapper[_ngcontent-%COMP%]{padding:calc((var(--tui-height-l) - 2.5rem) / 2) 0}.t-tag[_ngcontent-%COMP%]{margin:.125rem .5rem .125rem -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem;max-width:100%;flex-shrink:0}[data-size=m][_nghost-%COMP%] .t-tag[_ngcontent-%COMP%]{-webkit-margin-start:-.125rem;margin-inline-start:-.125rem;-webkit-margin-end:.375rem;margin-inline-end:.375rem}.t-text[_ngcontent-%COMP%]:after{content:\\\",\\\\a0\\\"}.t-text_disabled[_ngcontent-%COMP%]{color:var(--tui-text-03)}.t-text_error[_ngcontent-%COMP%]{color:var(--tui-negative)}.t-text[_ngcontent-%COMP%]:not(.t-text_comma):last-of-type:after{content:\\\"\\\"}[_nghost-%COMP%]:not(._expandable) .t-text[_ngcontent-%COMP%]{white-space:nowrap}.t-input-wrapper[_ngcontent-%COMP%], .t-value-content[_ngcontent-%COMP%]{position:relative;display:flex;flex:1;max-width:100%}[data-size=s][_nghost-%COMP%] .t-input-wrapper[_ngcontent-%COMP%], [data-size=s][_nghost-%COMP%] .t-value-content[_ngcontent-%COMP%]{min-height:1.5rem}[data-size=m][_nghost-%COMP%] .t-input-wrapper[_ngcontent-%COMP%], [data-size=m][_nghost-%COMP%] .t-value-content[_ngcontent-%COMP%]{min-height:calc(var(--tui-height-xs) + 2 * .125rem)}[data-size=l][_nghost-%COMP%] .t-input-wrapper[_ngcontent-%COMP%], [data-size=l][_nghost-%COMP%] .t-value-content[_ngcontent-%COMP%]{min-height:calc(var(--tui-height-s) + 2 * .125rem)}[_nghost-%COMP%]:not(._label-outside) .t-input-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%]:not(._label-outside) .t-value-content[_ngcontent-%COMP%]{min-height:1rem}.t-input-wrapper_collapsed[_ngcontent-%COMP%]{flex:0;-webkit-margin-start:-.5rem;margin-inline-start:-.5rem}.t-value-content[_ngcontent-%COMP%]:empty{display:none}.t-ghost[_ngcontent-%COMP%]{visibility:hidden;white-space:pre;text-overflow:clip;min-width:.125rem}[_nghost-%COMP%]:not(._expandable) .t-ghost[_ngcontent-%COMP%]{min-width:2rem}.t-native[_ngcontent-%COMP%]{margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;padding:0;cursor:inherit}.t-native[_ngcontent-%COMP%]:-webkit-autofill, .t-native[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-native[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-native_hidden[_ngcontent-%COMP%]{opacity:0;text-indent:-10em}.t-native[_ngcontent-%COMP%]::placeholder{color:var(--tui-text-03);opacity:0}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-native[_ngcontent-%COMP%]::placeholder{color:var(--tui-text-03-night)}._focused[_nghost-%COMP%] .t-native[_ngcontent-%COMP%]:not(:-moz-read-only)::placeholder{opacity:1}._focused[_nghost-%COMP%] .t-native[_ngcontent-%COMP%]:not(:read-only)::placeholder{opacity:1}.t-error-icon[_ngcontent-%COMP%]{display:block;color:var(--tui-error-fill);width:1rem;height:1rem}\"],\n changeDetection: 0\n });\n return TuiInputTagComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiInputTagModule = /*#__PURE__*/(() => {\n class TuiInputTagModule {}\n TuiInputTagModule.ɵfac = function TuiInputTagModule_Factory(t) {\n return new (t || TuiInputTagModule)();\n };\n TuiInputTagModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiInputTagModule\n });\n TuiInputTagModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [TuiScrollService],\n imports: [[CommonModule, FormsModule, PolymorpheusModule, TuiFocusableModule, TuiHoveredModule, TuiActiveZoneModule, TuiSvgModule, TuiScrollbarModule, TuiTooltipModule, TuiHostedDropdownModule, TuiTagModule, TuiWrapperModule]]\n });\n return TuiInputTagModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_INPUT_TAG_DEFAULT_OPTIONS, TUI_INPUT_TAG_OPTIONS, TuiInputTagComponent, TuiInputTagModule, tuiInputTagOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { ChangeDetectorRef, ElementRef, Injector, Component, ChangeDetectionStrategy, Optional, Self, Inject, Input, HostBinding, forwardRef, Directive, HostListener, ContentChild, NgModule } from '@angular/core';\nimport * as i1 from '@angular/forms';\nimport { NgModel, NgControl } from '@angular/forms';\nimport { tuiCreateToken, tuiProvideOptions, tuiWatch, tuiIsEdgeOlderThan, CHROMIUM_EDGE_START_VERSION, tuiPure, AbstractTuiControl, tuiIsNativeFocused, tuiClamp, tuiAssert, tuiTypedFromEvent, ALWAYS_TRUE_HANDLER, ALWAYS_FALSE_HANDLER, tuiCoerceBooleanProperty, TuiDestroyService } from '@taiga-ui/cdk';\nimport { tuiPercentageToKeyStepValue, tuiKeyStepValueToPercentage } from '@taiga-ui/kit/utils';\nimport { __decorate } from 'tslib';\nimport { USER_AGENT } from '@ng-web-apis/common';\nimport { take, tap, map, filter, takeUntil } from 'rxjs/operators';\nimport * as i1$2 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i1$1 from 'rxjs';\nimport { merge, combineLatest } from 'rxjs';\nconst _c0 = [\"type\", \"range\", \"tuiSlider\", \"\"];\nconst _c1 = [\"tuiSliderThumbLabel\", \"\"];\nfunction TuiSliderThumbLabelComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nconst _c2 = [\"*\", [[\"input\", \"type\", \"range\"]]];\nconst _c3 = [\"*\", \"input[type=range]\"];\nconst TUI_SLIDER_DEFAULT_OPTIONS = {\n size: `m`,\n trackColor: `var(--tui-base-03)`\n};\n/**\n * Default parameters for Slider component\n */\nconst TUI_SLIDER_OPTIONS = tuiCreateToken(TUI_SLIDER_DEFAULT_OPTIONS);\nfunction tuiSliderOptionsProvider(options) {\n return tuiProvideOptions(TUI_SLIDER_OPTIONS, options, TUI_SLIDER_DEFAULT_OPTIONS);\n}\nlet TuiSliderComponent = /*#__PURE__*/(() => {\n class TuiSliderComponent {\n constructor(control, cdr, options, el, userAgent, injector) {\n var _a;\n this.control = control;\n this.options = options;\n this.el = el;\n this.userAgent = userAgent;\n this.injector = injector;\n this.size = this.options.size;\n this.segments = 1;\n if (control instanceof NgModel) {\n /**\n * The ValueAccessor.writeValue method is called twice on any value accessor during component initialization,\n * when a control is bound using [(ngModel)], first time with a phantom null value.\n * With `changeDetection: ChangeDetectionStrategy.OnPush` the second call of writeValue with real value don't re-render the view.\n * ___\n * See this {@link https://github.com/angular/angular/issues/14988 issue}\n */\n (_a = control.valueChanges) === null || _a === void 0 ? void 0 : _a.pipe(tuiWatch(cdr), take(1)).subscribe();\n }\n }\n get min() {\n return Number(this.el.nativeElement.min);\n }\n get max() {\n return Number(this.el.nativeElement.max || 100);\n }\n get step() {\n return Number(this.el.nativeElement.step) || 1;\n }\n get value() {\n const {\n el,\n control,\n hasKeySteps\n } = this;\n if (!hasKeySteps && control instanceof NgModel) {\n /**\n * If developer uses `[(ngModel)]` and programmatically change value,\n * the `el.nativeElement.value` is equal to the previous value at this moment.\n */\n return control.viewModel;\n }\n return Number(el.nativeElement.value) || 0;\n }\n set value(newValue) {\n this.el.nativeElement.value = `${newValue}`;\n }\n get valueRatio() {\n return (this.value - this.min) / (this.max - this.min) || 0;\n }\n get valuePercentage() {\n return 100 * this.valueRatio;\n }\n get segmentWidth() {\n return 100 / Math.max(1, this.segments);\n }\n // TODO: drop support of legacy Edge (EdgeHTML) in v4.x\n get isOldEdge() {\n return tuiIsEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent);\n }\n get hasKeySteps() {\n return Boolean(this.injector.get(TuiSliderKeyStepsDirective, null));\n }\n }\n TuiSliderComponent.ɵfac = function TuiSliderComponent_Factory(t) {\n return new (t || TuiSliderComponent)(i0.ɵɵdirectiveInject(NgControl, 10), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(TUI_SLIDER_OPTIONS), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(USER_AGENT), i0.ɵɵdirectiveInject(Injector));\n };\n TuiSliderComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiSliderComponent,\n selectors: [[\"input\", \"type\", \"range\", \"tuiSlider\", \"\"]],\n hostVars: 11,\n hostBindings: function TuiSliderComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"input\", function TuiSliderComponent_input_HostBindingHandler() {\n return 0;\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-size\", ctx.size);\n i0.ɵɵstyleProp(\"--tui-slider-track-color\", ctx.options.trackColor)(\"--tui-slider-fill-ratio\", ctx.valueRatio)(\"--tui-slider-fill-percentage\", ctx.valuePercentage, \"%\")(\"--tui-slider-segment-width\", ctx.segmentWidth, \"%\");\n i0.ɵɵclassProp(\"_old-edge\", ctx.isOldEdge);\n }\n },\n inputs: {\n size: \"size\",\n segments: \"segments\"\n },\n attrs: _c0,\n decls: 0,\n vars: 0,\n template: function TuiSliderComponent_Template(rf, ctx) {},\n styles: [\"[_nghost-%COMP%]{position:relative;display:block;width:100%;color:var(--tui-primary);cursor:pointer}[_nghost-%COMP%]:active{cursor:ew-resize}[_nghost-%COMP%]:disabled{opacity:var(--tui-disabled-opacity);cursor:auto}[data-size=s][_nghost-%COMP%]:not(:disabled):before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.25rem;left:calc(var(--tui-slider-fill-percentage) - var(--tui-slider-fill-ratio) * .5rem);width:.5rem;height:.5rem;border-radius:50%;transform:var(--tui-slider-thumb-transform, scale(1));content:\\\"\\\";cursor:ew-resize;background:currentColor;opacity:0}[data-size=s][_nghost-%COMP%]:active:before{opacity:.2;transform:var(--tui-slider-thumb-transform, scale(1)) scale(2.33)}[data-size=m][_nghost-%COMP%]:not(:disabled):before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.125rem;left:calc(var(--tui-slider-fill-percentage) - var(--tui-slider-fill-ratio) * .75rem);width:.75rem;height:.75rem;border-radius:50%;transform:var(--tui-slider-thumb-transform, scale(1));content:\\\"\\\";cursor:ew-resize;background:currentColor;opacity:0}[data-size=m][_nghost-%COMP%]:active:before{opacity:.2;transform:var(--tui-slider-thumb-transform, scale(1)) scale(2.33)}[_nghost-%COMP%]:not(._old-edge){-webkit-appearance:none;-moz-appearance:none;appearance:none;height:.125rem;padding:.4375rem 0;background-color:transparent;background-clip:content-box;outline:none;border-radius:var(--tui-radius-m)}[_nghost-%COMP%]:not(._old-edge)::-webkit-slider-container{border-radius:inherit}[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-runnable-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .5rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor var(--tui-slider-fill-percentage),transparent var(--tui-slider-fill-percentage));background-position-x:0,.25rem,0;background-size:calc(100% - .75rem),calc(100% - .75rem),auto}[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-runnable-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor var(--tui-slider-fill-percentage),transparent var(--tui-slider-fill-percentage));background-position-x:0,.125rem,0;background-size:calc(100% - .5rem),calc(100% - .5rem),auto}[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .5rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.25rem;background-size:calc(100% - .75rem)}[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.125rem;background-size:calc(100% - .5rem)}[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb{-webkit-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;height:.75rem;width:.75rem;box-sizing:content-box;background-clip:content-box;border:.125rem solid transparent;border-left:0;border-right:0;transform:var(--tui-slider-thumb-transform, scale(1));margin-top:-.4375rem}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb:hover{background-color:var(--tui-primary-hover)}:active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb{background-color:var(--tui-primary-active)}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb:hover, :active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:focus-visible[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb{-webkit-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;height:.5rem;width:.5rem;box-sizing:content-box;background-clip:content-box;border:.25rem solid transparent;border-left:0;border-right:0;transform:var(--tui-slider-thumb-transform, scale(1));margin-top:-.4375rem}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb:hover{background-color:var(--tui-primary-hover)}:active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb{background-color:var(--tui-primary-active)}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb:hover, :active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.5)}:focus-visible[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb{-moz-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-moz-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;height:.75rem;width:.75rem;box-sizing:content-box;background-clip:content-box;border:.125rem solid transparent;border-left:0;border-right:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb{cursor:ew-resize}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb:hover{background-color:var(--tui-primary-hover)}:active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb{background-color:var(--tui-primary-active)}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb:hover, :active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:focus-visible[_nghost-%COMP%]:not(._old-edge)[data-size=m]::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb{-moz-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-moz-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;height:.5rem;width:.5rem;box-sizing:content-box;background-clip:content-box;border:.25rem solid transparent;border-left:0;border-right:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb{cursor:ew-resize}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb:hover{background-color:var(--tui-primary-hover)}:active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb{background-color:var(--tui-primary-active)}:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb:hover, :active:not(:disabled)[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.5)}:focus-visible[_nghost-%COMP%]:not(._old-edge)[data-size=s]::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}[_nghost-%COMP%]:not(._old-edge)::-moz-range-progress{border-radius:inherit}[_nghost-%COMP%]:not(._old-edge)::-moz-range-progress{height:.125rem;background:currentColor;border-top-right-radius:0;border-bottom-right-radius:0}._old-edge[_nghost-%COMP%]::-ms-thumb{background:currentColor;border-radius:50%}._old-edge[_nghost-%COMP%]::-ms-fill-lower{background:currentColor}._old-edge[_nghost-%COMP%]::-ms-track{background:var(--tui-slider-track-color);border:none}\"],\n changeDetection: 0\n });\n __decorate([tuiPure], TuiSliderComponent.prototype, \"hasKeySteps\", null);\n return TuiSliderComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiSliderKeyStepsDirective = /*#__PURE__*/(() => {\n class TuiSliderKeyStepsDirective extends AbstractTuiControl {\n constructor(control, cdr, el, slider) {\n super(control, cdr);\n this.el = el;\n this.slider = slider;\n }\n get nativeFocusableElement() {\n return this.computedDisabled ? null : this.el.nativeElement;\n }\n get focused() {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n get min() {\n return this.keySteps[0][1];\n }\n get max() {\n return this.keySteps[this.keySteps.length - 1][1];\n }\n updateControlValue() {\n this.value = tuiPercentageToKeyStepValue(this.slider.valuePercentage, this.keySteps);\n }\n writeValue(controlValue) {\n if (controlValue === null) {\n return;\n }\n const clampedControlValue = tuiClamp(controlValue, this.min, this.max);\n ngDevMode && tuiAssert.assert(controlValue === clampedControlValue, '\\n[SliderKeySteps]: You cannot programmatically set value which is less/more than min/max');\n this.slider.value = this.transformToNativeValue(clampedControlValue);\n }\n getFallbackValue() {\n return 0;\n }\n transformToNativeValue(controlValue) {\n const {\n min,\n max\n } = this.slider;\n const newValuePercentage = tuiKeyStepValueToPercentage(controlValue, this.keySteps);\n return newValuePercentage * (max - min) / 100 + min;\n }\n }\n TuiSliderKeyStepsDirective.ɵfac = function TuiSliderKeyStepsDirective_Factory(t) {\n return new (t || TuiSliderKeyStepsDirective)(i0.ɵɵdirectiveInject(NgControl, 10), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(forwardRef(() => TuiSliderComponent)));\n };\n TuiSliderKeyStepsDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiSliderKeyStepsDirective,\n selectors: [[\"input\", \"tuiSlider\", \"\", \"keySteps\", \"\"]],\n hostVars: 4,\n hostBindings: function TuiSliderKeyStepsDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"input\", function TuiSliderKeyStepsDirective_input_HostBindingHandler() {\n return ctx.updateControlValue();\n })(\"change\", function TuiSliderKeyStepsDirective_change_HostBindingHandler() {\n return ctx.updateControlValue();\n });\n }\n if (rf & 2) {\n i0.ɵɵhostProperty(\"disabled\", ctx.computedDisabled);\n i0.ɵɵattribute(\"aria-valuenow\", ctx.safeCurrentValue)(\"aria-valuemin\", ctx.min)(\"aria-valuemax\", ctx.max);\n }\n },\n inputs: {\n keySteps: \"keySteps\"\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return TuiSliderKeyStepsDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst SLIDER_INTERACTION_KEYS = new Set(['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown']);\n/**\n * Native doesn't work.\n * This directive imitates this native behaviour.\n */\nlet TuiSliderReadonlyDirective = /*#__PURE__*/(() => {\n class TuiSliderReadonlyDirective {\n constructor(el, doc, destroy$) {\n this.readonly = true;\n const touchStart$ = tuiTypedFromEvent(el.nativeElement, 'touchstart', {\n passive: false\n });\n const touchMove$ = tuiTypedFromEvent(doc, 'touchmove', {\n passive: false\n });\n const touchEnd$ = tuiTypedFromEvent(doc, 'touchend', {\n passive: true\n });\n const shouldPreventMove$ = merge(touchStart$.pipe(tap(e => this.preventEvent(e)), map(ALWAYS_TRUE_HANDLER)), touchEnd$.pipe(map(ALWAYS_FALSE_HANDLER)));\n /**\n * @bad TODO think about another solution.\n * Keep in mind that preventing touch event (on slider) inside `@HostListener('touchstart')` doesn't work for mobile chrome.\n */\n combineLatest([touchMove$, shouldPreventMove$]).pipe(filter(([_, shouldPreventMove]) => shouldPreventMove), takeUntil(destroy$)).subscribe(([moveEvent]) => this.preventEvent(moveEvent));\n }\n preventEvent(event) {\n if (event.cancelable && tuiCoerceBooleanProperty(this.readonly)) {\n event.preventDefault();\n }\n }\n preventKeyboardInteraction(event) {\n if (SLIDER_INTERACTION_KEYS.has(event.key)) {\n this.preventEvent(event);\n }\n }\n }\n TuiSliderReadonlyDirective.ɵfac = function TuiSliderReadonlyDirective_Factory(t) {\n return new (t || TuiSliderReadonlyDirective)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(TuiDestroyService, 2));\n };\n TuiSliderReadonlyDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiSliderReadonlyDirective,\n selectors: [[\"input\", \"tuiSlider\", \"\", \"readonly\", \"\"]],\n hostBindings: function TuiSliderReadonlyDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mousedown\", function TuiSliderReadonlyDirective_mousedown_HostBindingHandler($event) {\n return ctx.preventEvent($event);\n })(\"keydown\", function TuiSliderReadonlyDirective_keydown_HostBindingHandler($event) {\n return ctx.preventKeyboardInteraction($event);\n });\n }\n },\n inputs: {\n readonly: \"readonly\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])]\n });\n return TuiSliderReadonlyDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiSliderThumbLabelComponent = /*#__PURE__*/(() => {\n class TuiSliderThumbLabelComponent {\n get size() {\n var _a;\n return ((_a = this.slider) === null || _a === void 0 ? void 0 : _a.size) || 'm';\n }\n get ratio() {\n var _a;\n return ((_a = this.slider) === null || _a === void 0 ? void 0 : _a.valueRatio) || 0;\n }\n get ghostLeft() {\n var _a;\n return this.ratio * (((_a = this.slider) === null || _a === void 0 ? void 0 : _a.el.nativeElement.offsetWidth) || 0);\n }\n ngAfterContentInit() {\n var _a;\n ngDevMode && tuiAssert.assert(Boolean((_a = this.control) === null || _a === void 0 ? void 0 : _a.valueChanges), '\\n[tuiSliderThumbLabel] expected to use Angular Forms.\\n' + 'Use [(ngModel)] or [formControl] or formControlName for correct work.');\n }\n }\n TuiSliderThumbLabelComponent.ɵfac = function TuiSliderThumbLabelComponent_Factory(t) {\n return new (t || TuiSliderThumbLabelComponent)();\n };\n TuiSliderThumbLabelComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiSliderThumbLabelComponent,\n selectors: [[\"\", \"tuiSliderThumbLabel\", \"\"]],\n contentQueries: function TuiSliderThumbLabelComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, TuiSliderComponent, 5);\n i0.ɵɵcontentQuery(dirIndex, NgControl, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.slider = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.control = _t.first);\n }\n },\n attrs: _c1,\n ngContentSelectors: _c3,\n decls: 5,\n vars: 8,\n consts: [[4, \"ngIf\"], [1, \"t-ghost\"]],\n template: function TuiSliderThumbLabelComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c2);\n i0.ɵɵtemplate(0, TuiSliderThumbLabelComponent_ng_container_0_Template, 1, 0, \"ng-container\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵelementStart(2, \"div\", 1);\n i0.ɵɵprojection(3);\n i0.ɵɵelementEnd();\n i0.ɵɵprojection(4, 1);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 6, ctx.control == null ? null : ctx.control.valueChanges));\n i0.ɵɵadvance(2);\n i0.ɵɵstyleProp(\"--tui-slider-thumb-ratio\", ctx.ratio)(\"left\", ctx.ghostLeft, \"px\");\n i0.ɵɵattribute(\"data-size\", ctx.size);\n }\n },\n dependencies: [i1$2.NgIf, i1$2.AsyncPipe],\n styles: [\"[_nghost-%COMP%]{position:relative}.t-ghost[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;margin:auto;border-radius:50%;pointer-events:none}.t-ghost[data-size=s][_ngcontent-%COMP%]{width:.5rem;height:.5rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.5rem))}.t-ghost[data-size=m][_ngcontent-%COMP%]{width:.75rem;height:.75rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.75rem))}\"],\n changeDetection: 0\n });\n return TuiSliderThumbLabelComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiSliderModule = /*#__PURE__*/(() => {\n class TuiSliderModule {}\n TuiSliderModule.ɵfac = function TuiSliderModule_Factory(t) {\n return new (t || TuiSliderModule)();\n };\n TuiSliderModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiSliderModule\n });\n TuiSliderModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n });\n return TuiSliderModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_SLIDER_DEFAULT_OPTIONS, TUI_SLIDER_OPTIONS, TuiSliderComponent, TuiSliderKeyStepsDirective, TuiSliderModule, TuiSliderReadonlyDirective, TuiSliderThumbLabelComponent, tuiSliderOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, HostBinding, NgModule } from '@angular/core';\nimport * as i5 from '@angular/forms';\nimport { NgControl } from '@angular/forms';\nimport * as i4 from '@taiga-ui/cdk';\nimport { tuiCreateToken, tuiProvideOptions, AbstractTuiControl, tuiIsNativeFocused, tuiAsFocusableItemAccessor, tuiAsControl, TuiFocusedModule, TuiFocusableModule, TuiPressedModule, TuiFocusVisibleModule, TuiCheckedModule } from '@taiga-ui/cdk';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiAppearance, TuiModeDirective, TuiWrapperModule, TuiSvgModule, TuiLoaderModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\n\n/** Default values for the toggle options. */\nconst _c0 = [\"focusableElement\"];\nfunction TuiToggleComponent_tui_loader_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-loader\", 7);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"inheritColor\", true)(\"showLoader\", ctx_r0.value)(\"size\", ctx_r0.loaderSize);\n }\n}\nfunction TuiToggleComponent_span_3_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 10);\n }\n if (rf & 2) {\n const src_r6 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r6);\n }\n}\nconst _c1 = a0 => ({\n $implicit: a0\n});\nfunction TuiToggleComponent_span_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 8);\n i0.ɵɵtemplate(1, TuiToggleComponent_span_3_tui_svg_1_Template, 1, 1, \"tui-svg\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.iconOn)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c1, ctx_r1.size));\n }\n}\nfunction TuiToggleComponent_tui_loader_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-loader\", 7);\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"inheritColor\", true)(\"showLoader\", !ctx_r2.value)(\"size\", ctx_r2.loaderSize);\n }\n}\nfunction TuiToggleComponent_span_6_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 12);\n }\n if (rf & 2) {\n const src_r8 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r8);\n }\n}\nfunction TuiToggleComponent_span_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 8);\n i0.ɵɵtemplate(1, TuiToggleComponent_span_6_tui_svg_1_Template, 1, 1, \"tui-svg\", 11);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r3.iconOff)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c1, ctx_r3.size));\n }\n}\nconst TUI_TOGGLE_DEFAULT_OPTIONS = {\n icons: {\n toggleOff({\n $implicit\n }) {\n return $implicit === `m` ? `tuiIconToggleOff` : `tuiIconToggleOffLarge`;\n },\n toggleOn({\n $implicit\n }) {\n return $implicit === `m` ? `tuiIconToggleOn` : `tuiIconToggleOnLarge`;\n }\n },\n appearances: {\n checked: TuiAppearance.Primary,\n unchecked: TuiAppearance.Secondary\n },\n singleColor: false,\n showIcons: false,\n size: `m`\n};\n/**\n * Default parameters for Toggle component\n */\nconst TUI_TOGGLE_OPTIONS = tuiCreateToken(TUI_TOGGLE_DEFAULT_OPTIONS);\nfunction tuiToggleOptionsProvider(options) {\n return tuiProvideOptions(TUI_TOGGLE_OPTIONS, options, TUI_TOGGLE_DEFAULT_OPTIONS);\n}\nlet TuiToggleComponent = /*#__PURE__*/(() => {\n class TuiToggleComponent extends AbstractTuiControl {\n constructor(control, cdr, modeDirective, options) {\n super(control, cdr);\n this.modeDirective = modeDirective;\n this.options = options;\n this.singleColor = this.options.singleColor;\n this.showIcons = this.options.showIcons;\n this.showLoader = false;\n this.size = this.options.size;\n }\n get iconOn() {\n return this.options.icons.toggleOn;\n }\n get iconOff() {\n return this.options.icons.toggleOff;\n }\n get nativeFocusableElement() {\n var _a, _b;\n return (_b = (_a = this.focusableElement) === null || _a === void 0 ? void 0 : _a.nativeElement) !== null && _b !== void 0 ? _b : null;\n }\n get focused() {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n get appearance() {\n return this.singleColor || this.value ? this.options.appearances.checked : this.options.appearances.unchecked;\n }\n get sizeM() {\n return this.size === 'm';\n }\n get loaderSize() {\n return this.sizeM ? 'xs' : 's';\n }\n get hostMode() {\n var _a, _b;\n return (_b = (_a = this.modeDirective) === null || _a === void 0 ? void 0 : _a.mode) !== null && _b !== void 0 ? _b : null;\n }\n /** @deprecated use 'value' setter */\n onChecked(checked) {\n this.value = checked;\n }\n onFocused(focused) {\n this.updateFocused(focused);\n }\n onFocusVisible(focusVisible) {\n this.updateFocusVisible(focusVisible);\n }\n getFallbackValue() {\n return false;\n }\n }\n TuiToggleComponent.ɵfac = function TuiToggleComponent_Factory(t) {\n return new (t || TuiToggleComponent)(i0.ɵɵdirectiveInject(NgControl, 10), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(TuiModeDirective, 8), i0.ɵɵdirectiveInject(TUI_TOGGLE_OPTIONS));\n };\n TuiToggleComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiToggleComponent,\n selectors: [[\"tui-toggle\"]],\n viewQuery: function TuiToggleComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusableElement = _t.first);\n }\n },\n hostVars: 4,\n hostBindings: function TuiToggleComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"data-size\", ctx.size)(\"data-mode\", ctx.hostMode);\n i0.ɵɵclassProp(\"_checked\", ctx.value);\n }\n },\n inputs: {\n singleColor: \"singleColor\",\n showIcons: \"showIcons\",\n showLoader: \"showLoader\",\n size: \"size\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiToggleComponent), tuiAsControl(TuiToggleComponent)]), i0.ɵɵInheritDefinitionFeature],\n decls: 9,\n vars: 16,\n consts: [[\"tuiWrapper\", \"\", 3, \"active\", \"appearance\", \"disabled\", \"focus\", \"hover\", \"invalid\", \"readOnly\"], [1, \"t-toggle\"], [\"class\", \"t-loader\", 3, \"inheritColor\", \"showLoader\", \"size\", 4, \"ngIf\"], [\"class\", \"t-icon-wrapper\", 4, \"ngIf\"], [1, \"t-circle\"], [\"automation-id\", \"tui-toggle__checkbox\", \"role\", \"switch\", \"type\", \"checkbox\", 1, \"t-checkbox\", 3, \"disabled\", \"id\", \"tuiFocusable\", \"tuiChecked\", \"tuiCheckedChange\", \"tuiFocusedChange\", \"tuiFocusVisibleChange\"], [\"focusableElement\", \"\"], [1, \"t-loader\", 3, \"inheritColor\", \"showLoader\", \"size\"], [1, \"t-icon-wrapper\"], [\"automation-id\", \"tui-toggle__check-icon\", \"class\", \"t-icon\", 3, \"src\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [\"automation-id\", \"tui-toggle__check-icon\", 1, \"t-icon\", 3, \"src\"], [\"automation-id\", \"tui-toggle__cancel-icon\", \"class\", \"t-icon t-icon_off\", 3, \"src\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [\"automation-id\", \"tui-toggle__cancel-icon\", 1, \"t-icon\", \"t-icon_off\", 3, \"src\"]],\n template: function TuiToggleComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0)(1, \"div\", 1);\n i0.ɵɵtemplate(2, TuiToggleComponent_tui_loader_2_Template, 1, 3, \"tui-loader\", 2)(3, TuiToggleComponent_span_3_Template, 2, 4, \"span\", 3);\n i0.ɵɵelement(4, \"div\", 4);\n i0.ɵɵtemplate(5, TuiToggleComponent_tui_loader_5_Template, 1, 3, \"tui-loader\", 2)(6, TuiToggleComponent_span_6_Template, 2, 4, \"span\", 3);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(7, \"input\", 5, 6);\n i0.ɵɵlistener(\"tuiCheckedChange\", function TuiToggleComponent_Template_input_tuiCheckedChange_7_listener($event) {\n return ctx.value = $event;\n })(\"tuiFocusedChange\", function TuiToggleComponent_Template_input_tuiFocusedChange_7_listener($event) {\n return ctx.onFocused($event);\n })(\"tuiFocusVisibleChange\", function TuiToggleComponent_Template_input_tuiFocusVisibleChange_7_listener($event) {\n return ctx.onFocusVisible($event);\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"active\", ctx.pseudoActive)(\"appearance\", ctx.appearance)(\"disabled\", ctx.computedDisabled)(\"focus\", ctx.computedFocusVisible)(\"hover\", ctx.pseudoHover)(\"invalid\", ctx.computedInvalid)(\"readOnly\", ctx.readOnly);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.showLoader);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.showIcons && !ctx.showLoader);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.showLoader);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.showIcons && !ctx.showLoader);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"disabled\", ctx.disabled)(\"id\", ctx.id)(\"tuiFocusable\", ctx.focusable)(\"tuiChecked\", ctx.value);\n i0.ɵɵattribute(\"aria-checked\", ctx.value);\n }\n },\n dependencies: [i1.TuiLoaderComponent, i1.TuiSvgComponent, i1.TuiWrapperDirective, i2.NgIf, i3.PolymorpheusOutletDirective, i4.TuiCheckedDirective, i4.TuiFocusableDirective, i4.TuiFocusedDirective, i4.TuiFocusVisibleDirective],\n styles: [\"[_nghost-%COMP%]{position:relative;display:inline-block;vertical-align:middle;overflow:hidden;border-radius:6.25rem}[data-size=m][_nghost-%COMP%]{width:2rem;height:1rem}[data-size=l][_nghost-%COMP%]{width:3rem;height:1.5rem}.t-checkbox[_ngcontent-%COMP%]{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;height:100%;width:100%;opacity:0;cursor:pointer}.t-checkbox[_ngcontent-%COMP%]:-webkit-autofill, .t-checkbox[_ngcontent-%COMP%]:-webkit-autofill:hover, .t-checkbox[_ngcontent-%COMP%]:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}._disabled[_nghost-%COMP%] .t-checkbox[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.t-toggle[_ngcontent-%COMP%]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;align-items:center;justify-content:center}[data-size=m][_nghost-%COMP%] .t-toggle[_ngcontent-%COMP%]{width:3rem;height:1rem;transform:translate(-1rem)}[data-size=l][_nghost-%COMP%] .t-toggle[_ngcontent-%COMP%]{width:4.5rem;height:1.5rem;transform:translate(-1.5rem)}._checked[_nghost-%COMP%] .t-toggle[_ngcontent-%COMP%]{transform:translate(0)}.t-circle[_ngcontent-%COMP%]{margin:.125rem 0;flex-shrink:0;border-radius:100%;background-color:var(--tui-base-01)}._disabled[_nghost-%COMP%] .t-circle_light[_ngcontent-%COMP%]{opacity:.24}[data-size=m][_nghost-%COMP%] .t-circle[_ngcontent-%COMP%]{width:.75rem;height:.75rem}[data-size=l][_nghost-%COMP%] .t-circle[_ngcontent-%COMP%]{width:1rem;height:1rem}._disabled[_nghost-%COMP%] .t-circle[_ngcontent-%COMP%]{background-color:var(--tui-base-01)}.t-loader[_ngcontent-%COMP%]{min-width:auto}[_nghost-%COMP%]:not(._checked) .t-loader[_ngcontent-%COMP%]{color:var(--tui-base-06)}[_nghost-%COMP%]:not(._checked)._disabled .t-loader[_ngcontent-%COMP%]{color:var(--tui-base-05)}[_nghost-%COMP%]:not(._checked)[data-mode=onDark] .t-loader[_ngcontent-%COMP%]{color:var(--tui-text-03-night)}[_nghost-%COMP%]:not(._checked)[data-mode=onDark]._disabled .t-loader[_ngcontent-%COMP%]{color:var(--tui-clear-inverse-active)}[_nghost-%COMP%]:not(._checked)[data-mode=onLight] .t-loader[_ngcontent-%COMP%]{color:var(--tui-text-03)}[_nghost-%COMP%]:not(._checked)[data-mode=onLight]._disabled .t-loader[_ngcontent-%COMP%]{color:var(--tui-clear-active)}[data-size=m][_nghost-%COMP%] .t-loader[_ngcontent-%COMP%]{width:.75rem;margin:0 .2rem;transform:scale(.75)}[data-size=l][_nghost-%COMP%] .t-loader[_ngcontent-%COMP%]{width:1rem;margin:0 .25rem}.t-icon-wrapper[_ngcontent-%COMP%]{display:flex}.t-icon[_ngcontent-%COMP%]{opacity:.8}.t-icon_off[_ngcontent-%COMP%]{color:var(--tui-base-06)}._disabled[_nghost-%COMP%] .t-icon_off[_ngcontent-%COMP%]{color:var(--tui-base-05)}[data-mode=onDark][_nghost-%COMP%] .t-icon_off[_ngcontent-%COMP%]{color:var(--tui-text-03-night)}[data-mode=onDark]._disabled[_nghost-%COMP%] .t-icon_off[_ngcontent-%COMP%]{color:var(--tui-clear-inverse-active)}[data-mode=onLight][_nghost-%COMP%] .t-icon_off[_ngcontent-%COMP%]{color:var(--tui-text-03)}[data-mode=onLight]._disabled[_nghost-%COMP%] .t-icon_off[_ngcontent-%COMP%]{color:var(--tui-clear-active)}[data-size=m][_nghost-%COMP%] .t-icon[_ngcontent-%COMP%]{width:1rem;height:1rem;transform:scale(.75)}[data-size=l][_nghost-%COMP%] .t-icon[_ngcontent-%COMP%]{margin:0 .125rem;width:1.5rem;height:1.5rem}[_nghost-%COMP%]:hover .t-icon[_ngcontent-%COMP%]{opacity:1}\"],\n changeDetection: 0\n });\n return TuiToggleComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiToggleModule = /*#__PURE__*/(() => {\n class TuiToggleModule {}\n TuiToggleModule.ɵfac = function TuiToggleModule_Factory(t) {\n return new (t || TuiToggleModule)();\n };\n TuiToggleModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiToggleModule\n });\n TuiToggleModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiFocusedModule, TuiFocusableModule, TuiPressedModule, TuiFocusVisibleModule, TuiCheckedModule, TuiWrapperModule, TuiSvgModule, TuiLoaderModule, PolymorpheusModule]]\n });\n return TuiToggleModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_TOGGLE_DEFAULT_OPTIONS, TUI_TOGGLE_OPTIONS, TuiToggleComponent, TuiToggleModule, tuiToggleOptionsProvider };\n","import {CommonModule} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n inject,\n SecurityContext,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiDay} from '@taiga-ui/cdk';\nimport {\n TuiButtonModule,\n TuiCalendarModule,\n TuiDialogService,\n TuiDropdownModule,\n TuiHintModule,\n TuiLinkModule,\n TuiSvgModule,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {\n TuiCheckboxLabeledModule,\n TuiInputDateModule,\n TuiInputTagModule,\n TuiPushModule,\n TuiSliderModule,\n TuiToggleModule,\n} from '@taiga-ui/kit';\nimport {NgDompurifyModule, NgDompurifySanitizer} from '@tinkoff/ng-dompurify';\n\n@Component({\n standalone: true,\n selector: 'home',\n imports: [\n CommonModule,\n FormsModule,\n TuiInputTagModule,\n TuiToggleModule,\n TuiCalendarModule,\n TuiTextfieldControllerModule,\n TuiInputDateModule,\n TuiCheckboxLabeledModule,\n TuiButtonModule,\n TuiHintModule,\n TuiSliderModule,\n TuiSvgModule,\n TuiPushModule,\n TuiLinkModule,\n TuiDropdownModule,\n NgDompurifyModule,\n ],\n templateUrl: './home.component.html',\n styleUrls: ['./home.component.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HomeComponent {\n private readonly dompurifySanitizer = inject(NgDompurifySanitizer);\n private readonly dialogs = inject(TuiDialogService);\n private readonly cd = inject(ChangeDetectorRef);\n\n readonly labels = ['New', 'Read', 'Archived', 'Junk'];\n tags = ['Angular', 'Open source'];\n date: TuiDay | null = null;\n notification = false;\n slider = 80;\n\n onDay(date: TuiDay): void {\n this.date = date;\n }\n\n call(content: TemplateRef): void {\n this.dialogs\n .open(content, {\n appearance: 'call',\n closeable: false,\n dismissible: false,\n })\n .subscribe();\n }\n\n toggle(open: boolean): void {\n this.notification = open;\n this.cd.detectChanges();\n }\n\n purify(value: string): string {\n return this.dompurifySanitizer.sanitize(SecurityContext.HTML, value);\n }\n}\n","

\n Dozens of\n
\n components\n

\n\n\n\n any use case')\">\n\n\n
\n
\n \n Choose date\n \n \n
\n
\n \n {{ label }}\n \n
\n
\n \n \n
\n \n \n \n
\n
\n
\n\n\n
\n
\n \n

Aleksandr Inkin

\n
\n\n
\n \n \n
\n
\n\n\n\n \n I have a bad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StyleComponent","t","ɵɵdefineComponent","rf","ctx","TuiAutofilledDirective","directiveStyles","EventEmitter","propertyName","target","_a","ɵɵdirectiveInject","TuiDirectiveStylesService","ɵɵdefineDirective","ɵɵlistener","$event","ɵɵclassProp","TuiAutofilledModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiCheckedDirective","EventEmitter","checked","t","ɵɵdefineDirective","rf","ctx","ɵɵlistener","$event","ɵɵhostProperty","TuiCheckedModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiFocusVisibleDirective","tuiFocusVisibleChange","t","ɵɵdirectiveInject","TuiFocusVisibleService","ɵɵdefineDirective","ɵɵProvidersFeature","TuiDestroyService","TuiFocusVisibleModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiFocusableDirective","t","ɵɵdefineDirective","rf","ctx","ɵɵhostProperty","TuiFocusableModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiFocusedDirective","nativeElement","zone","merge","tuiTypedFromEvent","map","tuiIsNativeFocused","startWith","distinctUntilChanged","skip","tuiZoneOptimized","t","ɵɵdirectiveInject","ElementRef","NgZone","ɵɵdefineDirective","TuiFocusedModule","ɵɵdefineNgModule","ɵɵdefineInjector","movedOut","currentTarget","relatedTarget","tuiIsElement","TuiHoveredService","Observable","el","zone","subscriber","merge","tuiTypedFromEvent","map","ALWAYS_TRUE_HANDLER","ALWAYS_FALSE_HANDLER","filter","distinctUntilChanged","tuiZoneOptimized","t","ɵɵinject","ElementRef","NgZone","ɵɵdefineInjectable","TuiHoveredDirective","tuiHoveredChange","ɵɵdirectiveInject","ɵɵdefineDirective","ɵɵProvidersFeature","TuiHoveredModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiObscuredDirective","activeZone","obscured$","Subject","mapped$","map","obscuredBy","element","tuiIfMap","enabled","t","ɵɵdirectiveInject","TuiActiveZoneDirective","TuiObscuredService","ɵɵdefineDirective","ɵɵProvidersFeature","TuiParentsScrollService","TuiDestroyService","TuiObscuredModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiPressedDirective","el","takeOnlyTrustedEvents","tuiPressedObservable","t","ɵɵdirectiveInject","ElementRef","TUI_TAKE_ONLY_TRUSTED_EVENTS","ɵɵdefineDirective","TuiPressedModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiPreventDefaultDirective","el","zone","destroy$","fromEvent","tuiZonefree","tuiPreventDefault","takeUntil","t","ɵɵdirectiveInject","ElementRef","NgZone","TuiDestroyService","ɵɵdefineDirective","ɵɵProvidersFeature","TuiPreventDefaultModule","ɵɵdefineNgModule","ɵɵdefineInjector","MAX_VALUE","TuiRepeatTimesContext","$implicit","TuiRepeatTimesDirective","viewContainer","templateRef","count","safeCount","tuiClamp","length","index","amount","t","ɵɵdirectiveInject","ViewContainerRef","TemplateRef","ɵɵdefineDirective","TuiRepeatTimesModule","ɵɵdefineNgModule","ɵɵdefineInjector","tuiDateClamp","date","min","max","DAYS_IN_WEEK","MONTHS_IN_YEAR","MIN_DAY","MIN_MONTH","MAX_MONTH","MIN_YEAR","MAX_YEAR","RANGE_SEPARATOR_CHAR","CHAR_NO_BREAK_SPACE","CHAR_EN_DASH","MILLISECONDS_IN_SECOND","SECONDS_IN_MINUTE","MINUTES_IN_HOUR","HOURS_IN_DAY","MILLISECONDS_IN_MINUTE","MILLISECONDS_IN_HOUR","MILLISECONDS_IN_DAY","DATE_FILLER_LENGTH","DATE_RANGE_FILLER_LENGTH","TUI_DATE_FORMAT","tuiCreateToken","TUI_DATE_SEPARATOR","changeDateSeparator","dateString","newDateSeparator","TuiYear","_TuiYear","year","tuiInRange","from","to","tuiNormalizeToIntNumber","resultYear","hint","TuiMonth","_TuiMonth","month","isLeapYear","TuiMonthNumber","nativeDate","absoluteFrom","another","totalMonths","TuiDay","_TuiDay","day","date","normalizedYear","normalizedMonth","normalizedDay","dateMode","rawDate","yearMonthDayString","TuiInvalidYearException","TuiInvalidMonthException","TuiInvalidDayException","monthDaysCount","dayOfWeek","TuiDayOfWeek","startFromMonday","min","max","years","months","days","dateFormat","separator","dd","mm","yyyy","TuiMonthRange","_TuiMonthRange","month1","month2","TuiDayRange","_TuiDayRange","day1","day2","rangeString","leftDay","dateSeparator","TUI_FIRST_DAY","TUI_LAST_DAY","TuiTime","_TuiTime","hours","minutes","seconds","ms","milliseconds","time","newMs","secondsToAdd","newSeconds","minutesToAdd","newMinutes","hoursToAdd","newHours","mode","needAddMs","needAddSeconds","digits","TuiScrollbarComponent_tui_scroll_controls_0_Template","rf","ctx","ɵɵelement","_c0","TuiScrollbarComponent","cssRef","el","userAgent","isIos","tuiIsFirefox","ElementRef","element","detail","_a","nativeElement","offsetTop","offsetLeft","tuiGetElementOffset","clientHeight","clientWidth","offsetHeight","offsetWidth","scrollTop","scrollLeft","t","ɵɵdirectiveInject","CSS","USER_AGENT","TUI_IS_IOS","ɵɵdefineComponent","rf","ctx","ɵɵlistener","$event","ɵɵclassProp","ɵɵProvidersFeature","TUI_SCROLL_REF","browserScrollRef","_c0","ɵɵprojectionDef","ɵɵtemplate","TuiScrollbarComponent_tui_scroll_controls_0_Template","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","ɵɵproperty","TuiScrollControlsComponent","NgIf","TuiScrollbarModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiScrollControlsModule","TuiDropdownComponent_div_3_Template","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","text_r2","ɵɵadvance","ɵɵtextInterpolate1","_c0","a0","TUI_DROPDOWN_COMPONENT","tuiCreateTokenFromFactory","TuiDropdownComponent","TuiDropdownOpenDirective","EventEmitter","open","_a","t","ɵɵdefineDirective","ɵɵNgOnChangesFeature","TuiDropdownDirective","destroy$","el","dropdown","injector","dropdownService","Subject","PolymorpheusComponent","throttleTime","takeUntil","_b","tuiCheckFixedPosition","show","ɵɵdirectiveInject","TuiDestroyService","ElementRef","INJECTOR","TuiDropdownPortalService","ɵɵProvidersFeature","tuiAsRectAccessor","tuiAsVehicle","__decorate","tuiPure","TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS","TUI_DROPDOWN_HOVER_OPTIONS","tuiCreateToken","TuiDropdownHoverDirective","TuiDriver","hovered$","options","parentHover","subscriber","Subject","merge","switchMap","visible","of","delay","tap","share","_a","t","ɵɵdirectiveInject","TuiHoveredService","TUI_DROPDOWN_HOVER_OPTIONS","ɵɵdefineDirective","ɵɵProvidersFeature","tuiAsDriver","ɵɵInheritDefinitionFeature","TUI_DROPDOWN_DEFAULT_OPTIONS","TUI_DROPDOWN_OPTIONS","tuiCreateToken","tuiDropdownOptionsProvider","override","Optional","TuiDropdownOptionsDirective","SkipSelf","tuiOverrideOptions","forwardRef","TuiDropdownComponent","visualViewportService","position$","destroy$","directive","animation","el","accessor","win","mode$","hoverDirective","map","point","takeUntil","top","left","hovered","style","right","maxHeight","offset","innerHeight","clientRect","position","rect","offsetX","offsetY","available","tuiPx","width","previous","nativeElement","ownerDocument","root","focusable","tuiGetClosestFocusable","TuiVisualViewportService","TuiPositionService","TuiDestroyService","TuiDropdownDirective","TUI_ANIMATION_OPTIONS","ElementRef","TuiRectAccessor","WINDOW","TUI_MODE","ɵɵdefineComponent","rf","ctx","ɵɵlistener","ɵɵattribute","ɵɵsyntheticHostProperty","tuiPositionAccessorFor","tuiRectAccessorFor","MODE_PROVIDER","ɵɵelementStart","$event","ɵɵelementEnd","ɵɵtemplate","TuiDropdownComponent_div_3_Template","_r0","ɵɵreference","ɵɵadvance","ɵɵproperty","ɵɵpureFunction1","_c0","TuiScrollbarComponent","TuiActiveZoneDirective","TuiOverscrollDirective","TuiHoveredDirective","PolymorpheusOutletDirective","tuiDropdownAnimation","TuiDropdownDriverDirective","AbstractTuiDriverDirective","destroy$","drivers","vehicles","t","ɵɵdirectiveInject","TuiDestroyService","TuiDriver","TuiVehicle","ɵɵdefineDirective","ɵɵProvidersFeature","ɵɵInheritDefinitionFeature","TuiDropdownManualDirective","TuiDriver","subscriber","BehaviorSubject","t","ɵɵdefineDirective","ɵɵProvidersFeature","tuiAsDriver","ɵɵInheritDefinitionFeature","ɵɵNgOnChangesFeature","TuiDropdownPositionDirective","TuiPositionAccessor","options","viewport","accessors","directive","width","height","_a","_b","hostRect","EMPTY_CLIENT_RECT","viewportRect","minHeight","align","direction","offset","previous","available","right","left","position","better","tuiFallbackRectAccessor","ɵɵdirectiveInject","TUI_DROPDOWN_OPTIONS","TUI_VIEWPORT","TuiRectAccessor","TuiDropdownDirective","tuiAsPositionAccessor","__decorate","tuiPure","TuiDropdownPositionSidedDirective","vertical","rect","maxLeft","TuiDropdownModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","PolymorpheusModule","TuiActiveZoneModule","TuiOverscrollModule","TuiScrollbarModule","TuiHoveredModule","TuiHintComponent_span_1_Template","rf","ctx","ɵɵelement","text_r1","ɵɵproperty","ɵɵsanitizeHtml","_c0","TUI_HINT_COMPONENT","tuiCreateTokenFromFactory","TuiHintComponent","TUI_HINT_DEFAULT_OPTIONS","TUI_HINT_OPTIONS","tuiCreateToken","TuiHintOptionsDirective","AbstractTuiController","options","t","ɵɵdirectiveInject","TUI_HINT_OPTIONS","ɵɵdefineDirective","ɵɵProvidersFeature","forwardRef","ɵɵInheritDefinitionFeature","TuiHintDirective","el","component","hintService","activeZone","_a","show","ElementRef","PolymorpheusComponent","TuiHintService","TuiActiveZoneDirective","tuiAsRectAccessor","tuiAsVehicle","TUI_HINT_COMPONENT","INJECTOR","ɵɵNgOnChangesFeature","TuiHintHoverDirective","TuiDriver","hovered$","subscriber","Subject","merge","switchMap","visible","of","delay","takeUntil","repeat","filter","map","value","tuiIsObscured","tap","TuiHoveredService","tuiAsDriver","TuiHintPointerDirective","EMPTY_CLIENT_RECT","clientX","clientY","tuiPointToClientRect","ɵTuiHintPointerDirective_BaseFactory","ɵɵgetInheritedFactory","rf","ctx","ɵɵlistener","$event","GAP","TuiHintComponent","position$","destroy$","animation","pointer","accessor","polymorpheus","hover","mode","visualViewportService","viewport","point","top","left","target","height","width","style","rect","safeLeft","tuiClamp","beakTop","beakLeft","tuiPx","TuiPositionService","TuiDestroyService","TUI_ANIMATION_OPTIONS","TuiRectAccessor","POLYMORPHEUS_CONTEXT","TuiModeDirective","TuiVisualViewportService","TUI_VIEWPORT","ɵɵdefineComponent","ɵɵresolveDocument","ɵɵattribute","ɵɵsyntheticHostProperty","ɵɵclassProp","tuiPositionAccessorFor","tuiRectAccessorFor","_c0","ɵɵprojectionDef","ɵɵprojection","ɵɵtemplate","TuiHintComponent_span_1_Template","ɵɵadvance","ɵɵproperty","PolymorpheusOutletDirective","tuiFadeIn","__decorate","tuiPure","TuiHintDescribeDirective","zone","doc","ReplaySubject","tuiIfMap","tuiTypedFromEvent","tuiIsPresent","debounce","timer","startWith","distinctUntilChanged","skip","tuiZoneOptimized","tuiIsNativeFocused","NgZone","DOCUMENT","TuiHintDriverDirective","AbstractTuiDriverDirective","drivers","vehicles","TuiVehicle","OFFSET","ARROW_OFFSET","TOP","LEFT","TuiHintPositionDirective","TuiPositionAccessor","options","viewport","directive","accessors","TUI_HINT_DIRECTIONS","acc","direction","width","height","_a","_b","hostRect","EMPTY_CLIENT_RECT","leftCenter","topCenter","tuiFallbackRectAccessor","top","left","t","ɵɵdirectiveInject","TUI_HINT_OPTIONS","TUI_VIEWPORT","TuiHintDirective","TuiRectAccessor","ɵɵdefineDirective","ɵɵProvidersFeature","tuiAsPositionAccessor","ɵɵInheritDefinitionFeature","__decorate","tuiPure","TuiHintModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","PolymorpheusModule","TuiMaskAccessorDirective","t","ɵɵdefineDirective","ɵɵProvidersFeature","NG_VALUE_ACCESSOR","Optional","TUI_VALUE_ACCESSOR","DefaultValueAccessor","accessor","fallback","TuiMaskAccessorModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiScrollIntoViewDirective","el","destroy$","scroll","timer","takeUntil","TUI_SCROLL_INTO_VIEW","t","ɵɵdirectiveInject","ElementRef","TuiDestroyService","ɵɵdefineDirective","ɵɵProvidersFeature","TuiScrollIntoViewModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiTextfieldController","change$","options","legacyAppearance","appearanceDirective","cleanerDirective","customContentDirective","iconDirective","iconLeftDirective","labelOutsideDirective","sizeDirective","prefixDirective","postfixDirective","fillerDirective","TUI_TEXTFIELD_DEFAULT_OPTIONS","TUI_TEXTFIELD_OPTIONS","tuiCreateToken","TUI_TEXTFIELD_APPEARANCE_DIRECTIVE","tuiCreateTokenFromFactory","TuiTextfieldAppearanceDirective","AbstractTuiController","ɵTuiTextfieldAppearanceDirective_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineDirective","ɵɵProvidersFeature","forwardRef","ɵɵInheritDefinitionFeature","TUI_TEXTFIELD_CLEANER","TuiTextfieldCleanerDirective","ɵTuiTextfieldCleanerDirective_BaseFactory","TUI_TEXTFIELD_CUSTOM_CONTENT","TuiTextfieldCustomContentDirective","ɵTuiTextfieldCustomContentDirective_BaseFactory","TUI_TEXTFIELD_FILLER","TuiTextfieldFillerDirective","ɵTuiTextfieldFillerDirective_BaseFactory","TUI_TEXTFIELD_ICON","TuiTextfieldIconDirective","ɵTuiTextfieldIconDirective_BaseFactory","TUI_TEXTFIELD_ICON_LEFT","TuiTextfieldIconLeftDirective","ɵTuiTextfieldIconLeftDirective_BaseFactory","TUI_TEXTFIELD_LABEL_OUTSIDE","TuiTextfieldLabelOutsideDirective","ɵTuiTextfieldLabelOutsideDirective_BaseFactory","TUI_TEXTFIELD_POSTFIX","TuiTextfieldPostfixDirective","ɵTuiTextfieldPostfixDirective_BaseFactory","TUI_TEXTFIELD_PREFIX","TuiTextfieldPrefixDirective","ɵTuiTextfieldPrefixDirective_BaseFactory","TUI_TEXTFIELD_SIZE","TuiTextfieldSizeDirective","ɵTuiTextfieldSizeDirective_BaseFactory","TuiTextfieldControllerModule","ɵɵdefineNgModule","ɵɵdefineInjector","TUI_TEXTFIELD_WATCHED_CONTROLLER","InjectionToken","TEXTFIELD_CONTROLLER_PROVIDER","TuiDestroyService","ChangeDetectorRef","TUI_TEXTFIELD_OPTIONS","TUI_TEXTFIELD_APPEARANCE","cdr","destroy$","options","legacyAppearance","controllers","change$","merge","NEVER","tuiWatch","takeUntil","TuiTextfieldController","TuiPrimitiveYearPickerComponent_div_0_ng_container_1_div_1_Template","rf","ctx","_r7","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","item_r5","ɵɵrestoreView","ctx_r6","ɵɵnextContext","ɵɵresetView","$event","ctx_r8","ctx_r9","ɵɵtext","ɵɵelementEnd","ctx_r4","ɵɵclassProp","ɵɵproperty","ɵɵattribute","ɵɵadvance","ɵɵtextInterpolate","TuiPrimitiveYearPickerComponent_div_0_ng_container_1_Template","ɵɵelementContainerStart","ɵɵtemplate","ɵɵelementContainerEnd","colIndex_r3","rowIndex_r1","ctx_r2","TuiPrimitiveYearPickerComponent_div_0_Template","LIMIT","ITEMS_IN_ROW","TuiPrimitiveYearPickerComponent","TuiMonth","TUI_FIRST_DAY","TUI_LAST_DAY","ALWAYS_FALSE_HANDLER","EventEmitter","_a","initial","min","max","item","TuiMonthRange","rowIndex","colIndex","disabledItemHandler","pressedItem","hoveredItem","TuiInteractiveState","value","TuiYear","TuiRangeState","day","tuiInRange","hovered","pressed","t","ɵɵdefineComponent","TuiRepeatTimesDirective","TuiLetDirective","TuiScrollIntoViewDirective","TuiHoveredDirective","TuiPressedDirective","TuiPrimitiveYearPickerModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiHoveredModule","TuiPressedModule","TuiRepeatTimesModule","TuiLetModule","TuiScrollIntoViewModule","TuiPrimitiveSpinButtonComponent_ng_container_0_Template","rf","ctx","_r3","ɵɵgetCurrentView","ɵɵelementContainerStart","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r2","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","ɵɵprojection","ctx_r4","ɵɵelementContainerEnd","texts_r1","ctx_r0","ɵɵadvance","ɵɵclassProp","ɵɵproperty","_c0","TuiPrimitiveSpinButtonComponent","AbstractTuiInteractive","el","icons","spinTexts$","EventEmitter","tuiIsNativeFocusedIn","focused","focusVisible","t","ɵɵdirectiveInject","ElementRef","TUI_SPIN_ICONS","TUI_SPIN_TEXTS","ɵɵdefineComponent","ɵɵInheritDefinitionFeature","ɵɵprojectionDef","ɵɵtemplate","ɵɵpipe","ɵɵpipeBind1","TuiButtonComponent","NgIf","AsyncPipe","TuiPrimitiveSpinButtonModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiButtonModule","getMonthStartDaysOffset","month","firstDayOfWeek","startMonthOffsetFromSunday","DAYS_IN_WEEK","getDayFromMonthRowCol","rowIndex","colIndex","day","TuiDay","CALENDAR_ROWS_COUNT","TuiCalendarSheetPipe","showAdjacentDays","_a","sheet","row","isPrevMonthDay","relativeToMonth","isNextMonthDay","t","ɵɵdirectiveInject","TUI_FIRST_DAY_OF_WEEK","ɵɵdefinePipe","TuiCalendarSheetPipeModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiMonthPipe","months$","month","map","months","t","ɵɵdirectiveInject","TUI_MONTHS","ɵɵdefinePipe","TuiMonthPipeModule","ɵɵdefineNgModule","ɵɵdefineInjector","convertToSundayFirstWeekFormat","weekDaysNames","sundayIndex","TuiOrderWeekDaysPipe","firstDayOfWeekIndex","mondayFirstWeekDays$","map","weekDays","t","ɵɵdirectiveInject","TUI_FIRST_DAY_OF_WEEK","ɵɵdefinePipe","TuiOrderWeekDaysPipeModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiPrimitiveYearMonthPaginationComponent_ng_container_4_Template","rf","ctx","ɵɵelementContainerStart","ɵɵtext","ɵɵelementContainerEnd","ctx_r0","ɵɵnextContext","ɵɵadvance","ɵɵtextInterpolate1","TuiPrimitiveYearMonthPaginationComponent_ng_template_5_Template","_r4","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r3","ɵɵresetView","ɵɵelementEnd","ctx_r1","ɵɵproperty","TuiPrimitiveYearMonthPaginationComponent","TuiMonth","TUI_FIRST_DAY","TUI_LAST_DAY","EventEmitter","_a","computedMin","computedMax","date","newMonth","value","t","ɵɵdefineComponent","ɵɵpipe","ɵɵtemplate","ɵɵtemplateRefExtractor","_r2","ɵɵreference","ɵɵpipeBind1","TuiPrimitiveSpinButtonComponent","TuiLinkComponent","NgIf","TuiFocusableDirective","AsyncPipe","TuiMonthPipe","TuiPrimitiveYearMonthPaginationModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiFocusableModule","TuiPrimitiveSpinButtonModule","TuiLinkModule","TuiMonthPipeModule","TuiPrimitiveCalendarComponent_div_1_Template","rf","ctx","ɵɵelement","day_r2","ɵɵproperty","TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_div_4_div_2_Template","markers_r12","ɵɵnextContext","ɵɵstyleProp","TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_div_4_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ɵɵadvance","TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_div_1_Template","_r17","ɵɵgetCurrentView","ɵɵlistener","ɵɵrestoreView","item_r9","ctx_r15","ɵɵresetView","$event","ctx_r18","ctx_r20","ɵɵpipe","ɵɵtext","ctx_r10","ɵɵclassProp","ɵɵattribute","ɵɵpipeBind2","ɵɵtextInterpolate1","ɵɵpipeBind4","TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_ng_container_1_Template","ɵɵelementContainerStart","ɵɵelementContainerEnd","ctx_r8","TuiPrimitiveCalendarComponent_div_4_div_1_ng_container_1_Template","colIndex_r7","rowIndex_r5","sheet_r3","TuiPrimitiveCalendarComponent_div_4_div_1_Template","TuiPrimitiveCalendarComponent_div_4_Template","TuiPrimitiveCalendarComponent","unorderedWeekDays$","dayTypeHandler","TuiDay","TuiMonth","ALWAYS_FALSE_HANDLER","TUI_DEFAULT_MARKER_HANDLER","EventEmitter","day","today","inRange","markers","TuiDayRange","item","disabledItemHandler","pressedItem","hoveredItem","TuiInteractiveState","value","TuiRangeState","range","tuiNullableSame","a","b","t","ɵɵdirectiveInject","TUI_SHORT_WEEK_DAYS","TUI_DAY_TYPE_HANDLER","ɵɵdefineComponent","ɵɵpipeBind1","NgForOf","TuiLetDirective","TuiRepeatTimesDirective","NgIf","TuiHoveredDirective","TuiPressedDirective","AsyncPipe","TuiOrderWeekDaysPipe","TuiCalendarSheetPipe","TuiMapperPipe","TuiPrimitiveCalendarModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiLetModule","TuiMapperPipeModule","TuiRepeatTimesModule","TuiHoveredModule","TuiPressedModule","TuiCalendarSheetPipeModule","TuiOrderWeekDaysPipeModule","TuiCalendarComponent_tui_scrollbar_0_Template","rf","ctx","_r4","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","ctx_r3","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","ctx_r0","ɵɵadvance","ɵɵproperty","TuiCalendarComponent_ng_template_1_Template","_r6","ctx_r5","ctx_r7","ctx_r8","ctx_r9","ɵɵpipe","ctx_r1","ɵɵpipeBind4","TuiCalendarComponent","TuiMonth","ALWAYS_FALSE_HANDLER","TUI_FIRST_DAY","TUI_LAST_DAY","TUI_DEFAULT_MARKER_HANDLER","EventEmitter","disabledItemHandler","min","max","item","view","value","TuiDay","_a","minViewed","maxViewed","year","month","day","tuiNullableSame","a","b","t","ɵɵdefineComponent","ɵɵtemplate","ɵɵtemplateRefExtractor","_r2","ɵɵreference","TuiScrollbarComponent","TuiPrimitiveYearPickerComponent","TuiPrimitiveYearMonthPaginationComponent","TuiPrimitiveCalendarComponent","NgIf","TuiMapperPipe","TuiCalendarModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiPrimitiveYearMonthPaginationModule","TuiPrimitiveCalendarModule","TuiPrimitiveYearPickerModule","TuiScrollbarModule","TuiMapperPipeModule","TuiDataListDirective","t","ɵɵdefineDirective","_c0","TuiHostedDropdownComponent_div_0_ng_template_3_div_2_Template","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","text_r7","ɵɵadvance","ɵɵtextInterpolate1","_c1","a0","a1","TuiHostedDropdownComponent_div_0_ng_template_3_Template","_r9","ɵɵgetCurrentView","ɵɵlistener","$event","ɵɵrestoreView","ctx_r8","ɵɵnextContext","ɵɵresetView","ɵɵtemplate","ɵɵelement","_r2","ɵɵreference","ctx_r3","ɵɵproperty","ɵɵpureFunction2","TuiHostedDropdownComponent_div_0_Template","_r11","ctx_r10","ctx_r12","ɵɵprojection","ɵɵtemplateRefExtractor","isOpen_r1","_r4","ctx_r0","_c2","TuiAccessorProxyDirective","TuiPositionAccessor","ɵTuiAccessorProxyDirective_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineDirective","ɵɵProvidersFeature","Optional","SkipSelf","accessor","fallback","ɵɵInheritDefinitionFeature","TUI_HOSTED_DROPDOWN_COMPONENT","InjectionToken","TuiDropdownOpenMonitorDirective","destroy$","hosted","dropdown","open","filter","value","takeUntil","_a","ɵɵdirectiveInject","TuiDestroyService","TuiDropdownDirective","TuiDropdownOpenDirective","TuiHostedDropdownConnectorDirective","shouldClose","event","TuiHostedDropdownComponent","hover$","el","BehaviorSubject","combineLatest","tuiTypedFromEvent","map","e","tuiGetActualTarget","switchMap","visible","_b","of","delay","EMPTY","hovered","merge","skip","distinctUntilChanged","share","EventEmitter","tuiIsNativeKeyboardFocusable","tuiGetClosestFocusable","tuiIsNativeFocusedIn","target","down","key","defaultPrevented","tuiIsEditingKey","tuiIsHTMLElement","tuiIsElementEditable","active","obscured","first","host","tuiIsElement","initial","focusable","focused","TuiDropdownHoverDirective","ElementRef","ɵɵdefineComponent","dirIndex","ɵɵcontentQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵviewQuery","TuiActiveZoneDirective","ɵɵresolveDocument","ɵɵhostProperty","tuiAsFocusableItemAccessor","Self","position","ɵɵprojectionDef","ɵɵpipe","tmp_0_0","ɵɵpipeBind1","TuiLetDirective","TuiDropdownDriverDirective","TuiDropdownManualDirective","TuiDropdownPositionSidedDirective","TuiObscuredDirective","PolymorpheusTemplate","PolymorpheusOutletDirective","AsyncPipe","__decorate","shouldCall","TuiHostedDropdownModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","PolymorpheusModule","TuiLetModule","TuiObscuredModule","TuiActiveZoneModule","TuiDropdownModule","TuiPrimitiveCheckboxComponent_tui_svg_1_Template","rf","ctx","ɵɵelement","src_r1","ctx_r0","ɵɵnextContext","ɵɵclassProp","ɵɵproperty","_c0","a0","_c1","TUI_CHECKBOX_DEFAULT_OPTIONS","TuiAppearance","$implicit","TUI_CHECKBOX_OPTIONS","tuiCreateToken","TuiPrimitiveCheckboxComponent","options","value","t","ɵɵdirectiveInject","TUI_CHECKBOX_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵattribute","_c1","ɵɵprojectionDef","ɵɵelementStart","ɵɵtemplate","TuiPrimitiveCheckboxComponent_tui_svg_1_Template","ɵɵprojection","ɵɵelementEnd","ɵɵproperty","ɵɵadvance","ɵɵpureFunction1","_c0","TuiSvgComponent","TuiWrapperDirective","PolymorpheusOutletDirective","TuiPrimitiveCheckboxModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiSvgModule","TuiWrapperModule","PolymorpheusModule","TuiTooltipComponent_tui_svg_3_Template","rf","ctx","ɵɵelement","src_r2","ɵɵproperty","TuiTooltipComponent","TuiHintOptionsDirective","destroy$","mode$","options","isMobile","takeUntil","mode","event","_a","t","ɵɵdirectiveInject","TuiDestroyService","TUI_MODE","TUI_HINT_OPTIONS","TUI_IS_MOBILE","ɵɵdefineComponent","ɵɵviewQuery","TuiHintHoverDirective","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵlistener","$event","ɵɵattribute","ɵɵProvidersFeature","MODE_PROVIDER","ɵɵInheritDefinitionFeature","ɵɵelementStart","ɵɵpipe","ɵɵtemplate","ɵɵelementEnd","_r0","ɵɵreference","ɵɵpipeBind1","ɵɵadvance","TuiSvgComponent","TuiWrapperDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintPositionDirective","TuiHintDescribeDirective","PolymorpheusOutletDirective","AsyncPipe","TuiTooltipModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiWrapperModule","TuiSvgModule","TuiHintModule","PolymorpheusModule","_c0","_c1","TuiPrimitiveTextfieldComponent_ng_container_0_Template","rf","ctx","ɵɵelementContainer","TuiPrimitiveTextfieldComponent_ng_container_2_Template","TuiPrimitiveTextfieldComponent_div_10_Template","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","TuiPrimitiveTextfieldComponent_div_12_tui_svg_1_Template","ɵɵelement","src_r12","ɵɵproperty","_c2","a0","TuiPrimitiveTextfieldComponent_div_12_Template","ɵɵtemplate","ctx_r4","ɵɵnextContext","ɵɵadvance","ɵɵpureFunction1","TuiPrimitiveTextfieldComponent_label_14_Template","ctx_r5","ɵɵclassProp","TuiPrimitiveTextfieldComponent_div_20_tui_svg_1_Template","src_r14","TuiPrimitiveTextfieldComponent_div_20_Template","ctx_r7","TuiPrimitiveTextfieldComponent_span_21_tui_svg_1_Template","src_r16","TuiPrimitiveTextfieldComponent_span_21_Template","_r18","ɵɵgetCurrentView","ɵɵlistener","ɵɵrestoreView","ctx_r17","ɵɵresetView","ctx_r8","TuiPrimitiveTextfieldComponent_tui_tooltip_22_Template","ctx_r9","TuiPrimitiveTextfieldComponent_div_23_tui_svg_1_Template","src_r20","TuiPrimitiveTextfieldComponent_div_23_Template","ctx_r10","_c3","_c4","TuiValueDecorationComponent","textfield","fontsReady$","BehaviorSubject","merge","delay","filter","_a","map","distinctUntilChanged","TuiAppearance","focused","placeholder","exampleText","value","t","ɵɵdirectiveInject","TUI_FOCUSABLE_ITEM_ACCESSOR","TUI_FONTS_READY","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","_c0","ElementRef","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵlistener","ɵɵclassProp","ɵɵelement","ɵɵproperty","ɵɵadvance","TUI_ICON_PADDINGS","TuiPrimitiveTextfieldComponent","AbstractTuiInteractive","controller","hintOptions","options","el","EventEmitter","nativeElement","tuiIsNativeFocusedIn","showDecor","tuiGetBorder","element","fromEvent","event","nativeFocusableElement","autofilled","tuiRetargetedBoundaryCrossing","TUI_TEXTFIELD_WATCHED_CONTROLLER","TuiHintOptionsDirective","TUI_TEXTFIELD_OPTIONS","dirIndex","ɵɵcontentQuery","PolymorpheusOutletDirective","_c1","ɵɵattribute","ɵɵstyleProp","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","TEXTFIELD_CONTROLLER_PROVIDER","ɵɵInheritDefinitionFeature","_c4","ɵɵprojectionDef","_c3","ɵɵtemplate","TuiPrimitiveTextfieldComponent_ng_container_0_Template","ɵɵpipe","TuiPrimitiveTextfieldComponent_ng_container_2_Template","ɵɵelementStart","$event","ɵɵprojection","ɵɵelementEnd","TuiPrimitiveTextfieldComponent_div_10_Template","TuiPrimitiveTextfieldComponent_div_12_Template","TuiPrimitiveTextfieldComponent_label_14_Template","TuiPrimitiveTextfieldComponent_div_20_Template","TuiPrimitiveTextfieldComponent_span_21_Template","TuiPrimitiveTextfieldComponent_tui_tooltip_22_Template","TuiPrimitiveTextfieldComponent_div_23_Template","_r2","ɵɵreference","_r6","ɵɵpipeBind1","TuiSvgComponent","TuiTooltipComponent","NgIf","TuiWrapperDirective","TuiAutofilledDirective","TuiMaskAccessorDirective","DefaultValueAccessor","NgControlStatus","NgModel","TuiFocusableDirective","AsyncPipe","__decorate","tuiPure","TuiPrimitiveTextfieldDirective","AbstractTuiTextfieldHost","ɵɵdefineDirective","tuiAsTextfieldHost","TuiPrimitiveTextfieldModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","FormsModule","PolymorpheusModule","TuiMaskAccessorModule","TuiFocusableModule","TuiWrapperModule","TuiSvgModule","TuiTooltipModule","TuiAutofilledModule","tuiStringHashToHsl","value","hash","i","hue","saturation","lightness","TUI_DATE_MODE_MASKITO_ADAPTER","TUI_FLOATING_PRECISION","tuiFindKeyStepsBoundariesByFn","keySteps","fn","keyStepUpperIndex","keyStep","i","lowerStep","upperStep","tuiPercentageToKeyStepValue","valuePercentage","lowerStepPercent","lowerStepValue","upperStepPercent","upperStepValue","keyStepPercentage","_","ratio","controlValue","tuiRound","TUI_FLOATING_PRECISION","tuiKeyStepValueToPercentage","value","keyStepValue","tuiControlValueFactory","control","valueTransformer","tuiControlValue","map","value","of","TUI_CALENDAR_DATE_STREAM","InjectionToken","tuiDateStreamWithTransformer","transformer","Optional","Self","NgControl","tuiControlValueFactory","TUI_COUNTRIES_MASKS","tuiCreateToken","TuiCountryIsoCode","TUI_DATE_VALUE_TRANSFORMER","TUI_DATE_RANGE_VALUE_TRANSFORMER","TUI_DATE_TIME_VALUE_TRANSFORMER","TUI_PROMPT_WORDS","tuiCreateTokenFromFactory","tuiExtractI18n","TUI_CANCEL_WORD","TUI_DONE_WORD","TUI_MORE_WORD","TUI_HIDE_TEXT","TUI_SHOW_ALL_TEXT","TUI_OTHER_DATE_TEXT","TUI_CHOOSE_DAY_OR_RANGE_TEXTS","TUI_FROM_TO_TEXTS","TUI_PLUS_MINUS_TEXTS","TUI_TIME_TEXTS","TUI_DATE_TEXTS","TUI_DIGITAL_INFORMATION_UNITS","TUI_COPY_TEXTS","TUI_PASSWORD_TEXTS","TUI_CALENDAR_MONTHS","TUI_FILE_TEXTS","TUI_PAGINATION_TEXTS","TUI_INPUT_FILE_TEXTS","TUI_MULTI_SELECT_TEXTS","TUI_COUNTRIES","TUI_INPUT_DATE_DEFAULT_OPTIONS","$implicit","TUI_FIRST_DAY","TUI_LAST_DAY","TUI_INPUT_DATE_OPTIONS","TUI_DEFAULT_ITEMS_HANDLERS","TUI_DEFAULT_STRINGIFY","TUI_DEFAULT_IDENTITY_MATCHER","ALWAYS_FALSE_HANDLER","TUI_ITEMS_HANDLERS","tuiCreateToken","TUI_MOBILE_CALENDAR","InjectionToken","TUI_MONTH_FORMATTER","TUI_TAB_MARGIN","tuiCreateToken","TUI_VALIDATION_ERRORS","MASKITO_DEFAULT_ELEMENT_PREDICATE","e","MASKITO_DEFAULT_OPTIONS","MaskHistory","state","isValueChanged","isSelectionChanged","item","index","inputType","areElementValuesEqual","sampleState","states","value","areElementStatesEqual","selection","applyOverwriteMode","newCharacters","mode","from","to","computedMode","isFixedCharacter","char","getLeadingFixedCharacters","mask","validatedValuePart","newCharacter","initialElementState","leadingFixedCharacters","i","charConstraint","isInitiallyExisted","validateValueWithMask","maskExpression","guessValidValueByPattern","elementState","maskedFrom","maskedTo","maskedValue","validatedCharacters","charIndex","leadingCharacters","newValidatedChars","trailingFixedCharacters","guessValidValueByRegExp","maskRegExp","newFrom","newTo","newPossibleValue","calibrateValueByMask","removeFixedMaskCharacters","unmaskedValue","rawValue","MaskModel","maskOptions","unmaskedElementState","unmaskedFrom","unmaskedTo","newUnmaskedLeadingValuePart","newCaretIndex","maskedElementState","newUnmaskedValue","EventListener","element","eventType","fn","options","untypedFn","stopListen","isHotkey","event","modifiers","hotkeyCode","isRedo","isUndo","isBeforeInputEventSupported","isEventProducingCharacter","key","ctrlKey","metaKey","altKey","isSystemKeyCombinations","isSingleUnicodeChar","getLineSelection","isForward","nearestBreak","getNotEmptySelection","x","TRAILING_SPACES_REG","LEADING_SPACES_REG","SPACE_REG","getWordSelection","valueAfterSelectionStart","leadingSpaces","nearestWordEndIndex","valueBeforeSelectionEnd","trailingSpaces","selectedWordLength","maskitoPipe","processors","initialData","readonlyArgs","data","maskitoTransform","valueOrState","maskitoOptions","preprocessor","postprocessor","maskModel","Maskito","plugin","_a","selectionStart","selectionEnd","maxLength","teardown","eventInit","initialValue","_b","globalObject","pressedKey","force","initialState","initialFrom","initialTo","newElementState","inputTypeFallback","insertedText","FIXED_DROPDOWN_CONTROLLER_PROVIDER","tuiDropdownOptionsProvider","TUI_VALUE_ACCESSOR_PROVIDER","TUI_VALUE_ACCESSOR","Optional","Self","NG_VALUE_ACCESSOR","identity","TuiValueAccessorDirective","t","ɵɵdefineDirective","ɵɵProvidersFeature","TUI_VALUE_ACCESSOR_PROVIDER","TuiValueAccessorModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","TuiCheckboxComponent","AbstractTuiNullableControl","control","options","cdr","tuiIsNativeFocused","checked","focused","focusVisible","t","ɵɵdirectiveInject","NgControl","TUI_CHECKBOX_OPTIONS","ChangeDetectorRef","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵattribute","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","tuiAsControl","ɵɵInheritDefinitionFeature","ɵɵelementStart","ɵɵlistener","$event","ɵɵelementEnd","ɵɵproperty","ɵɵadvance","TuiPrimitiveCheckboxComponent","TuiCheckedDirective","TuiFocusableDirective","TuiFocusedDirective","TuiFocusVisibleDirective","TuiCheckboxModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiCheckedModule","TuiFocusableModule","TuiFocusedModule","TuiFocusVisibleModule","TuiPrimitiveCheckboxModule","_c0","TuiCheckboxLabeledComponent","AbstractTuiNullableControl","control","cdr","mode$","options","tuiIsNativeFocused","_a","_b","focused","value","t","ɵɵdirectiveInject","NgControl","ChangeDetectorRef","TUI_MODE","TUI_CHECKBOX_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","TuiCheckboxComponent","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵlistener","ɵɵattribute","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","tuiAsControl","MODE_PROVIDER","ɵɵInheritDefinitionFeature","ɵɵprojectionDef","ɵɵelementStart","$event","ɵɵelementEnd","ɵɵprojection","ɵɵadvance","ɵɵproperty","ɵɵclassProp","NgControlStatus","NgModel","TuiCheckboxLabeledModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","FormsModule","TuiCheckboxModule","DEFAULT_MIN_DATE","DEFAULT_MAX_DATE","CHAR_EN_DASH","CHAR_EM_DASH","CHAR_HYPHEN","CHAR_MINUS","POSSIBLE_DATE_RANGE_SEPARATOR","TIME_FIXED_CHARACTERS","clamp","value","min","max","clampedValue","getDateSegmentValueLength","dateString","_a","_b","_c","dateToSegments","date","isDateStringComplete","dateModeTemplate","segment","parseDateRangeString","dateRange","rangeSeparator","digitsInDate","getObjectFromEntries","keyValuePairs","obj","key","val","parseDateString","fullMode","cleanMode","onlyDigitsDate","dateSegments","_","value","a","b","segmentsToDate","parsedDate","parsedTime","_d","_e","_f","_g","year","DATE_TIME_SEPARATOR","toDateString","day","month","hours","minutes","seconds","milliseconds","dateMode","timeMode","safeYear","padWithZeroesUntilValid","segmentValue","paddedMaxValue","prefixedZeroesCount","dateMaxValues","validateDateString","offset","from","to","validatedDateSegments","paddedZeroes","segmentName","validatedDate","maxSegmentValue","fantomSeparator","lastSegmentDigitIndex","isLastSegmentDigitAdded","validatedSegmentValue","validatedDateString","addedDateSegmentSeparators","reRegExpChar","reHasRegExpChar","escapeRegExp","str","raiseSegmentValueToMin","segments","fullMode","segmentsLength","getDateSegmentValueLength","getObjectFromEntries","key","value","segmentLength","createMinMaxDatePostprocessor","dateModeTemplate","min","DEFAULT_MIN_DATE","max","DEFAULT_MAX_DATE","rangeSeparator","dateSegmentSeparator","selection","endsWithRangeSeparator","dateStrings","parseDateRangeString","validatedValue","dateString","parsedDate","parseDateString","isDateStringComplete","fixedDate","fixedValue","toDateString","tail","date","segmentsToDate","clampedDate","clamp","dateToSegments","normalizeDatePreprocessor","dateSegmentsSeparator","elementState","data","separator","DATE_TIME_SEPARATOR","possibleDates","dates","newData","normalizeDateString","template","dateSegments","templateSegments","segment","index","createValidDatePreprocessor","dateModeTemplate","dateSegmentsSeparator","rangeSeparator","elementState","data","value","selection","POSSIBLE_DATE_RANGE_SEPARATOR","newCharacters","escapeRegExp","from","rawTo","to","newPossibleValue","dateStrings","parseDateRangeString","validatedValue","hasRangeSeparator","dateString","validatedDateString","updatedSelection","validateDateString","newData","segment","createZeroPlaceholdersPreprocessor","elementState","actionType","value","selection","isLastChar","from","to","zeroes","newValue","_","maskitoDateOptionsGenerator","mode","separator","max","min","dateModeTemplate","MASKITO_DEFAULT_OPTIONS","char","normalizeDatePreprocessor","createValidDatePreprocessor","createMinMaxDatePostprocessor","TRAILING_TIME_SEGMENT_SEPARATOR_REG","TIME_FIXED_CHARACTERS","escapeRegExp","MaskitoDirective","ngZone","elementRef","MASKITO_DEFAULT_OPTIONS","MASKITO_DEFAULT_ELEMENT_PREDICATE","_a","__awaiter","predicate","predicateResult","Maskito","t","ɵɵdirectiveInject","NgZone","ElementRef","ɵɵdefineDirective","ɵɵNgOnChangesFeature","MaskitoModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","TuiInputDateComponent_tui_primitive_textfield_1_Template","rf","ctx","_r7","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","ctx_r6","ɵɵnextContext","ɵɵresetView","ctx_r8","ɵɵprojection","ɵɵelementEnd","filler_r5","ctx_r0","_r2","ɵɵreference","ɵɵproperty","TuiInputDateComponent_ng_template_3_tui_svg_0_Template","_r13","ctx_r12","src_r11","ctx_r9","ɵɵclassProp","TuiInputDateComponent_ng_template_3_input_1_Template","ɵɵelement","_c0","a0","TuiInputDateComponent_ng_template_3_Template","ɵɵtemplate","ctx_r1","ɵɵpureFunction1","ɵɵadvance","TuiInputDateComponent_ng_template_5_div_1_Template","_r16","ctx_r15","ɵɵtext","ctx_r14","ɵɵtextInterpolate1","TuiInputDateComponent_ng_template_5_Template","_r18","ctx_r17","ctx_r19","ctx_r3","_c1","_c2","TuiNativeDateDirective","host","dateFormat","DATE_FILLER_LENGTH","TuiDay","value","t","ɵɵdirectiveInject","TUI_TEXTFIELD_HOST","TUI_DATE_FORMAT","ɵɵdefineDirective","ɵɵhostProperty","TuiInputDateComponent","AbstractTuiNullableControl","control","cdr","injector","isMobile","dialogs","mobileCalendar","dateSeparator","dateTexts$","valueTransformer","options","textfieldSize","ALWAYS_FALSE_HANDLER","TUI_DEFAULT_MARKER_HANDLER","TuiMonth","map","dateTexts","changeDateSeparator","_a","_b","nativeValue","activeItem","tuiDateClamp","MASKITO_DEFAULT_OPTIONS","item","filler","PolymorpheusComponent","takeUntil","month","open","focused","oldValue","newValue","tuiNullableSame","a","b","mode","separator","min","max","maskitoDateOptionsGenerator","TUI_DATE_MODE_MASKITO_ADAPTER","NgControl","ChangeDetectorRef","Injector","TUI_IS_MOBILE","TuiDialogService","TUI_MOBILE_CALENDAR","TUI_DATE_SEPARATOR","TUI_DATE_TEXTS","TUI_DATE_VALUE_TRANSFORMER","TUI_INPUT_DATE_OPTIONS","TUI_TEXTFIELD_SIZE","ɵɵdefineComponent","ɵɵviewQuery","TuiPrimitiveTextfieldComponent","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵattribute","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","tuiAsControl","tuiDateStreamWithTransformer","ɵɵInheritDefinitionFeature","ɵɵprojectionDef","ɵɵpipe","ɵɵtemplateRefExtractor","_r4","ɵɵpipeBind1","TuiHostedDropdownComponent","TuiSvgComponent","TuiCalendarComponent","TuiLinkComponent","TuiLetDirective","TuiPrimitiveTextfieldDirective","TuiValueAccessorDirective","MaskitoDirective","TuiTextfieldFillerDirective","TuiTextfieldIconDirective","PolymorpheusOutletDirective","TuiWrapperDirective","NgIf","PolymorpheusTemplate","TuiPreventDefaultDirective","AsyncPipe","__decorate","tuiPure","TuiInputDateDirective","AbstractTuiTextfieldHost","input","ɵTuiInputDateDirective_BaseFactory","ɵɵgetInheritedFactory","tuiAsTextfieldHost","TuiInputDateModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","MaskitoModule","PolymorpheusModule","TuiWrapperModule","TuiPreventDefaultModule","TuiCalendarModule","TuiSvgModule","TuiLinkModule","TuiHostedDropdownModule","TuiPrimitiveTextfieldModule","TuiValueAccessorModule","TuiLetModule","TuiTextfieldControllerModule","_c0","TuiTagComponent_div_1_ng_container_1_Template","rf","ctx","ɵɵelementContainerStart","ɵɵtext","ɵɵelementContainerEnd","text_r5","ɵɵadvance","ɵɵtextInterpolate1","TuiTagComponent_div_1_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ctx_r0","ɵɵnextContext","ɵɵproperty","TuiTagComponent_tui_loader_3_Template","ɵɵelement","ctx_r1","TuiTagComponent_tui_svg_4_Template","_r7","ɵɵgetCurrentView","ɵɵlistener","$event","ɵɵrestoreView","ctx_r6","ɵɵresetView","ctx_r2","TuiTagComponent_input_5_Template","_r11","ctx_r10","ctx_r12","ctx_r13","ctx_r3","ɵɵattribute","TUI_TAG_DEFAULT_OPTIONS","TUI_TAG_OPTIONS","tuiCreateToken","TuiTagComponent","el","mode$","options","icons","EventEmitter","input","tuiStringHashToHsl","tuiSizeBigger","event","value","newTags","t","ɵɵdirectiveInject","ElementRef","TUI_MODE","TUI_TAG_OPTIONS","TUI_COMMON_ICONS","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","_c0","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵlistener","$event","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","MODE_PROVIDER","ɵɵelementStart","ɵɵtemplate","TuiTagComponent_div_1_Template","ɵɵelement","TuiTagComponent_tui_loader_3_Template","TuiTagComponent_tui_svg_4_Template","ɵɵelementEnd","TuiTagComponent_input_5_Template","ɵɵstyleProp","ɵɵadvance","ɵɵproperty","TuiLoaderComponent","TuiSvgComponent","NgIf","PolymorpheusOutletDirective","DefaultValueAccessor","NgControlStatus","NgModel","TuiTagModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","FormsModule","TuiSvgModule","TuiLoaderModule","PolymorpheusModule","_c0","_c1","_c2","_c3","_c4","TuiInputTagComponent_ng_container_0_Template","rf","ctx","ɵɵelementContainer","TuiInputTagComponent_div_5_tui_svg_1_Template","ɵɵelement","src_r11","ɵɵproperty","_c5","a0","TuiInputTagComponent_div_5_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ctx_r1","ɵɵnextContext","ɵɵadvance","ɵɵpureFunction1","TuiInputTagComponent_div_8_Template","ɵɵprojection","ctx_r2","ɵɵclassProp","TuiInputTagComponent_ng_container_11_tui_tag_1_Template","_r17","ɵɵgetCurrentView","ɵɵlistener","$event","index_r14","ɵɵrestoreView","ctx_r16","ɵɵresetView","ctx_r18","ctx_r19","ɵɵpipe","item_r13","ctx_r12","ɵɵpipeBind1","TuiInputTagComponent_ng_container_11_Template","ɵɵelementContainerStart","ɵɵelementContainerEnd","ctx_r3","TuiInputTagComponent_ng_template_12_span_0_Template","item_r21","ctx_r20","TuiInputTagComponent_ng_template_12_Template","ctx_r4","TuiInputTagComponent_div_22_ng_container_1_tui_svg_1_Template","_r29","ctx_r28","src_r26","TuiInputTagComponent_div_22_ng_container_1_Template","ctx_r22","TuiInputTagComponent_div_22_tui_tooltip_2_Template","ctx_r23","TuiInputTagComponent_div_22_div_3_tui_svg_1_Template","src_r31","TuiInputTagComponent_div_22_div_3_Template","ctx_r24","TuiInputTagComponent_div_22_Template","ctx_r7","TuiInputTagComponent_ng_template_23_Template","ctx_r8","_c6","_c7","TUI_INPUT_TAG_DEFAULT_OPTIONS","TUI_INPUT_TAG_OPTIONS","tuiCreateToken","TAG_SIZE_REM","LINE_HEIGHT_REM","TAG_VERTICAL_SPACE_REM","TuiInputTagComponent","AbstractTuiMultipleControl","control","cdr","el","modeDirective","mode$","hintOptions","controller","options","icons","EMPTY_QUERY","ALWAYS_TRUE_HANDLER","ALWAYS_FALSE_HANDLER","EventEmitter","map","value","_a","tuiIsNativeFocusedIn","size","labelOutside","event","tuiRetargetedBoundaryCrossing","tag","active","actualTarget","tuiGetActualTarget","tuiIsElement","currentIndex","index","tagIndex","result","item","array","validated","length","pasted","tuiGetClipboardDataText","dataTransfer","_","scrollLeft","seen","flag","_item","_b","inputValue","tuiArrayRemove","preventScroll","t","ɵɵdirectiveInject","NgControl","ChangeDetectorRef","ElementRef","TuiModeDirective","TUI_MODE","TuiHintOptionsDirective","TUI_TEXTFIELD_WATCHED_CONTROLLER","TUI_INPUT_TAG_OPTIONS","TUI_COMMON_ICONS","ɵɵdefineComponent","rf","ctx","dirIndex","ɵɵcontentQuery","TuiDataListDirective","TemplateRef","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵviewQuery","TuiHostedDropdownComponent","_c0","_c1","_c2","TuiScrollbarComponent","_c3","_c4","ɵɵlistener","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","tuiAsControl","tuiAsDataListHost","TEXTFIELD_CONTROLLER_PROVIDER","MODE_PROVIDER","FIXED_DROPDOWN_CONTROLLER_PROVIDER","ɵɵInheritDefinitionFeature","_c7","ɵɵprojectionDef","_c6","ɵɵtemplate","TuiInputTagComponent_ng_container_0_Template","ɵɵpipe","ɵɵelementStart","$event","TuiInputTagComponent_div_5_Template","TuiInputTagComponent_div_8_Template","ɵɵelementEnd","TuiInputTagComponent_ng_container_11_Template","TuiInputTagComponent_ng_template_12_Template","ɵɵtemplateRefExtractor","ɵɵtext","ɵɵprojection","TuiInputTagComponent_div_22_Template","TuiInputTagComponent_ng_template_23_Template","_r5","ɵɵreference","ɵɵproperty","ɵɵpipeBind1","ɵɵadvance","ɵɵstyleProp","ɵɵtextInterpolate","TuiSvgComponent","TuiTagComponent","TuiTooltipComponent","NgIf","TuiActiveZoneDirective","TuiWrapperDirective","PolymorpheusOutletDirective","NgForOf","TuiFocusableDirective","DefaultValueAccessor","NgControlStatus","NgModel","AsyncPipe","TuiInputTagModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiScrollService","CommonModule","FormsModule","PolymorpheusModule","TuiFocusableModule","TuiHoveredModule","TuiActiveZoneModule","TuiSvgModule","TuiScrollbarModule","TuiTooltipModule","TuiHostedDropdownModule","TuiTagModule","TuiWrapperModule","_c0","TUI_SLIDER_DEFAULT_OPTIONS","TUI_SLIDER_OPTIONS","tuiCreateToken","TuiSliderComponent","control","cdr","options","el","userAgent","injector","_a","NgModel","tuiWatch","take","hasKeySteps","newValue","tuiIsEdgeOlderThan","CHROMIUM_EDGE_START_VERSION","TuiSliderKeyStepsDirective","t","ɵɵdirectiveInject","NgControl","ChangeDetectorRef","TUI_SLIDER_OPTIONS","ElementRef","USER_AGENT","Injector","ɵɵdefineComponent","rf","ctx","ɵɵlistener","ɵɵattribute","ɵɵstyleProp","ɵɵclassProp","_c0","__decorate","tuiPure","AbstractTuiControl","slider","tuiIsNativeFocused","tuiPercentageToKeyStepValue","controlValue","clampedControlValue","tuiClamp","min","max","tuiKeyStepValueToPercentage","forwardRef","ɵɵdefineDirective","ɵɵhostProperty","ɵɵInheritDefinitionFeature","TuiSliderModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","_c0","TuiToggleComponent_tui_loader_2_Template","rf","ctx","ɵɵelement","ctx_r0","ɵɵnextContext","ɵɵproperty","TuiToggleComponent_span_3_tui_svg_1_Template","src_r6","_c1","a0","TuiToggleComponent_span_3_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ctx_r1","ɵɵadvance","ɵɵpureFunction1","TuiToggleComponent_tui_loader_5_Template","ctx_r2","TuiToggleComponent_span_6_tui_svg_1_Template","src_r8","TuiToggleComponent_span_6_Template","ctx_r3","TUI_TOGGLE_DEFAULT_OPTIONS","$implicit","TuiAppearance","TUI_TOGGLE_OPTIONS","tuiCreateToken","TuiToggleComponent","AbstractTuiControl","control","cdr","modeDirective","options","_a","_b","tuiIsNativeFocused","checked","focused","focusVisible","t","ɵɵdirectiveInject","NgControl","ChangeDetectorRef","TuiModeDirective","TUI_TOGGLE_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","_c0","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","tuiAsControl","ɵɵInheritDefinitionFeature","ɵɵelementStart","ɵɵtemplate","TuiToggleComponent_tui_loader_2_Template","TuiToggleComponent_span_3_Template","ɵɵelement","TuiToggleComponent_tui_loader_5_Template","TuiToggleComponent_span_6_Template","ɵɵelementEnd","ɵɵlistener","$event","ɵɵproperty","ɵɵadvance","TuiLoaderComponent","TuiSvgComponent","TuiWrapperDirective","NgIf","PolymorpheusOutletDirective","TuiCheckedDirective","TuiFocusableDirective","TuiFocusedDirective","TuiFocusVisibleDirective","TuiToggleModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiFocusedModule","TuiFocusableModule","TuiPressedModule","TuiFocusVisibleModule","TuiCheckedModule","TuiWrapperModule","TuiSvgModule","TuiLoaderModule","PolymorpheusModule","ɵɵelement","ɵɵproperty","ctx_r0","purify","ɵɵsanitizeHtml","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","label_r6","ctx_r2","labels","ɵɵadvance","ɵɵtextInterpolate1","ɵɵlistener","observer_r7","ɵɵrestoreView","_r9","$implicit","ɵɵresetView","complete","_r12","ctx_r11","ɵɵnextContext","toggle","ctx_r13","ctx_r14","HomeComponent","constructor","dompurifySanitizer","inject","NgDompurifySanitizer","dialogs","TuiDialogService","cd","ChangeDetectorRef","tags","date","notification","slider","onDay","call","content","open","appearance","closeable","dismissible","subscribe","detectChanges","value","sanitize","SecurityContext","HTML","selectors","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","$event","ɵɵtemplate","HomeComponent_ng_template_5_Template","ɵɵtemplateRefExtractor","HomeComponent_tui_checkbox_labeled_13_Template","_r15","_r4","ɵɵreference","HomeComponent_ng_template_23_Template","HomeComponent_tui_push_25_Template","_r1","CommonModule","NgForOf","FormsModule","DefaultValueAccessor","RangeValueAccessor","NgControlStatus","RequiredValidator","NgModel","TuiInputTagModule","TuiInputTagComponent","TuiToggleModule","TuiToggleComponent","TuiCalendarModule","TuiCalendarComponent","TuiTextfieldControllerModule","TuiTextfieldLabelOutsideDirective","TuiInputDateModule","TuiInputDateComponent","TuiInputDateDirective","TuiCheckboxLabeledModule","TuiCheckboxLabeledComponent","TuiButtonModule","TuiButtonComponent","TuiHintModule","TuiHintOptionsDirective","TuiSliderModule","TuiSliderComponent","TuiSvgModule","TuiSvgComponent","TuiPushModule","TuiPushComponent","TuiPushDirective","TuiPushAlertDirective","TuiLinkModule","TuiLinkComponent","TuiDropdownModule","TuiDropdownOpenDirective","NgDompurifyModule","styles","encapsulation","changeDetection","_HomeComponent"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46]} \ No newline at end of file diff --git a/chunk-PVLOJ2BE.js b/chunk-PVLOJ2BE.js new file mode 100644 index 00000000..78aff62d --- /dev/null +++ b/chunk-PVLOJ2BE.js @@ -0,0 +1,2 @@ +var Rb=Object.create;var rd=Object.defineProperty,Fb=Object.defineProperties,Lb=Object.getOwnPropertyDescriptor,kb=Object.getOwnPropertyDescriptors,jb=Object.getOwnPropertyNames,ka=Object.getOwnPropertySymbols,Vb=Object.getPrototypeOf,id=Object.prototype.hasOwnProperty,mg=Object.prototype.propertyIsEnumerable;var pg=(e,t,n)=>t in e?rd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t||(t={}))id.call(t,n)&&pg(e,n,t[n]);if(ka)for(var n of ka(t))mg.call(t,n)&&pg(e,n,t[n]);return e},Ve=(e,t)=>Fb(e,kb(t));var gg=(e,t)=>{var n={};for(var r in e)id.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ka)for(var r of ka(e))t.indexOf(r)<0&&mg.call(e,r)&&(n[r]=e[r]);return n};var Ub=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Bb=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jb(t))!id.call(e,i)&&i!==n&&rd(e,i,{get:()=>t[i],enumerable:!(r=Lb(t,i))||r.enumerable});return e};var Hb=(e,t,n)=>(n=e!=null?Rb(Vb(e)):{},Bb(t||!e||!e.__esModule?rd(n,"default",{value:e,enumerable:!0}):n,e));var $b=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(u){i(u)}},s=c=>{try{a(n.throw(c))}catch(u){i(u)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(e,t)).next())});var cb=Ub((Vm,Um)=>{"use strict";(function(e,t){typeof Vm=="object"&&typeof Um<"u"?Um.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.DOMPurify=t())})(Vm,function(){"use strict";let{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object,{freeze:o,seal:s,create:a}=Object,{apply:c,construct:u}=typeof Reflect<"u"&&Reflect;o||(o=function(z){return z}),s||(s=function(z){return z}),c||(c=function(z,Me,we){return z.apply(Me,we)}),u||(u=function(z,Me){return new z(...Me)});let l=De(Array.prototype.forEach),d=De(Array.prototype.pop),f=De(Array.prototype.push),p=De(String.prototype.toLowerCase),g=De(String.prototype.toString),_=De(String.prototype.match),M=De(String.prototype.replace),A=De(String.prototype.indexOf),Y=De(String.prototype.trim),B=De(RegExp.prototype.test),he=It(TypeError);function De(Se){return function(z){for(var Me=arguments.length,we=new Array(Me>1?Me-1:0),Tt=1;Tt2&&arguments[2]!==void 0?arguments[2]:p;t&&t(Se,null);let we=z.length;for(;we--;){let Tt=z[we];if(typeof Tt=="string"){let Jn=Me(Tt);Jn!==Tt&&(n(z)||(z[we]=Jn),Tt=Jn)}Se[Tt]=!0}return Se}function Ye(Se){let z=a(null);for(let[Me,we]of e(Se))i(Se,Me)!==void 0&&(z[Me]=we);return z}function Ft(Se,z){for(;Se!==null;){let we=i(Se,z);if(we){if(we.get)return De(we.get);if(typeof we.value=="function")return De(we.value)}Se=r(Se)}function Me(we){return console.warn("fallback value for",we),null}return Me}let yt=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dn=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Qn=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$r=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),In=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ma=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),x=o(["#text"]),L=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),V=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ce=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ke=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),tn=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),St=s(/<%[\w\W]*|[\w\W]*%>/gm),Sn=s(/\${[\w\W]*}/gm),Be=s(/^data-[\-\w.\u00B7-\uFFFF]/),Ta=s(/^aria-[\-\w]+$/),Aa=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ut=s(/^(?:\w+script|data):/i),Xn=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Mt=s(/^html$/i);var zr=Object.freeze({__proto__:null,MUSTACHE_EXPR:tn,ERB_EXPR:St,TMPLIT_EXPR:Sn,DATA_ATTR:Be,ARIA_ATTR:Ta,IS_ALLOWED_URI:Aa,IS_SCRIPT_OR_DATA:ut,ATTR_WHITESPACE:Xn,DOCTYPE_NAME:Mt});let qo=function(){return typeof window>"u"?null:window},lb=function(z,Me){if(typeof z!="object"||typeof z.createPolicy!="function")return null;let we=null,Tt="data-tt-policy-suffix";Me&&Me.hasAttribute(Tt)&&(we=Me.getAttribute(Tt));let Jn="dompurify"+(we?"#"+we:"");try{return z.createPolicy(Jn,{createHTML(Ri){return Ri},createScriptURL(Ri){return Ri}})}catch{return console.warn("TrustedTypes policy "+Jn+" could not be created."),null}};function Bm(){let Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qo(),z=k=>Bm(k);if(z.version="3.0.6",z.removed=[],!Se||!Se.document||Se.document.nodeType!==9)return z.isSupported=!1,z;let{document:Me}=Se,we=Me,Tt=we.currentScript,{DocumentFragment:Jn,HTMLTemplateElement:Ri,Node:Vl,Element:Hm,NodeFilter:Ul,NamedNodeMap:fb=Se.NamedNodeMap||Se.MozNamedAttrMap,HTMLFormElement:hb,DOMParser:pb,trustedTypes:Oa}=Se,xa=Hm.prototype,mb=Ft(xa,"cloneNode"),gb=Ft(xa,"nextSibling"),vb=Ft(xa,"childNodes"),Bl=Ft(xa,"parentNode");if(typeof Ri=="function"){let k=Me.createElement("template");k.content&&k.content.ownerDocument&&(Me=k.content.ownerDocument)}let At,Yo="",{implementation:Hl,createNodeIterator:yb,createDocumentFragment:_b,getElementsByTagName:Db}=Me,{importNode:Eb}=we,Mn={};z.isSupported=typeof e=="function"&&typeof Bl=="function"&&Hl&&Hl.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:$l,ERB_EXPR:zl,TMPLIT_EXPR:Gl,DATA_ATTR:wb,ARIA_ATTR:bb,IS_SCRIPT_OR_DATA:Cb,ATTR_WHITESPACE:$m}=zr,{IS_ALLOWED_URI:zm}=zr,lt=null,Gm=O({},[...yt,...dn,...Qn,...In,...x]),dt=null,Wm=O({},[...L,...V,...ce,...ke]),Je=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Zo=null,Wl=null,qm=!0,ql=!0,Ym=!1,Zm=!0,Fi=!1,Gr=!1,Yl=!1,Zl=!1,Li=!1,Na=!1,Pa=!1,Km=!0,Qm=!1,Ib="user-content-",Kl=!0,Ko=!1,ki={},ji=null,Xm=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Jm=null,eg=O({},["audio","video","img","source","image","track"]),Ql=null,tg=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ra="http://www.w3.org/1998/Math/MathML",Fa="http://www.w3.org/2000/svg",er="http://www.w3.org/1999/xhtml",Vi=er,Xl=!1,Jl=null,Sb=O({},[Ra,Fa,er],g),Wr=null,Mb=["application/xhtml+xml","text/html"],Tb="text/html",ft=null,Ui=null,Ab=Me.createElement("form"),ng=function(m){return m instanceof RegExp||m instanceof Function},ed=function(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ui&&Ui===m)){if((!m||typeof m!="object")&&(m={}),m=Ye(m),Wr=Mb.indexOf(m.PARSER_MEDIA_TYPE)===-1?Wr=Tb:Wr=m.PARSER_MEDIA_TYPE,ft=Wr==="application/xhtml+xml"?g:p,lt="ALLOWED_TAGS"in m?O({},m.ALLOWED_TAGS,ft):Gm,dt="ALLOWED_ATTR"in m?O({},m.ALLOWED_ATTR,ft):Wm,Jl="ALLOWED_NAMESPACES"in m?O({},m.ALLOWED_NAMESPACES,g):Sb,Ql="ADD_URI_SAFE_ATTR"in m?O(Ye(tg),m.ADD_URI_SAFE_ATTR,ft):tg,Jm="ADD_DATA_URI_TAGS"in m?O(Ye(eg),m.ADD_DATA_URI_TAGS,ft):eg,ji="FORBID_CONTENTS"in m?O({},m.FORBID_CONTENTS,ft):Xm,Zo="FORBID_TAGS"in m?O({},m.FORBID_TAGS,ft):{},Wl="FORBID_ATTR"in m?O({},m.FORBID_ATTR,ft):{},ki="USE_PROFILES"in m?m.USE_PROFILES:!1,qm=m.ALLOW_ARIA_ATTR!==!1,ql=m.ALLOW_DATA_ATTR!==!1,Ym=m.ALLOW_UNKNOWN_PROTOCOLS||!1,Zm=m.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Fi=m.SAFE_FOR_TEMPLATES||!1,Gr=m.WHOLE_DOCUMENT||!1,Li=m.RETURN_DOM||!1,Na=m.RETURN_DOM_FRAGMENT||!1,Pa=m.RETURN_TRUSTED_TYPE||!1,Zl=m.FORCE_BODY||!1,Km=m.SANITIZE_DOM!==!1,Qm=m.SANITIZE_NAMED_PROPS||!1,Kl=m.KEEP_CONTENT!==!1,Ko=m.IN_PLACE||!1,zm=m.ALLOWED_URI_REGEXP||Aa,Vi=m.NAMESPACE||er,Je=m.CUSTOM_ELEMENT_HANDLING||{},m.CUSTOM_ELEMENT_HANDLING&&ng(m.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Je.tagNameCheck=m.CUSTOM_ELEMENT_HANDLING.tagNameCheck),m.CUSTOM_ELEMENT_HANDLING&&ng(m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Je.attributeNameCheck=m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),m.CUSTOM_ELEMENT_HANDLING&&typeof m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Je.allowCustomizedBuiltInElements=m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Fi&&(ql=!1),Na&&(Li=!0),ki&&(lt=O({},[...x]),dt=[],ki.html===!0&&(O(lt,yt),O(dt,L)),ki.svg===!0&&(O(lt,dn),O(dt,V),O(dt,ke)),ki.svgFilters===!0&&(O(lt,Qn),O(dt,V),O(dt,ke)),ki.mathMl===!0&&(O(lt,In),O(dt,ce),O(dt,ke))),m.ADD_TAGS&&(lt===Gm&&(lt=Ye(lt)),O(lt,m.ADD_TAGS,ft)),m.ADD_ATTR&&(dt===Wm&&(dt=Ye(dt)),O(dt,m.ADD_ATTR,ft)),m.ADD_URI_SAFE_ATTR&&O(Ql,m.ADD_URI_SAFE_ATTR,ft),m.FORBID_CONTENTS&&(ji===Xm&&(ji=Ye(ji)),O(ji,m.FORBID_CONTENTS,ft)),Kl&&(lt["#text"]=!0),Gr&&O(lt,["html","head","body"]),lt.table&&(O(lt,["tbody"]),delete Zo.tbody),m.TRUSTED_TYPES_POLICY){if(typeof m.TRUSTED_TYPES_POLICY.createHTML!="function")throw he('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof m.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw he('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');At=m.TRUSTED_TYPES_POLICY,Yo=At.createHTML("")}else At===void 0&&(At=lb(Oa,Tt)),At!==null&&typeof Yo=="string"&&(Yo=At.createHTML(""));o&&o(m),Ui=m}},rg=O({},["mi","mo","mn","ms","mtext"]),ig=O({},["foreignobject","desc","title","annotation-xml"]),Ob=O({},["title","style","font","a","script"]),La=O({},dn);O(La,Qn),O(La,$r);let td=O({},In);O(td,Ma);let xb=function(m){let b=Bl(m);(!b||!b.tagName)&&(b={namespaceURI:Vi,tagName:"template"});let F=p(m.tagName),je=p(b.tagName);return Jl[m.namespaceURI]?m.namespaceURI===Fa?b.namespaceURI===er?F==="svg":b.namespaceURI===Ra?F==="svg"&&(je==="annotation-xml"||rg[je]):!!La[F]:m.namespaceURI===Ra?b.namespaceURI===er?F==="math":b.namespaceURI===Fa?F==="math"&&ig[je]:!!td[F]:m.namespaceURI===er?b.namespaceURI===Fa&&!ig[je]||b.namespaceURI===Ra&&!rg[je]?!1:!td[F]&&(Ob[F]||!La[F]):!!(Wr==="application/xhtml+xml"&&Jl[m.namespaceURI]):!1},qr=function(m){f(z.removed,{element:m});try{m.parentNode.removeChild(m)}catch{m.remove()}},nd=function(m,b){try{f(z.removed,{attribute:b.getAttributeNode(m),from:b})}catch{f(z.removed,{attribute:null,from:b})}if(b.removeAttribute(m),m==="is"&&!dt[m])if(Li||Na)try{qr(b)}catch{}else try{b.setAttribute(m,"")}catch{}},og=function(m){let b=null,F=null;if(Zl)m=""+m;else{let Dt=_(m,/^[\r\n\t ]+/);F=Dt&&Dt[0]}Wr==="application/xhtml+xml"&&Vi===er&&(m=''+m+"");let je=At?At.createHTML(m):m;if(Vi===er)try{b=new pb().parseFromString(je,Wr)}catch{}if(!b||!b.documentElement){b=Hl.createDocument(Vi,"template",null);try{b.documentElement.innerHTML=Xl?Yo:je}catch{}}let _t=b.body||b.documentElement;return m&&F&&_t.insertBefore(Me.createTextNode(F),_t.childNodes[0]||null),Vi===er?Db.call(b,Gr?"html":"body")[0]:Gr?b.documentElement:_t},sg=function(m){return yb.call(m.ownerDocument||m,m,Ul.SHOW_ELEMENT|Ul.SHOW_COMMENT|Ul.SHOW_TEXT,null)},Nb=function(m){return m instanceof hb&&(typeof m.nodeName!="string"||typeof m.textContent!="string"||typeof m.removeChild!="function"||!(m.attributes instanceof fb)||typeof m.removeAttribute!="function"||typeof m.setAttribute!="function"||typeof m.namespaceURI!="string"||typeof m.insertBefore!="function"||typeof m.hasChildNodes!="function")},ag=function(m){return typeof Vl=="function"&&m instanceof Vl},tr=function(m,b,F){Mn[m]&&l(Mn[m],je=>{je.call(z,b,F,Ui)})},cg=function(m){let b=null;if(tr("beforeSanitizeElements",m,null),Nb(m))return qr(m),!0;let F=ft(m.nodeName);if(tr("uponSanitizeElement",m,{tagName:F,allowedTags:lt}),m.hasChildNodes()&&!ag(m.firstElementChild)&&B(/<[/\w]/g,m.innerHTML)&&B(/<[/\w]/g,m.textContent))return qr(m),!0;if(!lt[F]||Zo[F]){if(!Zo[F]&&lg(F)&&(Je.tagNameCheck instanceof RegExp&&B(Je.tagNameCheck,F)||Je.tagNameCheck instanceof Function&&Je.tagNameCheck(F)))return!1;if(Kl&&!ji[F]){let je=Bl(m)||m.parentNode,_t=vb(m)||m.childNodes;if(_t&&je){let Dt=_t.length;for(let Lt=Dt-1;Lt>=0;--Lt)je.insertBefore(mb(_t[Lt],!0),gb(m))}}return qr(m),!0}return m instanceof Hm&&!xb(m)||(F==="noscript"||F==="noembed"||F==="noframes")&&B(/<\/no(script|embed|frames)/i,m.innerHTML)?(qr(m),!0):(Fi&&m.nodeType===3&&(b=m.textContent,l([$l,zl,Gl],je=>{b=M(b,je," ")}),m.textContent!==b&&(f(z.removed,{element:m.cloneNode()}),m.textContent=b)),tr("afterSanitizeElements",m,null),!1)},ug=function(m,b,F){if(Km&&(b==="id"||b==="name")&&(F in Me||F in Ab))return!1;if(!(ql&&!Wl[b]&&B(wb,b))){if(!(qm&&B(bb,b))){if(!dt[b]||Wl[b]){if(!(lg(m)&&(Je.tagNameCheck instanceof RegExp&&B(Je.tagNameCheck,m)||Je.tagNameCheck instanceof Function&&Je.tagNameCheck(m))&&(Je.attributeNameCheck instanceof RegExp&&B(Je.attributeNameCheck,b)||Je.attributeNameCheck instanceof Function&&Je.attributeNameCheck(b))||b==="is"&&Je.allowCustomizedBuiltInElements&&(Je.tagNameCheck instanceof RegExp&&B(Je.tagNameCheck,F)||Je.tagNameCheck instanceof Function&&Je.tagNameCheck(F))))return!1}else if(!Ql[b]){if(!B(zm,M(F,$m,""))){if(!((b==="src"||b==="xlink:href"||b==="href")&&m!=="script"&&A(F,"data:")===0&&Jm[m])){if(!(Ym&&!B(Cb,M(F,$m,"")))){if(F)return!1}}}}}}return!0},lg=function(m){return m.indexOf("-")>0},dg=function(m){tr("beforeSanitizeAttributes",m,null);let{attributes:b}=m;if(!b)return;let F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:dt},je=b.length;for(;je--;){let _t=b[je],{name:Dt,namespaceURI:Lt,value:Yr}=_t,Qo=ft(Dt),kt=Dt==="value"?Yr:Y(Yr);if(F.attrName=Qo,F.attrValue=kt,F.keepAttr=!0,F.forceKeepAttr=void 0,tr("uponSanitizeAttribute",m,F),kt=F.attrValue,F.forceKeepAttr||(nd(Dt,m),!F.keepAttr))continue;if(!Zm&&B(/\/>/i,kt)){nd(Dt,m);continue}Fi&&l([$l,zl,Gl],hg=>{kt=M(kt,hg," ")});let fg=ft(m.nodeName);if(ug(fg,Qo,kt)){if(Qm&&(Qo==="id"||Qo==="name")&&(nd(Dt,m),kt=Ib+kt),At&&typeof Oa=="object"&&typeof Oa.getAttributeType=="function"&&!Lt)switch(Oa.getAttributeType(fg,Qo)){case"TrustedHTML":{kt=At.createHTML(kt);break}case"TrustedScriptURL":{kt=At.createScriptURL(kt);break}}try{Lt?m.setAttributeNS(Lt,Dt,kt):m.setAttribute(Dt,kt),d(z.removed)}catch{}}}tr("afterSanitizeAttributes",m,null)},Pb=function k(m){let b=null,F=sg(m);for(tr("beforeSanitizeShadowDOM",m,null);b=F.nextNode();)tr("uponSanitizeShadowNode",b,null),!cg(b)&&(b.content instanceof Jn&&k(b.content),dg(b));tr("afterSanitizeShadowDOM",m,null)};return z.sanitize=function(k){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=null,F=null,je=null,_t=null;if(Xl=!k,Xl&&(k=""),typeof k!="string"&&!ag(k))if(typeof k.toString=="function"){if(k=k.toString(),typeof k!="string")throw he("dirty is not a string, aborting")}else throw he("toString is not a function");if(!z.isSupported)return k;if(Yl||ed(m),z.removed=[],typeof k=="string"&&(Ko=!1),Ko){if(k.nodeName){let Yr=ft(k.nodeName);if(!lt[Yr]||Zo[Yr])throw he("root node is forbidden and cannot be sanitized in-place")}}else if(k instanceof Vl)b=og(""),F=b.ownerDocument.importNode(k,!0),F.nodeType===1&&F.nodeName==="BODY"||F.nodeName==="HTML"?b=F:b.appendChild(F);else{if(!Li&&!Fi&&!Gr&&k.indexOf("<")===-1)return At&&Pa?At.createHTML(k):k;if(b=og(k),!b)return Li?null:Pa?Yo:""}b&&Zl&&qr(b.firstChild);let Dt=sg(Ko?k:b);for(;je=Dt.nextNode();)cg(je)||(je.content instanceof Jn&&Pb(je.content),dg(je));if(Ko)return k;if(Li){if(Na)for(_t=_b.call(b.ownerDocument);b.firstChild;)_t.appendChild(b.firstChild);else _t=b;return(dt.shadowroot||dt.shadowrootmode)&&(_t=Eb.call(we,_t,!0)),_t}let Lt=Gr?b.outerHTML:b.innerHTML;return Gr&<["!doctype"]&&b.ownerDocument&&b.ownerDocument.doctype&&b.ownerDocument.doctype.name&&B(Mt,b.ownerDocument.doctype.name)&&(Lt="\n"+Lt),Fi&&l([$l,zl,Gl],Yr=>{Lt=M(Lt,Yr," ")}),At&&Pa?At.createHTML(Lt):Lt},z.setConfig=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ed(k),Yl=!0},z.clearConfig=function(){Ui=null,Yl=!1},z.isValidAttribute=function(k,m,b){Ui||ed({});let F=ft(k),je=ft(m);return ug(F,je,b)},z.addHook=function(k,m){typeof m=="function"&&(Mn[k]=Mn[k]||[],f(Mn[k],m))},z.removeHook=function(k){if(Mn[k])return d(Mn[k])},z.removeHooks=function(k){Mn[k]&&(Mn[k]=[])},z.removeAllHooks=function(){Mn={}},z}var db=Bm();return db})});var vg=null;var od=1;function Ot(e){let t=vg;return vg=e,t}var yg={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function zb(e){if(!(cd(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===od)){if(!e.producerMustRecompute(e)&&!sd(e)){e.dirty=!1,e.lastCleanEpoch=od;return}e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=od}}function _g(e){return e&&(e.nextProducerIndex=0),Ot(e)}function Dg(e,t){if(Ot(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(cd(e))for(let n=e.nextProducerIndex;ne.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function sd(e){ja(e);for(let t=0;t0}function ja(e){var t,n,r;(t=e.producerNode)!=null||(e.producerNode=[]),(n=e.producerIndexOfThis)!=null||(e.producerIndexOfThis=[]),(r=e.producerLastReadVersion)!=null||(e.producerLastReadVersion=[])}function Gb(e){var t,n;(t=e.liveConsumerNode)!=null||(e.liveConsumerNode=[]),(n=e.liveConsumerIndexOfThis)!=null||(e.liveConsumerIndexOfThis=[])}function Wb(){throw new Error}var qb=Wb;function wg(e){qb=e}function H(e){return typeof e=="function"}function Bi(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 Va=Bi(e=>function(n){e(this),this.message=n?"".concat(n.length," errors occurred during unsubscription:\n").concat(n.map((r,i)=>"".concat(i+1,") ").concat(r.toString())).join("\n ")):"",this.name="UnsubscriptionError",this.errors=n});function Zr(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var it=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 o of n)o.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(H(r))try{r()}catch(o){t=o instanceof Va?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{bg(o)}catch(s){t=t!=null?t:[],s instanceof Va?t=[...t,...s.errors]:t.push(s)}}if(t)throw new Va(t)}}add(t){var n;if(t&&t!==this)if(this.closed)bg(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)&&Zr(n,t)}remove(t){let{_finalizers:n}=this;n&&Zr(n,t),t instanceof e&&t._removeParent(this)}};it.EMPTY=(()=>{let e=new it;return e.closed=!0,e})();var ud=it.EMPTY;function Ua(e){return e instanceof it||e&&"closed"in e&&H(e.remove)&&H(e.add)&&H(e.unsubscribe)}function bg(e){H(e)?e():e.unsubscribe()}var fn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Hi={setTimeout(e,t,...n){let{delegate:r}=Hi;return r!=null&&r.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Hi;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Ba(e){Hi.setTimeout(()=>{let{onUnhandledError:t}=fn;if(t)t(e);else throw e})}function Gt(){}var Cg=(()=>ld("C",void 0,void 0))();function Ig(e){return ld("E",void 0,e)}function Sg(e){return ld("N",e,void 0)}function ld(e,t,n){return{kind:e,value:t,error:n}}var Kr=null;function $i(e){if(fn.useDeprecatedSynchronousErrorHandling){let t=!Kr;if(t&&(Kr={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=Kr;if(Kr=null,n)throw r}}else e()}function Mg(e){fn.useDeprecatedSynchronousErrorHandling&&Kr&&(Kr.errorThrown=!0,Kr.error=e)}var Qr=class extends it{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Ua(t)&&t.add(this)):this.destination=Kb}static create(t,n,r){return new nr(t,n,r)}next(t){this.isStopped?fd(Sg(t),this):this._next(t)}error(t){this.isStopped?fd(Ig(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?fd(Cg,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()}}},Yb=Function.prototype.bind;function dd(e,t){return Yb.call(e,t)}var hd=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){Ha(r)}}error(t){let{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){Ha(r)}else Ha(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){Ha(n)}}},nr=class extends Qr{constructor(t,n,r){super();let i;if(H(t)||!t)i={next:t!=null?t:void 0,error:n!=null?n:void 0,complete:r!=null?r:void 0};else{let o;this&&fn.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),i={next:t.next&&dd(t.next,o),error:t.error&&dd(t.error,o),complete:t.complete&&dd(t.complete,o)}):i=t}this.destination=new hd(i)}};function Ha(e){fn.useDeprecatedSynchronousErrorHandling?Mg(e):Ba(e)}function Zb(e){throw e}function fd(e,t){let{onStoppedNotification:n}=fn;n&&Hi.setTimeout(()=>n(e,t))}var Kb={closed:!0,next:Gt,error:Zb,complete:Gt};var zi=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")();function Qe(e){return e}function Xr(...e){return pd(e)}function pd(e){return e.length===0?Qe:e.length===1?e[0]:function(n){return e.reduce((r,i)=>i(r),n)}}var N=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,i){let o=Xb(n)?n:new nr(n,r,i);return $i(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=Tg(r),new r((i,o)=>{let s=new nr({next:a=>{try{n(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[zi](){return this}pipe(...n){return pd(n)(this)}toPromise(n){return n=Tg(n),new n((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return e.create=t=>new e(t),e})();function Tg(e){var t;return(t=e!=null?e:fn.Promise)!==null&&t!==void 0?t:Promise}function Qb(e){return e&&H(e.next)&&H(e.error)&&H(e.complete)}function Xb(e){return e&&e instanceof Qr||Qb(e)&&Ua(e)}function md(e){return H(e==null?void 0:e.lift)}function j(e){return t=>{if(md(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 P(e,t,n,r,i){return new gd(e,t,n,r,i)}var gd=class extends Qr{constructor(t,n,r,i,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(c){t.error(c)}}:super._next,this._error=i?function(a){try{i(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))}}};function Gi(){return j((e,t)=>{let n=null;e._refCount++;let r=P(t,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount){n=null;return}let i=e._connection,o=n;n=null,i&&(!o||i===o)&&i.unsubscribe(),t.unsubscribe()});e.subscribe(r),r.closed||(n=e.connect())})}var Wi=class extends N{constructor(t,n){super(),this.source=t,this.subjectFactory=n,this._subject=null,this._refCount=0,this._connection=null,md(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t==null||t.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new it;let n=this.getSubject();t.add(this.source.subscribe(P(n,void 0,()=>{this._teardown(),n.complete()},r=>{this._teardown(),n.error(r)},()=>this._teardown()))),t.closed&&(this._connection=null,t=it.EMPTY)}return t}refCount(){return Gi()(this)}};var Ag=Bi(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Te=(()=>{class e extends N{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new $a(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new Ag}next(n){$i(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){$i(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){$i(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:i,observers:o}=this;return r||i?ud:(this.currentObservers=null,o.push(n),new it(()=>{this.currentObservers=null,Zr(o,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:o}=this;r?n.error(i):o&&n.complete()}asObservable(){let n=new N;return n.source=this,n}}return e.create=(t,n)=>new $a(t,n),e})(),$a=class extends Te{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:ud}};var We=class extends Te{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 Xo={now(){return(Xo.delegate||Date).now()},delegate:void 0};var rr=class extends Te{constructor(t=1/0,n=1/0,r=Xo){super(),this._bufferSize=t,this._windowTime=n,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=n===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,n)}next(t){let{isStopped:n,_buffer:r,_infiniteTimeWindow:i,_timestampProvider:o,_windowTime:s}=this;n||(r.push(t),!i&&r.push(o.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let n=this._innerSubscribe(t),{_infiniteTimeWindow:r,_buffer:i}=this,o=i.slice();for(let s=0;se.complete());function qa(e){return e&&H(e.schedule)}function vd(e){return e[e.length-1]}function Yi(e){return H(vd(e))?e.pop():void 0}function Tn(e){return qa(vd(e))?e.pop():void 0}function xg(e,t){return typeof vd(e)=="number"?e.pop():t}function Pg(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,n,o):s(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}function Za(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,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?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})}function Ng(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 ei(e){return this instanceof ei?(this.v=e,this):new ei(e)}function Rg(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(f){r[f]&&(i[f]=function(p){return new Promise(function(g,_){o.push([f,p,g,_])>1||a(f,p)})})}function a(f,p){try{c(r[f](p))}catch(g){d(o[0][3],g)}}function c(f){f.value instanceof ei?Promise.resolve(f.value.v).then(u,l):d(o[0][2],f)}function u(f){a("next",f)}function l(f){a("throw",f)}function d(f,p){f(p),o.shift(),o.length&&a(o[0][0],o[0][1])}}function Fg(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 Ng=="function"?Ng(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,c){s=e[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(u){o({value:u,done:a})},s)}}var Zi=e=>e&&typeof e.length=="number"&&typeof e!="function";function Ka(e){return H(e==null?void 0:e.then)}function Qa(e){return H(e[zi])}function Xa(e){return Symbol.asyncIterator&&H(e==null?void 0:e[Symbol.asyncIterator])}function Ja(e){return new TypeError("You provided ".concat(e!==null&&typeof e=="object"?"an invalid object":"'".concat(e,"'")," where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."))}function Jb(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ec=Jb();function tc(e){return H(e==null?void 0:e[ec])}function nc(e){return Rg(this,arguments,function*(){let n=e.getReader();try{for(;;){let{value:r,done:i}=yield ei(n.read());if(i)return yield ei(void 0);yield yield ei(r)}}finally{n.releaseLock()}})}function rc(e){return H(e==null?void 0:e.getReader)}function Q(e){if(e instanceof N)return e;if(e!=null){if(Qa(e))return eC(e);if(Zi(e))return tC(e);if(Ka(e))return nC(e);if(Xa(e))return Lg(e);if(tc(e))return rC(e);if(rc(e))return iC(e)}throw Ja(e)}function eC(e){return new N(t=>{let n=e[zi]();if(H(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function tC(e){return new N(t=>{for(let n=0;n{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,Ba)})}function rC(e){return new N(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function Lg(e){return new N(t=>{oC(e,t).catch(n=>t.error(n))})}function iC(e){return Lg(nc(e))}function oC(e,t){var n,r,i,o;return Za(this,void 0,void 0,function*(){try{for(n=Fg(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=n.return)&&(yield o.call(n))}finally{if(i)throw i.error}}t.complete()})}function jt(e,t,n,r=0,i=!1){let o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function ic(e,t=0){return j((n,r)=>{n.subscribe(P(r,i=>jt(r,e,()=>r.next(i),t),()=>jt(r,e,()=>r.complete(),t),i=>jt(r,e,()=>r.error(i),t)))})}function oc(e,t=0){return j((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function kg(e,t){return Q(e).pipe(oc(t),ic(t))}function jg(e,t){return Q(e).pipe(oc(t),ic(t))}function Vg(e,t){return new N(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Ug(e,t){return new N(n=>{let r;return jt(n,t,()=>{r=e[ec](),jt(n,t,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){n.error(s);return}o?n.complete():n.next(i)},0,!0)}),()=>H(r==null?void 0:r.return)&&r.return()})}function sc(e,t){if(!e)throw new Error("Iterable cannot be null");return new N(n=>{jt(n,t,()=>{let r=e[Symbol.asyncIterator]();jt(n,t,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function Bg(e,t){return sc(nc(e),t)}function Hg(e,t){if(e!=null){if(Qa(e))return kg(e,t);if(Zi(e))return Vg(e,t);if(Ka(e))return jg(e,t);if(Xa(e))return sc(e,t);if(tc(e))return Ug(e,t);if(rc(e))return Bg(e,t)}throw Ja(e)}function Oe(e,t){return t?Hg(e,t):Q(e)}function T(...e){let t=Tn(e);return Oe(e,t)}function Ki(e,t){let n=H(e)?e:()=>e,r=i=>i.error(n());return new N(t?i=>t.schedule(r,0,i):r)}function ti(e){return!!e&&(e instanceof N||H(e.lift)&&H(e.subscribe))}var ir=Bi(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function $g(e){return e instanceof Date&&!isNaN(e)}function w(e,t){return j((n,r)=>{let i=0;n.subscribe(P(r,o=>{r.next(e.call(t,o,i++))}))})}var{isArray:sC}=Array;function aC(e,t){return sC(t)?e(...t):e(t)}function Qi(e){return w(t=>aC(e,t))}var{isArray:cC}=Array,{getPrototypeOf:uC,prototype:lC,keys:dC}=Object;function ac(e){if(e.length===1){let t=e[0];if(cC(t))return{args:t,keys:null};if(fC(t)){let n=dC(t);return{args:n.map(r=>t[r]),keys:n}}}return{args:e,keys:null}}function fC(e){return e&&typeof e=="object"&&uC(e)===lC}function cc(e,t){return e.reduce((n,r,i)=>(n[r]=t[i],n),{})}function uc(...e){let t=Tn(e),n=Yi(e),{args:r,keys:i}=ac(e);if(r.length===0)return Oe([],t);let o=new N(hC(r,t,i?s=>cc(i,s):Qe));return n?o.pipe(Qi(n)):o}function hC(e,t,n=Qe){return r=>{zg(t,()=>{let{length:i}=e,o=new Array(i),s=i,a=i;for(let c=0;c{let u=Oe(e[c],t),l=!1;u.subscribe(P(r,d=>{o[c]=d,l||(l=!0,a--),a||r.next(n(o.slice()))},()=>{--s||r.complete()}))},r)},r)}}function zg(e,t,n){e?jt(n,e,t):t()}function Gg(e,t,n,r,i,o,s,a){let c=[],u=0,l=0,d=!1,f=()=>{d&&!c.length&&!u&&t.complete()},p=_=>u{o&&t.next(_),u++;let M=!1;Q(n(_,l++)).subscribe(P(t,A=>{i==null||i(A),o?p(A):t.next(A)},()=>{M=!0},void 0,()=>{if(M)try{for(u--;c.length&&ug(A)):g(A)}f()}catch(A){t.error(A)}}))};return e.subscribe(P(t,p,()=>{d=!0,f()})),()=>{a==null||a()}}function Ze(e,t,n=1/0){return H(t)?Ze((r,i)=>w((o,s)=>t(r,o,i,s))(Q(e(r,i))),n):(typeof t=="number"&&(n=t),j((r,i)=>Gg(r,i,e,n)))}function es(e=1/0){return Ze(Qe,e)}function Wg(){return es(1)}function Vt(...e){return Wg()(Oe(e,Tn(e)))}function An(e){return new N(t=>{Q(e()).subscribe(t)})}function yd(...e){let t=Yi(e),{args:n,keys:r}=ac(e),i=new N(o=>{let{length:s}=n;if(!s){o.complete();return}let a=new Array(s),c=s,u=s;for(let l=0;l{d||(d=!0,u--),a[l]=f},()=>c--,void 0,()=>{(!c||!d)&&(u||o.next(r?cc(r,a):a),o.complete())}))}});return t?i.pipe(Qi(t)):i}var pC=["addListener","removeListener"],mC=["addEventListener","removeEventListener"],gC=["on","off"];function On(e,t,n,r){if(H(n)&&(r=n,n=void 0),r)return On(e,t,n).pipe(Qi(r));let[i,o]=_C(e)?mC.map(s=>a=>e[s](t,a,n)):vC(e)?pC.map(qg(e,t)):yC(e)?gC.map(qg(e,t)):[];if(!i&&Zi(e))return Ze(s=>On(s,t,n))(Q(e));if(!i)throw new TypeError("Invalid event target");return new N(s=>{let a=(...c)=>s.next(1o(a)})}function qg(e,t){return n=>r=>e[n](t,r)}function vC(e){return H(e.addListener)&&H(e.removeListener)}function yC(e){return H(e.on)&&H(e.off)}function _C(e){return H(e.addEventListener)&&H(e.removeEventListener)}function ht(e=0,t,n=Og){let r=-1;return t!=null&&(qa(t)?n=t:r=t),new N(i=>{let o=$g(e)?+e-n.now():e;o<0&&(o=0);let s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function xe(...e){let t=Tn(e),n=xg(e,1/0),r=e;return r.length?r.length===1?Q(r[0]):es(n)(Oe(r,t)):Ae}var DC=new N(Gt);var{isArray:EC}=Array;function Yg(e){return e.length===1&&EC(e[0])?e[0]:e}function ye(e,t){return j((n,r)=>{let i=0;n.subscribe(P(r,o=>e.call(t,o,i++)&&r.next(o)))})}function _d(...e){return e=Yg(e),e.length===1?Q(e[0]):new N(wC(e))}function wC(e){return t=>{let n=[];for(let r=0;n&&!t.closed&&r{if(n){for(let o=0;o{let r=null,i=!1,o;r=t.subscribe(P(n,void 0,void 0,s=>{o=Q(e(s,hn(e)(t))),r?(r.unsubscribe(),r=null,o.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(n))})}function Zg(e,t,n,r,i){return(o,s)=>{let a=n,c=t,u=0;o.subscribe(P(s,l=>{let d=u++;c=a?e(c,l,d):(a=!0,l),r&&s.next(c)},i&&(()=>{a&&s.next(c),s.complete()})))}}function ni(e,t){return H(t)?Ze(e,t,1):Ze(e,1)}function bC(e){return j((t,n)=>{let r=!1,i=null,o=null,s=()=>{if(o==null||o.unsubscribe(),o=null,r){r=!1;let a=i;i=null,n.next(a)}};t.subscribe(P(n,a=>{o==null||o.unsubscribe(),r=!0,i=a,o=P(n,s,Gt),Q(e(a)).subscribe(o)},()=>{s(),n.complete()},void 0,()=>{i=o=null}))})}function Kg(e,t=Jr){return j((n,r)=>{let i=null,o=null,s=null,a=()=>{if(i){i.unsubscribe(),i=null;let u=o;o=null,r.next(u)}};function c(){let u=s+e,l=t.now();if(l{o=u,s=t.now(),i||(i=t.schedule(c,e),r.add(i))},()=>{a(),r.complete()},void 0,()=>{o=i=null}))})}function Er(e){return j((t,n)=>{let r=!1;t.subscribe(P(n,i=>{r=!0,n.next(i)},()=>{r||n.next(e),n.complete()}))})}function Ke(e){return e<=0?()=>Ae:j((t,n)=>{let r=0;t.subscribe(P(n,i=>{++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Xi(){return j((e,t)=>{e.subscribe(P(t,Gt))})}function ts(e){return w(()=>e)}function Dd(e,t){return t?n=>Vt(t.pipe(Ke(1),Xi()),n.pipe(Dd(e))):Ze((n,r)=>Q(e(n,r)).pipe(Ke(1),ts(n)))}function ns(e,t=Jr){let n=ht(e,t);return Dd(()=>n)}function Ue(e,t=Qe){return e=e!=null?e:CC,j((n,r)=>{let i,o=!0;n.subscribe(P(r,s=>{let a=t(s);(o||!e(i,a))&&(o=!1,i=a,r.next(s))}))})}function CC(e,t){return e===t}function lc(e=IC){return j((t,n)=>{let r=!1;t.subscribe(P(n,i=>{r=!0,n.next(i)},()=>r?n.complete():n.error(e())))})}function IC(){return new ir}function rs(...e){return t=>Vt(t,T(...e))}function wr(e){return j((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function pn(e,t){let n=arguments.length>=2;return r=>r.pipe(e?ye((i,o)=>e(i,o,r)):Qe,Ke(1),n?Er(t):lc(()=>new ir))}function Ji(e){return e<=0?()=>Ae:j((t,n)=>{let r=[];t.subscribe(P(n,i=>{r.push(i),e{for(let i of r)n.next(i);n.complete()},void 0,()=>{r=null}))})}function Ed(e,t){let n=arguments.length>=2;return r=>r.pipe(e?ye((i,o)=>e(i,o,r)):Qe,Ji(1),n?Er(t):lc(()=>new ir))}function dc(e){let t=1/0,n;return e!=null&&(typeof e=="object"?{count:t=1/0,delay:n}=e:t=e),t<=0?()=>Ae:j((r,i)=>{let o=0,s,a=()=>{if(s==null||s.unsubscribe(),s=null,n!=null){let u=typeof n=="number"?ht(n):Q(n(o)),l=P(i,()=>{l.unsubscribe(),c()});u.subscribe(l)}else c()},c=()=>{let u=!1;s=r.subscribe(P(i,void 0,()=>{++o{let r,i=!1,o,s=!1,a=!1,c=()=>a&&s&&(n.complete(),!0),u=()=>(o||(o=new Te,Q(e(o)).subscribe(P(n,()=>{r?l():i=!0},()=>{s=!0,c()}))),o),l=()=>{a=!1,r=t.subscribe(P(n,void 0,()=>{a=!0,!c()&&u().next()})),i&&(r.unsubscribe(),r=null,i=!1,l())};l()})}function fc(e,t){return j(Zg(e,t,arguments.length>=2,!0))}function Et(e={}){let{connector:t=()=>new Te,resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:i=!0}=e;return o=>{let s,a,c,u=0,l=!1,d=!1,f=()=>{a==null||a.unsubscribe(),a=void 0},p=()=>{f(),s=c=void 0,l=d=!1},g=()=>{let _=s;p(),_==null||_.unsubscribe()};return j((_,M)=>{u++,!d&&!l&&f();let A=c=c!=null?c:t();M.add(()=>{u--,u===0&&!d&&!l&&(a=bd(g,i))}),A.subscribe(M),!s&&u>0&&(s=new nr({next:Y=>A.next(Y),error:Y=>{d=!0,f(),a=bd(p,n,Y),A.error(Y)},complete:()=>{l=!0,f(),a=bd(p,r),A.complete()}}),Q(_).subscribe(s))})(o)}}function bd(e,t,...n){if(t===!0){e();return}if(t===!1)return;let r=new nr({next:()=>{r.unsubscribe(),e()}});return Q(t(...n)).subscribe(r)}function Wt(e,t,n){let r,i=!1;return e&&typeof e=="object"?{bufferSize:r=1/0,windowTime:t=1/0,refCount:i=!1,scheduler:n}=e:r=e!=null?e:1/0,Et({connector:()=>new rr(r,t,n),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Cd(e){return ye((t,n)=>e<=n)}function Id(e){return j((t,n)=>{let r=!1,i=0;t.subscribe(P(n,o=>(r||(r=!e(o,i++)))&&n.next(o)))})}function _e(...e){let t=Tn(e);return j((n,r)=>{(t?Vt(e,n,t):Vt(e,n)).subscribe(r)})}function ee(e,t){return j((n,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();n.subscribe(P(r,c=>{i==null||i.unsubscribe();let u=0,l=o++;Q(e(c,l)).subscribe(i=P(r,d=>r.next(t?t(c,d,l,u++):d),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function be(e){return j((t,n)=>{Q(e).subscribe(P(n,()=>n.complete(),Gt)),!n.closed&&t.subscribe(n)})}function hc(e,t=!1){return j((n,r)=>{let i=0;n.subscribe(P(r,o=>{let s=e(o,i++);(s||t)&&r.next(o),!s&&r.complete()}))})}function Ne(e,t,n){let r=H(e)||t||n?{next:e,error:t,complete:n}:e;return r?j((i,o)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;i.subscribe(P(o,c=>{var u;(u=r.next)===null||u===void 0||u.call(r,c),o.next(c)},()=>{var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),o.complete()},c=>{var u;a=!1,(u=r.error)===null||u===void 0||u.call(r,c),o.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)}))}):Qe}function Qg(e,t){return j((n,r)=>{let{leading:i=!0,trailing:o=!1}=t!=null?t:{},s=!1,a=null,c=null,u=!1,l=()=>{c==null||c.unsubscribe(),c=null,o&&(p(),u&&r.complete())},d=()=>{c=null,u&&r.complete()},f=g=>c=Q(e(g)).subscribe(P(r,l,d)),p=()=>{if(s){s=!1;let g=a;a=null,r.next(g),!u&&f(g)}};n.subscribe(P(r,g=>{s=!0,a=g,!(c&&!c.closed)&&(i?p():f(g))},()=>{u=!0,!(o&&s&&c&&!c.closed)&&r.complete()}))})}function br(e,t=Jr,n){let r=ht(e,t);return Qg(()=>r,n)}function is(...e){let t=Yi(e);return j((n,r)=>{let i=e.length,o=new Array(i),s=e.map(()=>!1),a=!1;for(let c=0;c{o[c]=u,!a&&!s[c]&&(s[c]=!0,(a=s.every(Qe))&&(s=null))},Gt));n.subscribe(P(r,c=>{if(a){let u=[c,...o];r.next(t?t(...u):u)}}))})}function Re(e){for(let t in e)if(e[t]===Re)return t;throw Error("Could not find renamed property on target object.")}function pc(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function wt(e){if(typeof e=="string")return e;if(Array.isArray(e))return"["+e.map(wt).join(", ")+"]";if(e==null)return""+e;if(e.overriddenName)return"".concat(e.overriddenName);if(e.name)return"".concat(e.name);let t=e.toString();if(t==null)return""+t;let n=t.indexOf("\n");return n===-1?t:t.substring(0,n)}function Xg(e,t){return e==null||e===""?t===null?"":t:t==null||t===""?e:e+" "+t}var SC=Re({__forward_ref__:Re});function fr(e){return e.__forward_ref__=fr,e.toString=function(){return wt(this())},e}function xt(e){return Vv(e)?e():e}function Vv(e){return typeof e=="function"&&e.hasOwnProperty(SC)&&e.__forward_ref__===fr}function Uv(e){return e&&!!e.\u0275providers}var Bv="https://g.co/ng/security#xss",C=class extends Error{constructor(t,n){super(Xc(t,n)),this.code=t}};function Xc(e,t){let n="NG0".concat(Math.abs(e));return"".concat(n).concat(t?": "+t:"")}var MC=Re({\u0275cmp:Re}),TC=Re({\u0275dir:Re}),AC=Re({\u0275pipe:Re}),OC=Re({\u0275mod:Re}),Ac=Re({\u0275fac:Re}),os=Re({__NG_ELEMENT_ID__:Re}),Jg=Re({__NG_ENV_ID__:Re});function ys(e){return typeof e=="string"?e:e==null?"":String(e)}function xC(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():ys(e)}function NC(e,t){let n=t?". Dependency path: ".concat(t.join(" > ")," > ").concat(e):"";throw new C(-200,"Circular dependency in DI detected for ".concat(e).concat(n))}function Uf(e,t){let n=t?" in ".concat(t):"";throw new C(-201,!1)}function PC(e,t){e==null&&RC(t,e,null,"!=")}function RC(e,t,n,r){throw new Error("ASSERTION ERROR: ".concat(e)+(r==null?"":" [Expected=> ".concat(n," ").concat(r," ").concat(t," <=Actual]")))}function S(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Z(e){return{providers:e.providers||[],imports:e.imports||[]}}function Jc(e){return ev(e,$v)||ev(e,zv)}function Hv(e){return Jc(e)!==null}function ev(e,t){return e.hasOwnProperty(t)?e[t]:null}function FC(e){let t=e&&(e[$v]||e[zv]);return t||null}function tv(e){return e&&(e.hasOwnProperty(nv)||e.hasOwnProperty(LC))?e[nv]:null}var $v=Re({\u0275prov:Re}),nv=Re({\u0275inj:Re}),zv=Re({ngInjectableDef:Re}),LC=Re({ngInjectorDef:Re}),se=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(se||{}),$d;function kC(){return $d}function Ut(e){let t=$d;return $d=e,t}function Gv(e,t,n){let r=Jc(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&se.Optional)return null;if(t!==void 0)return t;Uf(wt(e),"Injector")}var or=globalThis;var D=class{constructor(t,n){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof n=="number"?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.\u0275prov=S({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return"InjectionToken ".concat(this._desc)}};var jC={},cs=jC,zd="__NG_DI_FLAG__",Oc="ngTempTokenPath",VC="ngTokenPath",UC=/\n/gm,BC="\u0275",rv="__source",ss;function Ir(e){let t=ss;return ss=e,t}function HC(e,t=se.Default){if(ss===void 0)throw new C(-203,!1);return ss===null?Gv(e,void 0,t):ss.get(e,t&se.Optional?null:void 0,t)}function I(e,t=se.Default){return(kC()||HC)(xt(e),t)}function v(e,t=se.Default){return I(e,eu(t))}function eu(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Gd(e){let t=[];for(let n=0;n ");else if(typeof t=="object"){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):wt(a)))}i="{".concat(o.join(", "),"}")}return"".concat(n).concat(r?"("+r+")":"","[").concat(i,"]: ").concat(e.replace(UC,"\n "))}function _s(e){return{toString:e}.toString()}var Wv=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(Wv||{}),Fn=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Fn||{}),io={},qt=[];function qv(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let o=t.length;if(i+o===r||e.charCodeAt(i+o)<=32)return i}n=i+1}}function Wd(e,t,n){let r=0;for(;rt){s=o-1;break}}}for(;oo?f="":f=i[d+1].toLowerCase();let p=r&8?f:null;if(p&&qv(p,u,0)!==-1||r&2&&u!==f){if(mn(r))return!1;s=!0}}}}return mn(r)||s}function mn(e){return(e&1)===0}function QC(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let o=!1;for(;i-1)for(n++;n0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!mn(s)&&(t+=ov(o,i),i=""),r=s,o=o||!mn(r);n++}return i!==""&&(t+=ov(o,i)),t}function rI(e){return e.map(nI).join(",")}function iI(e){let t=[],n=[],r=1,i=2;for(;r{var i;let t=ty(e),n=Ve(R({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===Wv.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:(i=e.signals)!=null?i:!1,data:e.data||{},encapsulation:e.encapsulation||Fn.Emulated,styles:e.styles||qt,_:null,schemas:e.schemas||null,tView:null,id:""});ny(n);let r=e.dependencies;return n.directiveDefs=av(r,!1),n.pipeDefs=av(r,!0),n.id=aI(n),n})}function oI(e){return ii(e)||Qv(e)}function sI(e){return e!==null}function K(e){return _s(()=>({type:e.type,bootstrap:e.bootstrap||qt,declarations:e.declarations||qt,imports:e.imports||qt,exports:e.exports||qt,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function sv(e,t){if(e==null)return io;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],o=i;Array.isArray(i)&&(o=i[1],i=i[0]),n[i]=r,t&&(t[i]=o)}return n}function $(e){return _s(()=>{let t=ty(e);return ny(t),t})}function pi(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 ii(e){return e[MC]||null}function Qv(e){return e[TC]||null}function Xv(e){return e[AC]||null}function Jv(e){let t=ii(e)||Qv(e)||Xv(e);return t!==null?t.standalone:!1}function ey(e,t){let n=e[OC]||null;if(!n&&t===!0)throw new Error("Type ".concat(wt(e)," does not have '\u0275mod' property."));return n}function ty(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||io,exportAs:e.exportAs||null,standalone:e.standalone===!0,signals:e.signals===!0,selectors:e.selectors||qt,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:sv(e.inputs,t),outputs:sv(e.outputs),debugInfo:null}}function ny(e){var t;(t=e.features)==null||t.forEach(n=>n(e))}function av(e,t){if(!e)return null;let n=t?Xv:oI;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(sI)}function aI(e){let t=0,n=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,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].join("|");for(let i of n)t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483647+1,"c"+t}var Ht=0,ne=1,W=2,tt=3,gn=4,Zt=5,Ln=6,ls=7,vn=8,oo=9,so=10,He=11,ds=12,cv=13,ho=14,Yt=15,Ds=16,eo=17,Pn=18,tu=19,ry=20,as=21,Sd=22,oi=23,nt=25,Hf=1,fs=6,sr=7,xc=8,ao=9,Bt=10,co=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e[e.HasChildViewsToRefresh=4]="HasChildViewsToRefresh",e}(co||{});function Rn(e){return Array.isArray(e)&&typeof e[Hf]=="object"}function nn(e){return Array.isArray(e)&&e[Hf]===!0}function $f(e){return(e.flags&4)!==0}function Es(e){return e.componentOffset>-1}function nu(e){return(e.flags&1)===1}function ar(e){return!!e.template}function iy(e){return(e[W]&512)!==0}function si(e,t){let n=e.hasOwnProperty(Ac);return n?e[Ac]:null}var qd=class{constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}};function on(){return oy}function oy(e){return e.type.prototype.ngOnChanges&&(e.setInput=uI),cI}on.ngInherit=!0;function cI(){let e=ay(this),t=e==null?void 0:e.current;if(t){let n=e.previous;if(n===io)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function uI(e,t,n,r){let i=this.declaredInputs[n],o=ay(e)||lI(e,{previous:io,current:null}),s=o.current||(o.current={}),a=o.previous,c=a[i];s[i]=new qd(c&&c.currentValue,t,a===io),e[r]=t}var sy="__ngSimpleChanges__";function ay(e){return e[sy]||null}function lI(e,t){return e[sy]=t}var uv=null;var xn=function(e,t,n){uv!=null&&uv(e,t,n)},cy="svg",dI="math";function yn(e){for(;Array.isArray(e);)e=e[Ht];return e}function fI(e){for(;Array.isArray(e);){if(typeof e[Hf]=="object")return e;e=e[Ht]}return null}function uy(e,t){return yn(t[e])}function Kt(e,t){return yn(t[e.index])}function ly(e,t){return e.data[t]}function ws(e,t){return e[t]}function Mr(e,t){let n=t[e];return Rn(n)?n:n[Ht]}function hI(e){return(e[W]&4)===4}function zf(e){return(e[W]&128)===128}function pI(e){return nn(e[tt])}function uo(e,t){return t==null?null:e[t]}function dy(e){e[eo]=0}function mI(e){e[W]&1024||(e[W]|=1024,zf(e)&&ru(e))}function gI(e,t){for(;e>0;)t=t[ho],e--;return t}function fy(e){var t;return e[W]&9216||((t=e[oi])==null?void 0:t.dirty)}function hy(e){fy(e)&&ru(e)}function ru(e){let t=e[tt];for(;t!==null&&!(nn(t)&&t[W]&co.HasChildViewsToRefresh||Rn(t)&&t[W]&8192);){if(nn(t))t[W]|=co.HasChildViewsToRefresh;else if(t[W]|=8192,!zf(t))break;t=t[tt]}}function vI(e,t){if((e[W]&256)===256)throw new C(911,!1);e[as]===null&&(e[as]=[]),e[as].push(t)}var te={lFrame:Dy(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function yI(){return te.lFrame.elementDepthCount}function _I(){te.lFrame.elementDepthCount++}function DI(){te.lFrame.elementDepthCount--}function py(){return te.bindingsEnabled}function po(){return te.skipHydrationRootTNode!==null}function EI(e){return te.skipHydrationRootTNode===e}function wI(e){te.skipHydrationRootTNode=e}function bI(){te.skipHydrationRootTNode=null}function le(){return te.lFrame.lView}function ot(){return te.lFrame.tView}function kn(e){return te.lFrame.contextLView=e,e[vn]}function jn(e){return te.lFrame.contextLView=null,e}function $t(){let e=my();for(;e!==null&&e.type===64;)e=e.parent;return e}function my(){return te.lFrame.currentTNode}function CI(){let e=te.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function mi(e,t){let n=te.lFrame;n.currentTNode=e,n.isParent=t}function Gf(){return te.lFrame.isParent}function Wf(){te.lFrame.isParent=!1}function II(){return te.lFrame.contextLView}function gi(){let e=te.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function SI(e){return te.lFrame.bindingIndex=e}function bs(){return te.lFrame.bindingIndex++}function MI(e){let t=te.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function TI(){return te.lFrame.inI18n}function AI(e,t){let n=te.lFrame;n.bindingIndex=n.bindingRootIndex=e,Yd(t)}function OI(){return te.lFrame.currentDirectiveIndex}function Yd(e){te.lFrame.currentDirectiveIndex=e}function gy(e){let t=te.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function vy(){return te.lFrame.currentQueryIndex}function qf(e){te.lFrame.currentQueryIndex=e}function xI(e){let t=e[ne];return t.type===2?t.declTNode:t.type===1?e[Zt]:null}function yy(e,t,n){if(n&se.SkipSelf){let i=t,o=e;for(;i=i.parent,i===null&&!(n&se.Host);)if(i=xI(o),i===null||(o=o[ho],i.type&10))break;if(i===null)return!1;t=i,e=o}let r=te.lFrame=_y();return r.currentTNode=t,r.lView=e,!0}function Yf(e){let t=_y(),n=e[ne];te.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function _y(){let e=te.lFrame,t=e===null?null:e.child;return t===null?Dy(e):t}function Dy(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 Ey(){let e=te.lFrame;return te.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var wy=Ey;function Zf(){let e=Ey();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 NI(e){return(te.lFrame.contextLView=gI(e,te.lFrame.contextLView))[vn]}function mo(){return te.lFrame.selectedIndex}function ai(e){te.lFrame.selectedIndex=e}function iu(){let e=te.lFrame;return ly(e.tView,e.selectedIndex)}function Cs(){te.lFrame.currentNamespace=cy}function by(){PI()}function PI(){te.lFrame.currentNamespace=null}function Cy(){return te.lFrame.currentNamespace}var Iy=!0;function ou(){return Iy}function Tr(e){Iy=e}function RI(e,t,n){var s,a,c,u,l;let{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=t.type.prototype;if(r){let d=oy(t);((s=n.preOrderHooks)!=null?s:n.preOrderHooks=[]).push(e,d),((a=n.preOrderCheckHooks)!=null?a:n.preOrderCheckHooks=[]).push(e,d)}i&&((c=n.preOrderHooks)!=null?c:n.preOrderHooks=[]).push(0-e,i),o&&(((u=n.preOrderHooks)!=null?u:n.preOrderHooks=[]).push(e,o),((l=n.preOrderCheckHooks)!=null?l:n.preOrderCheckHooks=[]).push(e,o))}function su(e,t){var n,r,i,o,s,a,c;for(let u=t.directiveStart,l=t.directiveEnd;u=r)break}else t[c]<0&&(e[eo]+=65536),(a>14>16&&(e[W]&3)===t&&(e[W]+=16384,lv(a,o)):lv(a,o)}var ro=-1,ci=class{constructor(t,n,r){this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r}};function LI(e){return e instanceof ci}function kI(e){return(e.flags&8)!==0}function jI(e){return(e.flags&16)!==0}function My(e){return e!==ro}function Nc(e){let t=e&32767;return e&32767}function VI(e){return e>>16}function Pc(e,t){let n=VI(e),r=t;for(;n>0;)r=r[ho],n--;return r}var Zd=!0;function Rc(e){let t=Zd;return Zd=e,t}var UI=256,Ty=UI-1,Ay=5,BI=0,Nn={};function HI(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(os)&&(r=n[os]),r==null&&(r=n[os]=BI++);let i=r&Ty,o=1<>Ay)]|=o}function Fc(e,t){let n=Oy(e,t);if(n!==-1)return n;let r=t[ne];r.firstCreatePass&&(e.injectorIndex=t.length,Td(r.data,e),Td(t,null),Td(r.blueprint,null));let i=Kf(e,t),o=e.injectorIndex;if(My(i)){let s=Nc(i),a=Pc(i,t),c=a[ne].data;for(let u=0;u<8;u++)t[o+u]=a[s+u]|c[s+u]}return t[o+8]=i,o}function Td(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Oy(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Kf(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=Fy(i),r===null)return ro;if(n++,i=i[ho],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return ro}function Kd(e,t,n){HI(e,t,n)}function xy(e,t,n){if(n&se.Optional||e!==void 0)return e;Uf(t,"NodeInjector")}function Ny(e,t,n,r){if(n&se.Optional&&r===void 0&&(r=null),!(n&(se.Self|se.Host))){let i=e[oo],o=Ut(void 0);try{return i?i.get(t,r,n&se.Optional):Gv(t,r,n&se.Optional)}finally{Ut(o)}}return xy(r,t,n)}function Py(e,t,n,r=se.Default,i){if(e!==null){if(t[W]&2048&&!(r&se.Self)){let s=WI(e,t,n,r,Nn);if(s!==Nn)return s}let o=Ry(e,t,n,r,Nn);if(o!==Nn)return o}return Ny(t,n,r,i)}function Ry(e,t,n,r,i){let o=zI(n);if(typeof o=="function"){if(!yy(t,e,r))return r&se.Host?xy(i,n,r):Ny(t,n,r,i);try{let s;if(s=o(r),s==null&&!(r&se.Optional))Uf(n);else return s}finally{wy()}}else if(typeof o=="number"){let s=null,a=Oy(e,t),c=ro,u=r&se.Host?t[Yt][Zt]:null;for((a===-1||r&se.SkipSelf)&&(c=a===-1?Kf(e,t):t[a+8],c===ro||!fv(r,!1)?a=-1:(s=t[ne],a=Nc(c),t=Pc(c,t)));a!==-1;){let l=t[ne];if(dv(o,a,l.data)){let d=$I(a,t,n,s,r,u);if(d!==Nn)return d}c=t[a+8],c!==ro&&fv(r,t[ne].data[a+8]===u)&&dv(o,a,t)?(s=l,a=Nc(c),t=Pc(c,t)):a=-1}}return i}function $I(e,t,n,r,i,o){let s=t[ne],a=s.data[e+8],c=r==null?Es(a)&&Zd:r!=s&&(a.type&3)!==0,u=i&se.Host&&o===a,l=Ic(a,s,n,c,u);return l!==null?ui(t,s,l,a):Nn}function Ic(e,t,n,r,i){let o=e.providerIndexes,s=t.data,a=o&1048575,c=e.directiveStart,u=e.directiveEnd,l=o>>20,d=r?a:a+l,f=i?a+l:u;for(let p=d;p=c&&g.type===n)return p}if(i){let p=s[c];if(p&&ar(p)&&p.type===n)return c}return null}function ui(e,t,n,r){let i=e[n],o=t.data;if(LI(i)){let s=i;s.resolving&&NC(xC(o[n]));let a=Rc(s.canSeeViewProviders);s.resolving=!0;let c,u=s.injectImpl?Ut(s.injectImpl):null,l=yy(e,r,se.Default);try{i=e[n]=s.factory(void 0,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&RI(n,o[n],t)}finally{u!==null&&Ut(u),Rc(a),s.resolving=!1,wy()}}return i}function zI(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(os)?e[os]:void 0;return typeof t=="number"?t>=0?t&Ty:GI:t}function dv(e,t,n){let r=1<>Ay)]&r)}function fv(e,t){return!(e&se.Self)&&!(e&se.Host&&t)}var ri=class{constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return Py(this._tNode,this._lView,t,eu(r),n)}};function GI(){return new ri($t(),le())}function Fe(e){return _s(()=>{let t=e.prototype.constructor,n=t[Ac]||Qd(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let o=i[Ac]||Qd(i);if(o&&o!==n)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function Qd(e){return Vv(e)?()=>{let t=Qd(xt(e));return t&&t()}:si(e)}function WI(e,t,n,r,i){let o=e,s=t;for(;o!==null&&s!==null&&s[W]&2048&&!(s[W]&512);){let a=Ry(o,s,n,r|se.Self,Nn);if(a!==Nn)return a;let c=o.parent;if(!c){let u=s[ry];if(u){let l=u.get(n,Nn,r);if(l!==Nn)return l}c=Fy(s),s=s[ho]}o=c}return i}function Fy(e){let t=e[ne],n=t.type;return n===2?t.declTNode:n===1?e[Zt]:null}var mc="__parameters__";function qI(e){return function(...n){if(e){let r=e(...n);for(let i in r)this[i]=r[i]}}}function Qf(e,t,n){return _s(()=>{let r=qI(t);function i(...o){if(this instanceof i)return r.apply(this,o),this;let s=new i(...o);return a.annotation=s,a;function a(c,u,l){let d=c.hasOwnProperty(mc)?c[mc]:Object.defineProperty(c,mc,{value:[]})[mc];for(;d.length<=l;)d.push(null);return(d[l]=d[l]||[]).push(s),c}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i})}function YI(e){return typeof e=="function"}function ZI(e,t,n){if(e.length!==t.length)return!1;for(let r=0;rArray.isArray(n)?Xf(n,t):t(n))}function Ly(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Lc(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function ky(e,t){let n=[];for(let r=0;rt;){let o=i-2;e[i]=e[o],i--}e[t]=n,e[t+1]=r}}function XI(e,t,n){let r=Is(e,t);return r>=0?e[r|1]=n:(r=~r,QI(e,r,t,n)),r}function Ad(e,t){let n=Is(e,t);if(n>=0)return e[n|1]}function Is(e,t){return JI(e,t,1)}function JI(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let o=r+(i-r>>1),s=e[o<t?i=o:r=o+1}return~(i<{n.push(s)};return Xf(t,s=>{let a=s;Xd(a,o,[],r)&&(i||(i=[]),i.push(a))}),i!==void 0&&By(i,o),n}function By(e,t){for(let n=0;n{t(o,r)})}}function Xd(e,t,n,r){if(e=xt(e),!e)return!1;let i=null,o=tv(e),s=!o&&ii(e);if(!o&&!s){let c=e.ngModule;if(o=tv(c),o)i=c;else return!1}else{if(s&&!s.standalone)return!1;i=e}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let u of c)Xd(u,t,n,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let u;try{Xf(o.imports,l=>{Xd(l,t,n,r)&&(u||(u=[]),u.push(l))})}finally{}u!==void 0&&By(u,t)}if(!a){let u=si(i)||(()=>new i);t({provide:i,useFactory:u,deps:qt},i),t({provide:Vy,useValue:i,multi:!0},i),t({provide:go,useValue:()=>I(i),multi:!0},i)}let c=o.providers;if(c!=null&&!a){let u=e;Jf(c,l=>{t(l,u)})}}else return!1;return i!==e&&e.providers!==void 0}function Jf(e,t){for(let n of e)Uv(n)&&(n=n.\u0275providers),Array.isArray(n)?Jf(n,t):t(n)}var tS=Re({provide:String,useValue:Re});function Hy(e){return e!==null&&typeof e=="object"&&tS in e}function nS(e){return!!(e&&e.useExisting)}function rS(e){return!!(e&&e.useFactory)}function lo(e){return typeof e=="function"}function iS(e){return!!e.useClass}var au=new D("Set Injector scope."),Sc={},oS={},Od;function eh(){return Od===void 0&&(Od=new kc),Od}var rn=class{},hs=class extends rn{get destroyed(){return this._destroyed}constructor(t,n,r,i){super(),this.parent=n,this.source=r,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,ef(t,s=>this.processProvider(s)),this.records.set(vo,to(void 0,this)),i.has("environment")&&this.records.set(rn,to(void 0,this));let o=this.records.get(au);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Vy,qt,se.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear()}}onDestroy(t){return this.assertNotDestroyed(),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){this.assertNotDestroyed();let n=Ir(this),r=Ut(void 0),i;try{return t()}finally{Ir(n),Ut(r)}}get(t,n=cs,r=se.Default){if(this.assertNotDestroyed(),t.hasOwnProperty(Jg))return t[Jg](this);r=eu(r);let i,o=Ir(this),s=Ut(void 0);try{if(!(r&se.SkipSelf)){let c=this.records.get(t);if(c===void 0){let u=lS(t)&&Jc(t);u&&this.injectableDefInScope(u)?c=to(Jd(t),Sc):c=null,this.records.set(t,c)}if(c!=null)return this.hydrate(t,c)}let a=r&se.Self?eh():this.parent;return n=r&se.Optional&&n===cs?null:n,a.get(t,n)}catch(a){if(a.name==="NullInjectorError"){if((a[Oc]=a[Oc]||[]).unshift(wt(t)),o)throw a;return zC(a,t,"R3InjectorError",this.source)}else throw a}finally{Ut(s),Ir(o)}}resolveInjectorInitializers(){let t=Ir(this),n=Ut(void 0),r;try{let i=this.get(go,qt,se.Self);for(let o of i)o()}finally{Ir(t),Ut(n)}}toString(){let t=[],n=this.records;for(let r of n.keys())t.push(wt(r));return"R3Injector[".concat(t.join(", "),"]")}assertNotDestroyed(){if(this._destroyed)throw new C(205,!1)}processProvider(t){t=xt(t);let n=lo(t)?t:xt(t&&t.provide),r=aS(t);if(!lo(t)&&t.multi===!0){let i=this.records.get(n);i||(i=to(void 0,Sc,!0),i.factory=()=>Gd(i.multi),this.records.set(n,i)),n=t,i.multi.push(t)}else{let i=this.records.get(n)}this.records.set(n,r)}hydrate(t,n){return n.value===Sc&&(n.value=oS,n.value=n.factory()),typeof n.value=="object"&&n.value&&uS(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}injectableDefInScope(t){if(!t.providedIn)return!1;let n=xt(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 Jd(e){let t=Jc(e),n=t!==null?t.factory:si(e);if(n!==null)return n;if(e instanceof D)throw new C(204,!1);if(e instanceof Function)return sS(e);throw new C(204,!1)}function sS(e){let t=e.length;if(t>0){let r=ky(t,"?");throw new C(204,!1)}let n=FC(e);return n!==null?()=>n.factory(e):()=>new e}function aS(e){if(Hy(e))return to(void 0,e.useValue);{let t=$y(e);return to(t,Sc)}}function $y(e,t,n){let r;if(lo(e)){let i=xt(e);return si(i)||Jd(i)}else if(Hy(e))r=()=>xt(e.useValue);else if(rS(e))r=()=>e.useFactory(...Gd(e.deps||[]));else if(nS(e))r=()=>I(xt(e.useExisting));else{let i=xt(e&&(e.useClass||e.provide));if(cS(e))r=()=>new i(...Gd(e.deps));else return si(i)||Jd(i)}return r}function to(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function cS(e){return!!e.deps}function uS(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function lS(e){return typeof e=="function"||typeof e=="object"&&e instanceof D}function ef(e,t){for(let n of e)Array.isArray(n)?ef(n,t):n&&Uv(n)?ef(n.\u0275providers,t):t(n)}function Ar(e,t){e instanceof hs&&e.assertNotDestroyed();let n,r=Ir(e),i=Ut(void 0);try{return t()}finally{Ir(r),Ut(i)}}function hv(e,t=null,n=null,r){let i=zy(e,t,n,r);return i.resolveInjectorInitializers(),i}function zy(e,t=null,n=null,r,i=new Set){let o=[n||qt,eS(e)];return r=r||(typeof e=="object"?void 0:wt(e)),new hs(o,t||eh(),r||null,i)}var bt=(()=>{let t=class t{static create(r,i){var o;if(Array.isArray(r))return hv({name:""},i,r,"");{let s=(o=r.name)!=null?o:"";return hv({name:s},r.parent,r.providers,s)}}};t.THROW_IF_NOT_FOUND=cs,t.NULL=new kc,t.\u0275prov=S({token:t,providedIn:"any",factory:()=>I(vo)}),t.__NG_ELEMENT_ID__=-1;let e=t;return e})();var tf;function Gy(e){tf=e}function Ss(){if(tf!==void 0)return tf;if(typeof document<"u")return document;throw new C(210,!1)}var cu=new D("AppId",{providedIn:"root",factory:()=>dS}),dS="ng",th=new D("Platform Initializer"),Qt=new D("Platform ID",{providedIn:"platform",factory:()=>"unknown"});var Dz=new D("AnimationModuleType"),nh=new D("CSP nonce",{providedIn:"root",factory:()=>{var e,t;return((t=(e=Ss().body)==null?void 0:e.querySelector("[ngCspNonce]"))==null?void 0:t.getAttribute("ngCspNonce"))||null}});function Ez(e){return e.ownerDocument.defaultView}function wz(e){return e.ownerDocument}function fS(e){return e.ownerDocument.body}function Wy(e){return e instanceof Function?e():e}function gc(e){return(e!=null?e:v(bt)).get(Qt)==="browser"}var hS="ngSkipHydration",pS="ngskiphydration";function qy(e){let t=e.mergedAttrs;if(t===null)return!1;for(let n=0;n|^->||--!>|)/g,yS="\u200B$1\u200B";function _S(e){return e.replace(gS,t=>t.replace(vS,yS))}var Zy=new Map,DS=0;function ES(){return DS++}function wS(e){Zy.set(e[tu],e)}function bS(e){Zy.delete(e[tu])}var pv="__ngContext__";function Sr(e,t){Rn(t)?(e[pv]=t[tu],wS(t)):e[pv]=t}var CS;function rh(e,t){return CS(e,t)}function ih(e){let t=e[tt];return nn(t)?t[tt]:t}function Ky(e){return Xy(e[ds])}function Qy(e){return Xy(e[gn])}function Xy(e){for(;e!==null&&!nn(e);)e=e[gn];return e}function no(e,t,n,r,i){if(r!=null){let o,s=!1;nn(r)?o=r:Rn(r)&&(s=!0,r=r[Ht]);let a=yn(r);e===0&&n!==null?i==null?i_(t,n,a):Vc(t,n,a,i||null,!0):e===1&&n!==null?Vc(t,n,a,i||null,!0):e===2?a_(t,a,s):e===3&&t.destroyNode(a),o!=null&&US(t,e,o,n,i)}}function Jy(e,t){return e.createText(t)}function IS(e,t,n){e.setValue(t,n)}function e_(e,t){return e.createComment(_S(t))}function oh(e,t,n){return e.createElement(t,n)}function SS(e,t){let n=t[He];Ms(e,t,n,2,null,null),t[Ht]=null,t[Zt]=null}function MS(e,t,n,r,i,o){r[Ht]=i,r[Zt]=t,Ms(e,r,n,1,i,o)}function TS(e,t){Ms(e,t,t[He],2,null,null)}function AS(e){let t=e[ds];if(!t)return xd(e[ne],e);for(;t;){let n=null;if(Rn(t))n=t[ds];else{let r=t[Bt];r&&(n=r)}if(!n){for(;t&&!t[gn]&&t!==e;)Rn(t)&&xd(t[ne],t),t=t[tt];t===null&&(t=e),Rn(t)&&xd(t[ne],t),n=t&&t[gn]}t=n}}function OS(e,t,n,r){let i=Bt+r,o=n.length;r>0&&(n[i-1][gn]=t),r0&&(e[n-1][gn]=r[gn]);let o=Lc(e,Bt+t);SS(r[ne],r);let s=o[Pn];s!==null&&s.detachView(o[ne]),r[tt]=null,r[gn]=null,r[W]&=-129}return r}function n_(e,t){if(!(t[W]&256)){let n=t[He];n.destroyNode&&Ms(e,t,n,3,null,null),AS(t)}}function xd(e,t){if(!(t[W]&256)){t[W]&=-129,t[W]|=256,t[oi]&&Eg(t[oi]),PS(e,t),NS(e,t),t[ne].type===1&&t[He].destroy();let n=t[Ds];if(n!==null&&nn(t[tt])){n!==t[tt]&&t_(n,t);let r=t[Pn];r!==null&&r.detachView(e)}bS(t)}}function NS(e,t){let n=e.cleanup,r=t[ls];if(n!==null)for(let o=0;o=0?r[s]():r[-s].unsubscribe(),o+=2}else{let s=r[n[o+1]];n[o].call(s)}r!==null&&(t[ls]=null);let i=t[as];if(i!==null){t[as]=null;for(let o=0;o-1){let{encapsulation:o}=e.data[r.directiveStart+i];if(o===Fn.None||o===Fn.Emulated)return null}return Kt(r,n)}}function Vc(e,t,n,r,i){e.insertBefore(t,n,r,i)}function i_(e,t,n){e.appendChild(t,n)}function mv(e,t,n,r,i){r!==null?Vc(e,t,n,r,i):i_(e,t,n)}function FS(e,t,n,r){e.removeChild(t,n,r)}function sh(e,t){return e.parentNode(t)}function LS(e,t){return e.nextSibling(t)}function o_(e,t,n){return jS(e,t,n)}function kS(e,t,n){return e.type&40?Kt(e,n):null}var jS=kS,gv;function uu(e,t,n,r){let i=r_(e,r,t),o=t[He],s=r.parent||t[Zt],a=o_(s,r,t);if(i!=null)if(Array.isArray(n))for(let c=0;ce,createScript:e=>e,createScriptURL:e=>e})}catch{}return vc}function lu(e){var t;return((t=$S())==null?void 0:t.createHTML(e))||e}var yc;function zS(){if(yc===void 0&&(yc=null,or.trustedTypes))try{yc=or.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return yc}function vv(e){var t;return((t=zS())==null?void 0:t.createHTML(e))||e}var ur=class{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return"SafeValue must use [property]=binding: ".concat(this.changingThisBreaksApplicationSecurity)+" (see ".concat(Bv,")")}},of=class extends ur{getTypeName(){return"HTML"}},sf=class extends ur{getTypeName(){return"Style"}},af=class extends ur{getTypeName(){return"Script"}},cf=class extends ur{getTypeName(){return"URL"}},uf=class extends ur{getTypeName(){return"ResourceURL"}};function Vn(e){return e instanceof ur?e.changingThisBreaksApplicationSecurity:e}function Or(e,t){let n=GS(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error("Required a safe ".concat(t,", got a ").concat(n," (see ").concat(Bv,")"))}return n===t}function GS(e){return e instanceof ur&&e.getTypeName()||null}function f_(e){return new of(e)}function h_(e){return new sf(e)}function p_(e){return new af(e)}function m_(e){return new cf(e)}function g_(e){return new uf(e)}function WS(e){let t=new df(e);return qS()?new lf(t):t}var lf=class{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{let n=new window.DOMParser().parseFromString(lu(t),"text/html").body;return n===null?this.inertDocumentHelper.getInertBodyElement(t):(n.removeChild(n.firstChild),n)}catch{return null}}},df=class{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let n=this.inertDocument.createElement("template");return n.innerHTML=lu(t),n}};function qS(){try{return!!new window.DOMParser().parseFromString(lu(""),"text/html")}catch{return!1}}var YS=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function du(e){return e=String(e),e.match(YS)?e:"unsafe:"+e}function mr(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function Ts(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var v_=mr("area,br,col,hr,img,wbr"),y_=mr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),__=mr("rp,rt"),ZS=Ts(__,y_),KS=Ts(y_,mr("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")),QS=Ts(__,mr("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")),yv=Ts(v_,KS,QS,ZS),D_=mr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),XS=mr("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"),JS=mr("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"),eM=Ts(D_,XS,JS),tM=mr("script,style,template"),ff=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let n=t.firstChild,r=!0;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){n=n.firstChild;continue}for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let i=this.checkClobberedElement(n,n.nextSibling);if(i){n=i;break}n=this.checkClobberedElement(n,n.parentNode)}}return this.buf.join("")}startElement(t){let n=t.nodeName.toLowerCase();if(!yv.hasOwnProperty(n))return this.sanitizedSomething=!0,!tM.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);let r=t.attributes;for(let i=0;i"),!0}endElement(t){let n=t.nodeName.toLowerCase();yv.hasOwnProperty(n)&&!v_.hasOwnProperty(n)&&(this.buf.push(""))}chars(t){this.buf.push(_v(t))}checkClobberedElement(t,n){if(n&&(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: ".concat(t.outerHTML));return n}},nM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rM=/([^\#-~ |!])/g;function _v(e){return e.replace(/&/g,"&").replace(nM,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(rM,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}var _c;function ch(e,t){let n=null;try{_c=_c||WS(e);let r=t?String(t):"";n=_c.getInertBodyElement(r);let i=5,o=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=_c.getInertBodyElement(r)}while(r!==o);let a=new ff().sanitizeChildren(Dv(n)||n);return lu(a)}finally{if(n){let r=Dv(n)||n;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function Dv(e){return"content"in e&&iM(e)?e.content:null}function iM(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var mt=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}(mt||{});function yo(e){let t=w_();return t?vv(t.sanitize(mt.HTML,e)||""):Or(e,"HTML")?vv(Vn(e)):ch(Ss(),ys(e))}function E_(e){let t=w_();return t?t.sanitize(mt.URL,e)||"":Or(e,"URL")?Vn(e):du(ys(e))}function w_(){let e=le();return e&&e[so].sanitizer}function oM(){let e=new yi;return v(Qt)==="browser"&&(e.store=sM(Ss(),v(cu))),e}var yi=(()=>{let t=class t{constructor(){this.store={},this.onSerializeCallbacks={}}get(r,i){return this.store[r]!==void 0?this.store[r]:i}set(r,i){this.store[r]=i}remove(r){delete this.store[r]}hasKey(r){return this.store.hasOwnProperty(r)}get isEmpty(){return Object.keys(this.store).length===0}onSerialize(r,i){this.onSerializeCallbacks[r]=i}toJson(){for(let r in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(r))try{this.store[r]=this.onSerializeCallbacks[r]()}catch(i){console.warn("Exception in onSerialize callback: ",i)}return JSON.stringify(this.store).replace(/null;function pM(e,t,n=!1){var u;let r=e.getAttribute(Nd);if(r==null)return null;let[i,o]=r.split("|");if(r=n?o:i,!r)return null;let s=n?i:o?"|".concat(o):"",a={};if(r!==""){let l=t.get(yi,null,{optional:!0});l!==null&&(a=l.get(S_,[])[Number(r)])}let c={data:a,firstChild:(u=e.firstChild)!=null?u:null};return n&&(c.firstChild=e,fu(c,0,e.nextSibling)),s?e.setAttribute(Nd,s):e.removeAttribute(Nd),c}function mM(){M_=pM}function lh(e,t,n=!1){return M_(e,t,n)}function gM(e){let t=e._lView;return t[ne].type===2?null:(iy(t)&&(t=t[nt]),t)}function vM(e){var t;return(t=e.textContent)==null?void 0:t.replace(/\s/gm,"")}function yM(e){let t=Ss(),n=t.createNodeIterator(e,NodeFilter.SHOW_COMMENT,{acceptNode(o){let s=vM(o);return s==="ngetn"||s==="ngtns"?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),r,i=[];for(;r=n.nextNode();)i.push(r);for(let o of i)o.textContent==="ngetn"?o.replaceWith(t.createTextNode("")):o.remove()}function fu(e,t,n){var r;(r=e.segmentHeads)!=null||(e.segmentHeads={}),e.segmentHeads[t]=n}function pf(e,t){var n,r;return(r=(n=e.segmentHeads)==null?void 0:n[t])!=null?r:null}function _M(e,t){var i,o,s;let n=e.data,r=(o=(i=n[aM])==null?void 0:i[t])!=null?o:null;return r===null&&((s=n[uh])!=null&&s[t])&&(r=dh(e,t)),r}function T_(e,t){var n,r;return(r=(n=e.data[uh])==null?void 0:n[t])!=null?r:null}function dh(e,t){var i,o;let n=(i=T_(e,t))!=null?i:[],r=0;for(let s of n)r+=s[Uc]*((o=s[I_])!=null?o:1);return r}function hu(e,t){var n;if(typeof e.disconnectedNodes>"u"){let r=e.data[dM];e.disconnectedNodes=r?new Set(r):null}return!!((n=e.disconnectedNodes)!=null&&n.has(t))}var mf=class{},Bc=class{};function DM(e){let t=Error("No component factory found for ".concat(wt(e),"."));return t[EM]=e,t}var EM="ngComponent";var gf=class{resolveComponentFactory(t){throw DM(t)}},Un=(()=>{let t=class t{};t.NULL=new gf;let e=t;return e})();function wM(){return _o($t(),le())}function _o(e,t){return new X(Kt(e,t))}var X=(()=>{let t=class t{constructor(r){this.nativeElement=r}};t.__NG_ELEMENT_ID__=wM;let e=t;return e})();function bM(e){return e instanceof X?e.nativeElement:e}var li=class{},gr=(()=>{let t=class t{constructor(){this.destroyNode=null}};t.__NG_ELEMENT_ID__=()=>CM();let e=t;return e})();function CM(){let e=le(),t=$t(),n=Mr(t.index,e);return(Rn(n)?n:e)[He]}var IM=(()=>{let t=class t{};t.\u0275prov=S({token:t,providedIn:"root",factory:()=>null});let e=t;return e})(),di=class{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}},SM=new di("17.0.7"),Pd={};function fh(e){let t=Ot(null);try{return e()}finally{Ot(t)}}function A_(e){return TM(e)?Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e:!1}function MM(e,t){if(Array.isArray(e))for(let n=0;nt,yf=class{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||AM}forEachItem(t){let n;for(n=this._itHead;n!==null;n=n._next)t(n)}forEachOperation(t){let n=this._itHead,r=this._removalsHead,i=0,o=null;for(;n||r;){let s=!r||n&&n.currentIndex{s=this._trackByFn(i,a),n===null||!Object.is(n.trackById,s)?(n=this._mismatch(n,a,s,i),r=!0):(r&&(n=this._verifyReinsertion(n,a,s,i)),Object.is(n.item,a)||this._addIdentityChange(n,a)),n=n._next,i++}),this.length=i;return this._truncate(n),this.collection=t,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;t!==null;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;t!==null;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,n,r,i){let o;return t===null?o=this._itTail:(o=t._prev,this._remove(t)),t=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null),t!==null?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._reinsertAfter(t,o,i)):(t=this._linkedRecords===null?null:this._linkedRecords.get(r,i),t!==null?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._moveAfter(t,o,i)):t=this._addAfter(new _f(n,r),o,i)),t}_verifyReinsertion(t,n,r,i){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null);return o!==null?t=this._reinsertAfter(o,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;t!==null;){let n=t._next;this._addToRemovals(this._unlink(t)),t=n}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,n,r){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(t);let i=t._prevRemoved,o=t._nextRemoved;return i===null?this._removalsHead=o:i._nextRemoved=o,o===null?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(t,n,r),this._addToMoves(t,r),t}_moveAfter(t,n,r){return this._unlink(t),this._insertAfter(t,n,r),this._addToMoves(t,r),t}_addAfter(t,n,r){return this._insertAfter(t,n,r),this._additionsTail===null?this._additionsTail=this._additionsHead=t:this._additionsTail=this._additionsTail._nextAdded=t,t}_insertAfter(t,n,r){let i=n===null?this._itHead:n._next;return t._next=i,t._prev=n,i===null?this._itTail=t:i._prev=t,n===null?this._itHead=t:n._next=t,this._linkedRecords===null&&(this._linkedRecords=new Hc),this._linkedRecords.put(t),t.currentIndex=r,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){this._linkedRecords!==null&&this._linkedRecords.remove(t);let n=t._prev,r=t._next;return n===null?this._itHead=r:n._next=r,r===null?this._itTail=n:r._prev=n,t}_addToMoves(t,n){return t.previousIndex===n||(this._movesTail===null?this._movesTail=this._movesHead=t:this._movesTail=this._movesTail._nextMoved=t),t}_addToRemovals(t){return this._unlinkedRecords===null&&(this._unlinkedRecords=new Hc),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,n){return t.item=n,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=t:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=t,t}},_f=class{constructor(t,n){this.item=t,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},Df=class{constructor(){this._head=null,this._tail=null}add(t){this._head===null?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,n){let r;for(r=this._head;r!==null;r=r._nextDup)if((n===null||n<=r.currentIndex)&&Object.is(r.trackById,t))return r;return null}remove(t){let n=t._prevDup,r=t._nextDup;return n===null?this._head=r:n._nextDup=r,r===null?this._tail=n:r._prevDup=n,this._head===null}},Hc=class{constructor(){this.map=new Map}put(t){let n=t.trackById,r=this.map.get(n);r||(r=new Df,this.map.set(n,r)),r.add(t)}get(t,n){let r=t,i=this.map.get(r);return i?i.get(t,n):null}remove(t){let n=t.trackById;return this.map.get(n).remove(t)&&this.map.delete(n),t}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Ev(e,t,n){let r=e.previousIndex;if(r===null)return r;let i=0;return n&&r{let t=class t{constructor(r){this.factories=r}static create(r,i){if(i!=null){let o=i.factories.slice();r=r.concat(o)}return new t(r)}static extend(r){return{provide:t,useFactory:i=>t.create(r,i||wv()),deps:[[t,new pr,new hr]]}}find(r){let i=this.factories.find(o=>o.supports(r));if(i!=null)return i;throw new C(901,!1)}};t.\u0275prov=S({token:t,providedIn:"root",factory:wv});let e=t;return e})();function $c(e,t,n,r,i=!1){for(;n!==null;){let o=t[n.index];o!==null&&r.push(yn(o)),nn(o)&&OM(o,r);let s=n.type;if(s&8)$c(e,t,n.child,r);else if(s&32){let a=rh(n,t),c;for(;c=a();)r.push(c)}else if(s&16){let a=s_(t,n);if(Array.isArray(a))r.push(...a);else{let c=ih(t[Yt]);$c(c[ne],c,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function OM(e,t){for(let n=Bt;n{ru(e.lView)},consumerOnSignalRead(){this.lView[oi]=this}}),FM="ngOriginalError";function Rd(e){return e[FM]}var lr=class{constructor(){this._console=console}handleError(t){let n=this._findOriginalError(t);this._console.error("ERROR",t),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(t){let n=t&&Rd(t);for(;n&&Rd(n);)n=Rd(n);return n||null}},x_=new D("",{providedIn:"root",factory:()=>v(lr).handleError.bind(void 0)}),Dc=new D(""),N_=!1,P_=new D("",{providedIn:"root",factory:()=>N_});var _i={};function re(e){R_(ot(),le(),mo()+e,!1)}function R_(e,t,n,r){if(!r)if((t[W]&3)===3){let o=e.preOrderCheckHooks;o!==null&&bc(t,o,n)}else{let o=e.preOrderHooks;o!==null&&Cc(t,o,0,n)}ai(n)}function y(e,t=se.Default){let n=le();if(n===null)return I(e,t);let r=$t();return Py(r,n,xt(e),t)}function ph(){let e="invalid";throw new Error(e)}function LM(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;rnt&&R_(e,t,nt,!1),xn(s?2:0,i),n(r,i)}finally{ai(o),xn(s?3:1,i)}}function mh(e,t,n){if($f(t)){let r=Ot(null);try{let i=t.directiveStart,o=t.directiveEnd;for(let s=i;snull;function BM(e){Yy(e)?c_(e):yM(e)}function HM(){j_=BM}function $M(e,t,n,r){let i=z_(t);i.push(n),e.firstCreatePass&&G_(e).push(r,i.length-1)}function zM(e,t,n,r,i,o){let s=t?t.injectorIndex:-1,a=0;return po()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs: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 bv(e,t,n,r){for(let i in e)if(e.hasOwnProperty(i)){n=n===null?{}:n;let o=e[i];r===null?Cv(n,t,i,o):r.hasOwnProperty(i)&&Cv(n,t,r[i],o)}return n}function Cv(e,t,n,r){e.hasOwnProperty(n)?e[n].push(t,r):e[n]=[t,r]}function GM(e,t,n){let r=t.directiveStart,i=t.directiveEnd,o=e.data,s=t.attrs,a=[],c=null,u=null;for(let l=r;l0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function KM(e,t,n,r){let i=n.directiveStart,o=n.directiveEnd;Es(n)&&rT(t,n,e.data[i+n.componentOffset]),e.firstCreatePass||Fc(n,t),Sr(r,t);let s=n.initialInputs;for(let a=i;a-1&&(nf(t,r),Lc(n,r))}this._attachedToViewContainer=!1}n_(this._lView[ne],this._lView)}onDestroy(t){vI(this._lView,t)}markForCheck(){wh(this._cdRefInjectingView||this._lView)}detach(){this._lView[W]&=-129}reattach(){hy(this._lView),this._lView[W]|=128}detectChanges(){this._lView[W]|=1024,dT(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new C(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,TS(this._lView[ne],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new C(902,!1);this._appRef=t}},gt=(()=>{let t=class t{};t.__NG_ELEMENT_ID__=vT;let e=t;return e})();function vT(e){return yT($t(),le(),(e&16)===16)}function yT(e,t,n){if(Es(e)&&!n){let r=Mr(e.index,t);return new fi(r,r)}else if(e.type&47){let r=t[Yt];return new fi(r,t)}return null}var Iv=new Set;function As(e){var t;Iv.has(e)||(Iv.add(e),(t=performance==null?void 0:performance.mark)==null||t.call(performance,"mark_feature_usage",{detail:{feature:e}}))}var Cf=class extends Te{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,n,r){var c,u,l;let i=t,o=n||(()=>null),s=r;if(t&&typeof t=="object"){let d=t;i=(c=d.next)==null?void 0:c.bind(d),o=(u=d.error)==null?void 0:u.bind(d),s=(l=d.complete)==null?void 0:l.bind(d)}this.__isAsync&&(o=Fd(o),i&&(i=Fd(i)),s&&(s=Fd(s)));let a=super.subscribe({next:i,error:o,complete:s});return t instanceof it&&t.add(a),a}};function Fd(e){return t=>{setTimeout(e,void 0,t)}}var et=Cf;function Sv(...e){}function _T(){let e=typeof or.requestAnimationFrame=="function",t=or[e?"requestAnimationFrame":"setTimeout"],n=or[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&t&&n){let r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r);let i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}var ue=class e{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new et(!1),this.onMicrotaskEmpty=new et(!1),this.onStable=new et(!1),this.onError=new et(!1),typeof Zone>"u")throw new C(908,!1);Zone.assertZonePatched();let i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&n,i.shouldCoalesceRunChangeDetection=r,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=_T().nativeRequestAnimationFrame,wT(i)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get("isAngularZone")===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new C(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new C(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,t,DT,Sv,Sv);try{return o.runTask(s,n,r)}finally{o.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},DT={};function bh(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 ET(e){e.isCheckStableRunning||e.lastRequestAnimationFrameId!==-1||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(or,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,If(e),e.isCheckStableRunning=!0,bh(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),If(e))}function wT(e){let t=()=>{ET(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,i,o,s,a)=>{if(bT(a))return n.invokeTask(i,o,s,a);try{return Mv(e),n.invokeTask(i,o,s,a)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),Tv(e)}},onInvoke:(n,r,i,o,s,a,c)=>{try{return Mv(e),n.invoke(i,o,s,a,c)}finally{e.shouldCoalesceRunChangeDetection&&t(),Tv(e)}},onHasTask:(n,r,i,o)=>{n.hasTask(i,o),r===i&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,If(e),bh(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(n,r,i,o)=>(n.handleError(i,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function If(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.lastRequestAnimationFrameId!==-1?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function Mv(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Tv(e){e._nesting--,bh(e)}var K_=new D("",{providedIn:"root",factory:Q_});function Q_(){let e=v(ue),t=!0,n=new N(i=>{t=e.isStable&&!e.hasPendingMacrotasks&&!e.hasPendingMicrotasks,e.runOutsideAngular(()=>{i.next(t),i.complete()})}),r=new N(i=>{let o;e.runOutsideAngular(()=>{o=e.onStable.subscribe(()=>{ue.assertNotInAngularZone(),queueMicrotask(()=>{!t&&!e.hasPendingMacrotasks&&!e.hasPendingMicrotasks&&(t=!0,i.next(!0))})})});let s=e.onUnstable.subscribe(()=>{ue.assertInAngularZone(),t&&(t=!1,e.runOutsideAngular(()=>{i.next(!1)}))});return()=>{o.unsubscribe(),s.unsubscribe()}});return xe(n,r.pipe(Et()))}function bT(e){var t;return!Array.isArray(e)||e.length!==1?!1:((t=e[0].data)==null?void 0:t.__ignore_ng_zone__)===!0}var CT=(()=>{let t=class t{constructor(){this.renderDepth=0,this.handler=null,this.internalCallbacks=[]}begin(){var r;(r=this.handler)==null||r.validateBegin(),this.renderDepth++}end(){var r;if(this.renderDepth--,this.renderDepth===0){for(let i of this.internalCallbacks)i();this.internalCallbacks.length=0,(r=this.handler)==null||r.execute()}}ngOnDestroy(){var r;(r=this.handler)==null||r.destroy(),this.handler=null,this.internalCallbacks.length=0}};t.\u0275prov=S({token:t,providedIn:"root",factory:()=>new t});let e=t;return e})();function IT(e,t){let n=Mr(t,e),r=n[ne];ST(r,n);let i=n[Ht];i!==null&&n[Ln]===null&&(n[Ln]=lh(i,n[oo])),Ch(r,n,n[vn])}function ST(e,t){for(let n=t.length;n0&&l_(e,n,o.join(" "))}}function RT(e,t,n){let r=e.projection=[];for(let i=0;i=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=us(i.hostAttrs,n=us(n,i.hostAttrs))}}function Ec(e){return e===io?{}:e===qt?[]:e}function jT(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function VT(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,o)=>{t(r,i,o),n(r,i,o)}:e.contentQueries=t}function UT(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function Os(e,t,n){return e[t]=n}function BT(e,t){return e[t]}function _n(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function Tf(e,t,n,r){let i=_n(e,t,n);return _n(e,t+1,r)||i}function X_(e,t,n,r,i,o){let s=Tf(e,t,n,r);return Tf(e,t+2,i,o)||s}function at(e,t,n,r){let i=le(),o=bs();if(_n(i,o,t)){let s=ot(),a=iu();iT(a,i,e,t,n,r)}return at}function HT(e,t,n,r){return _n(e,bs(),n)?t+ys(n)+r:_i}function wc(e,t){return e<<17|t<<2}function hi(e){return e>>17&32767}function $T(e){return(e&2)==2}function zT(e,t){return e&131071|t<<17}function Af(e){return e|2}function fo(e){return(e&131068)>>2}function Ld(e,t){return e&-131069|t<<2}function GT(e){return(e&1)===1}function Of(e){return e|1}function WT(e,t,n,r,i,o){let s=o?t.classBindings:t.styleBindings,a=hi(s),c=fo(s);e[r]=n;let u=!1,l;if(Array.isArray(n)){let d=n;l=d[1],(l===null||Is(d,l)>0)&&(u=!0)}else l=n;if(i)if(c!==0){let f=hi(e[a+1]);e[r+1]=wc(f,a),f!==0&&(e[f+1]=Ld(e[f+1],r)),e[a+1]=zT(e[a+1],r)}else e[r+1]=wc(a,0),a!==0&&(e[a+1]=Ld(e[a+1],r)),a=r;else e[r+1]=wc(c,0),a===0?a=r:e[c+1]=Ld(e[c+1],r),c=r;u&&(e[r+1]=Af(e[r+1])),Ov(e,l,r,!0,o),Ov(e,l,r,!1,o),qT(t,l,e,r,o),s=wc(a,c),o?t.classBindings=s:t.styleBindings=s}function qT(e,t,n,r,i){let o=i?e.residualClasses:e.residualStyles;o!=null&&typeof t=="string"&&Is(o,t)>=0&&(n[r+1]=Of(n[r+1]))}function Ov(e,t,n,r,i){let o=e[n+1],s=t===null,a=r?hi(o):fo(o),c=!1;for(;a!==0&&(c===!1||s);){let u=e[a],l=e[a+1];YT(u,t)&&(c=!0,e[a+1]=r?Of(l):Af(l)),a=r?hi(l):fo(l)}c&&(e[n+1]=r?Af(o):Of(o))}function YT(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Is(e,t)>=0:!1}function U(e,t,n){let r=le(),i=bs();if(_n(r,i,t)){let o=ot(),s=iu();_h(o,s,r,e,t,r[He],n,!1)}return U}function xv(e,t,n,r,i){let o=t.inputs,s=i?"class":"style";Eh(e,n,o[s],s,r)}function Eo(e,t,n){return J_(e,t,n,!1),Eo}function Xe(e,t){return J_(e,t,null,!0),Xe}function J_(e,t,n,r){let i=le(),o=ot(),s=MI(2);if(o.firstUpdatePass&&KT(o,e,s,r),t!==_i&&_n(i,s,t)){let a=o.data[mo()];tA(o,a,i,i[He],e,i[s+1]=nA(t,n),r,s)}}function ZT(e,t){return t>=e.expandoStartIndex}function KT(e,t,n,r){let i=e.data;if(i[n+1]===null){let o=i[mo()],s=ZT(e,n);rA(o,r)&&t===null&&!s&&(t=!1),t=QT(i,o,t,r),WT(i,o,t,n,s,r)}}function QT(e,t,n,r){let i=gy(e),o=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=kd(null,e,t,n,r),n=ms(n,t.attrs,r),o=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==i)if(n=kd(i,e,t,n,r),o===null){let c=XT(e,t,r);c!==void 0&&Array.isArray(c)&&(c=kd(null,e,t,c[1],r),c=ms(c,t.attrs,r),JT(e,t,r,c))}else o=eA(e,t,r)}return o!==void 0&&(r?t.residualClasses=o:t.residualStyles=o),n}function XT(e,t,n){let r=n?t.classBindings:t.styleBindings;if(fo(r)!==0)return e[hi(r)]}function JT(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[hi(i)]=r}function eA(e,t,n){let r,i=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0;){let c=e[i],u=Array.isArray(c),l=u?c[1]:c,d=l===null,f=n[i+1];f===_i&&(f=d?qt:void 0);let p=d?Ad(f,r):l===r?f:void 0;if(u&&!Wc(p)&&(p=Ad(c,r)),Wc(p)&&(a=p,s))return a;let g=e[i+1];i=s?hi(g):fo(g)}if(t!==null){let c=o?t.residualClasses:t.residualStyles;c!=null&&(a=Ad(c,r))}return a}function Wc(e){return e!==void 0}function nA(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=wt(Vn(e)))),e}function rA(e,t){return(e.flags&(t?8:16))!==0}function eD(e){var i;let t=(i=e[fs])!=null?i:[],r=e[tt][He];for(let o of t)iA(o,r);e[fs]=qt}function iA(e,t){let n=0,r=e.firstChild;if(r){let i=e.data[Uc];for(;n0&&(s.firstChild=e,e=vu(i[Uc],e)),n.push(s)}return[e,n]}var nD=(e,t)=>null;function fA(e,t){let n=e[fs];return!t||n===null||n.length===0?null:n[0].data[uM]===t?n.shift():(eD(e),null)}function hA(){nD=fA}function Pv(e,t){return nD(e,t)}function pA(e,t,n,r){var l,d;let i=t.tView,s=e[W]&4096?4096:16,a=pu(e,i,n,s,null,t,null,null,null,(l=r==null?void 0:r.injector)!=null?l:null,(d=r==null?void 0:r.dehydratedView)!=null?d:null),c=e[t.index];a[Ds]=c;let u=e[Pn];return u!==null&&(a[Pn]=u.createEmbeddedView(i)),Ch(i,a,n),a}function Rv(e,t){return!t||t.firstChild===null||jc(e)}function mA(e,t,n,r=!0){let i=t[ne];if(OS(i,t,e,n),r){let s=rf(n,e),a=t[He],c=sh(a,e[sr]);c!==null&&MS(i,e[Zt],a,t,c,s)}let o=t[Ln];o!==null&&o.firstChild!==null&&(o.firstChild=null)}var Nt=(()=>{let t=class t{};t.__NG_ELEMENT_ID__=gA;let e=t;return e})();function gA(){let e=$t();return iD(e,le())}var vA=Nt,rD=class extends vA{constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return _o(this._hostTNode,this._hostLView)}get injector(){return new ri(this._hostTNode,this._hostLView)}get parentInjector(){let t=Kf(this._hostTNode,this._hostLView);if(My(t)){let n=Pc(t,this._hostLView),r=Nc(t),i=n[ne].data[r+8];return new ri(i,n)}else return new ri(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let n=Fv(this._lContainer);return n!==null&&n[t]||null}get length(){return this._lContainer.length-Bt}createEmbeddedView(t,n,r){let i,o;typeof r=="number"?i=r:r!=null&&(i=r.index,o=r.injector);let s=Pv(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(n||{},o,s);return this.insertImpl(a,i,Rv(this._hostTNode,s)),a}createComponent(t,n,r,i,o){var g,_,M;let s=t&&!YI(t),a;if(s)a=n;else{let A=n||{};a=A.index,r=A.injector,i=A.projectableNodes,o=A.environmentInjector||A.ngModuleRef}let c=s?t:new ps(ii(t)),u=r||this.parentInjector;if(!o&&c.ngModule==null){let Y=(s?u:this.parentInjector).get(rn,null);Y&&(o=Y)}let l=ii((g=c.componentType)!=null?g:{}),d=Pv(this._lContainer,(_=l==null?void 0:l.id)!=null?_:null),f=(M=d==null?void 0:d.firstChild)!=null?M:null,p=c.create(u,i,f,o);return this.insertImpl(p.hostView,a,Rv(this._hostTNode,d)),p}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){let i=t._lView;if(pI(i)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let c=i[tt],u=new rD(c,c[Zt],c[tt]);u.detach(u.indexOf(t))}}let o=this._adjustIndex(n),s=this._lContainer;return mA(s,i,o,r),t.attachToViewContainerRef(),Ly(Vd(s),o,t),t}move(t,n){return this.insert(t,n)}indexOf(t){let n=Fv(this._lContainer);return n!==null?n.indexOf(t):-1}remove(t){let n=this._adjustIndex(t,-1),r=nf(this._lContainer,n);r&&(Lc(Vd(this._lContainer),n),n_(r[ne],r))}detach(t){let n=this._adjustIndex(t,-1),r=nf(this._lContainer,n);return r&&Lc(Vd(this._lContainer),n)!=null?new fi(r):null}_adjustIndex(t,n=0){return t==null?this.length+n:t}};function Fv(e){return e[xc]}function Vd(e){return e[xc]||(e[xc]=[])}function iD(e,t){let n,r=t[e.index];return nn(r)?n=r:(n=H_(r,t,null,e),t[e.index]=n,mu(t,n)),oD(n,t,e,r),new rD(n,e,t)}function yA(e,t){let n=e[He],r=n.createComment(""),i=Kt(t,e),o=sh(n,i);return Vc(n,o,r,LS(n,i),!1),r}var oD=sD,Ih=(e,t,n)=>!1;function _A(e,t,n){return Ih(e,t,n)}function sD(e,t,n,r){if(e[sr])return;let i;n.type&8?i=yn(r):i=yA(t,n),e[sr]=i}function DA(e,t,n){var l;if(e[sr]&&e[fs])return!0;let r=n[Ln],i=t.index-nt;if(!r||mS(t)||hu(r,i))return!1;let s=pf(r,i),a=(l=r.data[uh])==null?void 0:l[i],[c,u]=dA(s,a);return e[sr]=c,e[fs]=u,!0}function EA(e,t,n,r){Ih(e,n,t)||sD(e,t,n,r)}function wA(){oD=EA,Ih=DA}function bA(e,t,n,r,i,o,s,a,c){let u=t.consts,l=Do(t,e,4,s||null,uo(u,a));Dh(t,n,l,uo(u,c)),su(t,l);let d=l.tView=yh(2,l,r,i,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,u,null);return t.queries!==null&&(t.queries.template(t,l),d.queries=t.queries.embeddedTView(l)),l}function Ce(e,t,n,r,i,o,s,a){let c=le(),u=ot(),l=e+nt,d=u.firstCreatePass?bA(l,u,c,t,n,r,i,o,s):u.data[l];mi(d,!1);let f=aD(u,c,d,e);ou()&&uu(u,c,f,d),Sr(f,c);let p=H_(f,c,f,d);return c[l]=p,mu(c,p),_A(p,d,c),nu(d)&&gh(u,c,d),s!=null&&vh(c,d,a),Ce}var aD=cD;function cD(e,t,n,r){return Tr(!0),t[He].createComment("")}function CA(e,t,n,r){var l,d;let i=t[Ln],o=!i||po()||hu(i,r);if(Tr(o),o)return cD(e,t,n,r);let s=(d=(l=i.data[cM])==null?void 0:l[r])!=null?d:null;s!==null&&n.tView!==null&&n.tView.ssrId===null&&(n.tView.ssrId=s);let a=gu(i,e,t,n);fu(i,r,a);let c=dh(i,r);return vu(c,a)}function IA(){aD=CA}function SA(e,t,n,r,i,o){let s=t.consts,a=uo(s,i),c=Do(t,e,2,r,a);return Dh(t,n,c,uo(s,o)),c.attrs!==null&&zc(c,c.attrs,!1),c.mergedAttrs!==null&&zc(c,c.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,c),c}function ge(e,t,n,r){let i=le(),o=ot(),s=nt+e,a=i[He],c=o.firstCreatePass?SA(s,o,i,t,n,r):o.data[s],u=uD(o,i,c,a,t,e);i[s]=u;let l=nu(c);return mi(c,!0),d_(a,u,c),(c.flags&32)!==32&&ou()&&uu(o,i,u,c),yI()===0&&Sr(u,i),_I(),l&&(gh(o,i,c),mh(o,c,i)),r!==null&&vh(i,c),ge}function pe(){let e=$t();Gf()?Wf():(e=e.parent,mi(e,!1));let t=e;EI(t)&&bI(),DI();let n=ot();return n.firstCreatePass&&(su(n,e),$f(e)&&n.queries.elementEnd(e)),t.classesWithoutHost!=null&&kI(t)&&xv(n,t,le(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&jI(t)&&xv(n,t,le(),t.stylesWithoutHost,!1),pe}function Le(e,t,n,r){return ge(e,t,n,r),pe(),Le}var uD=(e,t,n,r,i,o)=>(Tr(!0),oh(r,i,Cy()));function MA(e,t,n,r,i,o){let s=t[Ln],a=!s||po()||hu(s,o);if(Tr(a),a)return oh(r,i,Cy());let c=gu(s,e,t,n);return T_(s,o)&&fu(s,o,c.nextSibling),s&&(qy(n)||Yy(c))&&Es(n)&&(wI(n),c_(c)),c}function TA(){uD=MA}function AA(e,t,n,r,i){let o=t.consts,s=uo(o,r),a=Do(t,e,8,"ng-container",s);s!==null&&zc(a,s,!0);let c=uo(o,i);return Dh(t,n,a,c),t.queries!==null&&t.queries.elementStart(t,a),a}function Dn(e,t,n){let r=le(),i=ot(),o=e+nt,s=i.firstCreatePass?AA(o,i,r,t,n):i.data[o];mi(s,!0);let a=lD(i,r,s,e);return r[o]=a,ou()&&uu(i,r,a,s),Sr(a,r),nu(s)&&(gh(i,r,s),mh(i,s,r)),n!=null&&vh(r,s),Dn}function En(){let e=$t(),t=ot();return Gf()?Wf():(e=e.parent,mi(e,!1)),t.firstCreatePass&&(su(t,e),$f(e)&&t.queries.elementEnd(e)),En}function xs(e,t,n){return Dn(e,t,n),En(),xs}var lD=(e,t,n,r)=>(Tr(!0),e_(t[He],""));function OA(e,t,n,r){let i,o=t[Ln],s=!o||po();if(Tr(s),s)return e_(t[He],"");let a=gu(o,e,t,n),c=_M(o,r);return fu(o,r,a),i=vu(c,a),i}function xA(){lD=OA}function Bn(){return le()}function Sh(e,t,n){let r=le(),i=bs();if(_n(r,i,t)){let o=ot(),s=iu();_h(o,s,r,e,t,r[He],n,!0)}return Sh}function Ns(e,t,n){let r=le(),i=bs();if(_n(r,i,t)){let o=ot(),s=iu(),a=gy(o.data),c=cT(a,s,r);_h(o,s,r,e,t,c,n,!0)}return Ns}var Yc="en-US";var NA=Yc;function PA(e){PC(e,"Expected localeId to be defined"),typeof e=="string"&&(NA=e.toLowerCase().replace(/_/g,"-"))}function xr(e){return!!e&&typeof e.then=="function"}function Mh(e){return!!e&&typeof e.subscribe=="function"}function rt(e,t,n,r){let i=le(),o=ot(),s=$t();return FA(o,i,i[He],s,e,t,r),rt}function RA(e,t,n,r){let i=e.cleanup;if(i!=null)for(let o=0;oc?a[c]:null}typeof s=="string"&&(o+=2)}return null}function FA(e,t,n,r,i,o,s){let a=nu(r),u=e.firstCreatePass&&G_(e),l=t[vn],d=z_(t),f=!0;if(r.type&3||s){let _=Kt(r,t),M=s?s(_):_,A=d.length,Y=s?he=>s(yn(he[r.index])):r.index,B=null;if(!s&&a&&(B=RA(e,t,i,r.index)),B!==null){let he=B.__ngLastListenerFn__||B;he.__ngNextListenerFn__=o,B.__ngLastListenerFn__=o,f=!1}else{o=kv(r,t,l,o,!1);let he=n.listen(M,i,o);d.push(o,he),u&&u.push(i,Y,A,A+1)}}else o=kv(r,t,l,o,!1);let p=r.outputs,g;if(f&&p!==null&&(g=p[i])){let _=g.length;if(_)for(let M=0;M<_;M+=2){let A=g[M],Y=g[M+1],De=t[A][Y].subscribe(o),It=d.length;d.push(o,De),u&&u.push(i,r.index,It,-(It+1))}}}function Lv(e,t,n,r){try{return xn(6,t,n),n(r)!==!1}catch(i){return W_(e,i),!1}finally{xn(7,t,n)}}function kv(e,t,n,r,i){return function o(s){if(s===Function)return r;let a=e.componentOffset>-1?Mr(e.index,t):t;wh(a);let c=Lv(t,n,r,s),u=o.__ngNextListenerFn__;for(;u;)c=Lv(t,n,u,s)&&c,u=u.__ngNextListenerFn__;return i&&c===!1&&s.preventDefault(),c}}function me(e=1){return NI(e)}function LA(e,t){let n=null,r=XC(e);for(let i=0;i=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function dD(e){let t=II();return ws(t,nt+e)}function $n(e,t=""){let n=le(),r=ot(),i=e+nt,o=r.firstCreatePass?Do(r,i,1,t,null):r.data[i],s=fD(r,n,o,t,e);n[i]=s,ou()&&uu(r,n,s,o),mi(o,!1)}var fD=(e,t,n,r,i)=>(Tr(!0),Jy(t[He],r));function jA(e,t,n,r,i){let o=t[Ln],s=!o||po()||hu(o,i);return Tr(s),s?Jy(t[He],r):gu(o,e,t,n)}function VA(){fD=jA}function UA(e){return sn("",e,""),UA}function sn(e,t,n){let r=le(),i=HT(r,e,t,n);return i!==_i&&uT(r,mo(),i),sn}function BA(e,t,n){let r=ot();if(r.firstCreatePass){let i=ar(e);xf(n,r.data,r.blueprint,i,!0),xf(t,r.data,r.blueprint,i,!1)}}function xf(e,t,n,r,i){if(e=xt(e),Array.isArray(e))for(let o=0;o>20;if(lo(e)||!e.multi){let p=new ci(u,i,y),g=Bd(c,t,i?l:l+f,d);g===-1?(Kd(Fc(a,s),o,c),Ud(o,e,t.length),t.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(p),s.push(p)):(n[g]=p,s[g]=p)}else{let p=Bd(c,t,l+f,d),g=Bd(c,t,l,l+f),_=p>=0&&n[p],M=g>=0&&n[g];if(i&&!M||!i&&!_){Kd(Fc(a,s),o,c);let A=zA(i?$A:HA,n.length,i,r,u);!i&&M&&(n[g].providerFactory=A),Ud(o,e,t.length,0),t.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(A),s.push(A)}else{let A=hD(n[i?g:p],u,!i&&r);Ud(o,e,p>-1?p:g,A)}!i&&r&&M&&n[g].componentProviders++}}}function Ud(e,t,n,r){let i=lo(t),o=iS(t);if(i||o){let c=(o?xt(t.useClass):t).prototype.ngOnDestroy;if(c){let u=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=u.indexOf(n);l===-1?u.push(n,[r,c]):u[l+1].push(r,c)}else u.push(n,c)}}}function hD(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function Bd(e,t,n,r){for(let i=n;i{n.providersResolver=(r,i)=>BA(r,i?i(e):e,t)}}var dr=class{},gs=class{};function pD(e,t){return new Zc(e,t!=null?t:null,[])}var Zc=class extends dr{constructor(t,n,r){super(),this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new Gc(this);let i=ey(t);this._bootstrapComponents=Wy(i.bootstrap),this._r3Injector=zy(t,n,[{provide:dr,useValue:this},{provide:Un,useValue:this.componentFactoryResolver},...r],wt(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}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)}},Pf=class extends gs{constructor(t){super(),this.moduleType=t}create(t){return new Zc(this.moduleType,t,[])}};var Kc=class extends dr{constructor(t){super(),this.componentFactoryResolver=new Gc(this),this.instance=null;let n=new hs([...t.providers,{provide:dr,useValue:this},{provide:Un,useValue:this.componentFactoryResolver}],t.parent||eh(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function Th(e,t,n=null){return new Kc({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var GA=(()=>{let t=class t{constructor(r){this._injector=r,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(r){if(!r.standalone)return null;if(!this.cachedInjectors.has(r)){let i=Uy(!1,r.type),o=i.length>0?Th([i],this._injector,"Standalone[".concat(r.type.name,"]")):null;this.cachedInjectors.set(r,o)}return this.cachedInjectors.get(r)}ngOnDestroy(){try{for(let r of this.cachedInjectors.values())r!==null&&r.destroy()}finally{this.cachedInjectors.clear()}}};t.\u0275prov=S({token:t,providedIn:"environment",factory:()=>new t(I(rn))});let e=t;return e})();function mD(e){As("NgStandalone"),e.getStandaloneInjector=t=>t.get(GA).getOrCreateStandaloneInjector(e)}function Cz(e,t,n,r){return gD(le(),gi(),e,t,n,r)}function Iz(e,t,n,r,i){return vD(le(),gi(),e,t,n,r,i)}function Sz(e,t,n,r,i,o,s,a){let c=gi()+e,u=le(),l=X_(u,c,n,r,i,o);return _n(u,c+4,s)||l?Os(u,c+5,a?t.call(a,n,r,i,o,s):t(n,r,i,o,s)):BT(u,c+5)}function yu(e,t){let n=e[t];return n===_i?void 0:n}function gD(e,t,n,r,i,o){let s=t+n;return _n(e,s,i)?Os(e,s+1,o?r.call(o,i):r(i)):yu(e,s+1)}function vD(e,t,n,r,i,o,s){let a=t+n;return Tf(e,a,i,o)?Os(e,a+2,s?r.call(s,i,o):r(i,o)):yu(e,a+2)}function WA(e,t,n,r,i,o,s,a,c){let u=t+n;return X_(e,u,i,o,s,a)?Os(e,u+4,c?r.call(c,i,o,s,a):r(i,o,s,a)):yu(e,u+4)}function qA(e,t,n,r,i,o){let s=t+n,a=!1;for(let c=0;c=0;n--){let r=t[n];if(e===r.name)return r}}function cn(e,t,n){let r=e+nt,i=le(),o=ws(i,r);return _u(i,r)?gD(i,gi(),t,o.transform,n,o):o.transform(n)}function Mz(e,t,n,r){let i=e+nt,o=le(),s=ws(o,i);return _u(o,i)?vD(o,gi(),t,s.transform,n,r,s):s.transform(n,r)}function Tz(e,t,n,r,i,o){let s=e+nt,a=le(),c=ws(a,s);return _u(a,s)?WA(a,gi(),t,c.transform,n,r,i,o,c):c.transform(n,r,i,o)}function Az(e,t,n){let r=e+nt,i=le(),o=ws(i,r);return _u(i,r)?qA(i,gi(),t,o.transform,n,o):o.transform.apply(o,n)}function _u(e,t){return e[ne].data[t].pure}function ZA(){return this._results[Symbol.iterator]()}var vs=class e{get changes(){var t;return(t=this._changes)!=null?t:this._changes=new et}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;let n=e.prototype;n[Symbol.iterator]||(n[Symbol.iterator]=ZA)}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=KI(t);(this._changesDetected=!ZI(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.emit(this)}setDirty(){this.dirty=!0}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}},pt=(()=>{let t=class t{};t.__NG_ELEMENT_ID__=XA;let e=t;return e})(),KA=pt,QA=class extends KA{constructor(t,n,r){super(),this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){var t;return((t=this._declarationTContainer.tView)==null?void 0:t.ssrId)||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){let i=pA(this._declarationLView,this._declarationTContainer,t,{injector:n,dehydratedView:r});return new fi(i)}};function XA(){return Du($t(),le())}function Du(e,t){return e.type&4?new QA(t,e,_o(e,t)):null}var Rf=class e{constructor(t){this.queryList=t,this.matches=null}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Ff=class e{constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,i=[];for(let o=0;o0)r.push(s[a/2]);else{let u=o[a+1],l=t[-c];for(let d=Bt;d{let t=class t{log(r){console.log(r)}warn(r){console.warn(r)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"platform"});let e=t;return e})(),wu=(()=>{let t=class t{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new We(!1)}add(){this.hasPendingTasks.next(!0);let r=this.taskId++;return this.pendingTasks.add(r),r}remove(r){this.pendingTasks.delete(r),this.pendingTasks.size===0&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks.next(!1)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Vf=class{constructor(t,n){this.ngModuleFactory=t,this.componentFactories=n}},xh=(()=>{let t=class t{compileModuleSync(r){return new Pf(r)}compileModuleAsync(r){return Promise.resolve(this.compileModuleSync(r))}compileModuleAndAllComponentsSync(r){let i=this.compileModuleSync(r),o=ey(r),s=Wy(o.declarations).reduce((a,c)=>{let u=ii(c);return u&&a.push(new ps(u)),a},[]);return new Vf(i,s)}compileModuleAndAllComponentsAsync(r){return Promise.resolve(this.compileModuleAndAllComponentsSync(r))}clearCache(){}clearCacheFor(r){}getModuleId(r){}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var CD=new D("");var ID=new D("Application Initializer"),SD=(()=>{let t=class t{constructor(){var r;this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,o)=>{this.resolve=i,this.reject=o}),this.appInits=(r=v(ID,{optional:!0}))!=null?r:[]}runInitializers(){if(this.initialized)return;let r=[];for(let o of this.appInits){let s=o();if(xr(s))r.push(s);else if(Mh(s)){let a=new Promise((c,u)=>{s.subscribe({complete:c,error:u})});r.push(a)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(r).then(()=>{i()}).catch(o=>{this.reject(o)}),r.length===0&&i(),this.initialized=!0}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),wo=new D("appBootstrapListener");function sO(){wg(()=>{throw new C(600,!1)})}function aO(e){return e.isBoundToModule}function cO(e,t,n){try{let r=n();return xr(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var Nr=(()=>{let t=class t{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=v(x_),this.zoneIsStable=v(K_),this.componentTypes=[],this.components=[],this.isStable=v(wu).hasPendingTasks.pipe(ee(r=>r?T(!1):this.zoneIsStable),Ue()),this._injector=v(rn)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(r,i){let o=r instanceof Bc;if(!this._injector.get(SD).done){let g="Cannot bootstrap as there are still asynchronous initializers running."+(!o&&Jv(r)?"":" Bootstrap components in the `ngDoBootstrap` method of the root module.");throw new C(405,!1)}let a;o?a=r:a=this._injector.get(Un).resolveComponentFactory(r),this.componentTypes.push(a.componentType);let c=aO(a)?void 0:this._injector.get(dr),u=i||a.selector,l=a.create(bt.NULL,[],u,c),d=l.location.nativeElement,f=l.injector.get(CD,null);return f==null||f.registerApplication(d),l.onDestroy(()=>{this.detachView(l.hostView),Hd(this.components,l),f==null||f.unregisterApplication(d)}),this._loadComponent(l),l}tick(){if(this._runningTick)throw new C(101,!1);try{this._runningTick=!0;for(let r of this._views)r.detectChanges()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1}}attachView(r){let i=r;this._views.push(i),i.attachToAppRef(this)}detachView(r){let i=r;Hd(this._views,i),i.detachFromAppRef()}_loadComponent(r){this.attachView(r.hostView),this.tick(),this.components.push(r);let i=this._injector.get(wo,[]);[...this._bootstrapListeners,...i].forEach(o=>o(r))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(r=>r()),this._views.slice().forEach(r=>r.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(r){return this._destroyListeners.push(r),()=>Hd(this._destroyListeners,r)}destroy(){if(this._destroyed)throw new C(406,!1);let r=this._injector;r.destroy&&!r.destroyed&&r.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function Hd(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Cr;function Nh(e){Cr!=null||(Cr=new WeakMap);let t=Cr.get(e);if(t)return t;let n=e.isStable.pipe(pn(r=>r)).toPromise().then(()=>{});return Cr.set(e,n),e.onDestroy(()=>Cr==null?void 0:Cr.delete(e)),n}var uO=(()=>{let t=class t{constructor(){this.zone=v(ue),this.applicationRef=v(Nr)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){var r;(r=this._onMicrotaskEmptySubscription)==null||r.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function lO(e){return[{provide:ue,useFactory:e},{provide:go,multi:!0,useFactory:()=>{let t=v(uO,{optional:!0});return()=>t.initialize()}},{provide:x_,useFactory:dO},{provide:K_,useFactory:Q_}]}function dO(){let e=v(ue),t=v(lr);return n=>e.runOutsideAngular(()=>t.handleError(n))}function fO(e){let t=lO(()=>new ue(hO(e)));return vi([[],t])}function hO(e){var t,n;return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:(t=e==null?void 0:e.eventCoalescing)!=null?t:!1,shouldCoalesceRunChangeDetection:(n=e==null?void 0:e.runCoalescing)!=null?n:!1}}function pO(){return typeof $localize<"u"&&$localize.locale||Yc}var Ps=new D("LocaleId",{providedIn:"root",factory:()=>v(Ps,se.Optional|se.SkipSelf)||pO()});var MD=new D("PlatformDestroyListeners");var Tc=null;function mO(e=[],t){return bt.create({name:t,providers:[{provide:au,useValue:"platform"},{provide:MD,useValue:new Set([()=>Tc=null])},...e]})}function gO(e=[]){if(Tc)return Tc;let t=mO(e);return Tc=t,sO(),vO(t),t}function vO(e){let t=e.get(th,null);t==null||t.forEach(n=>n())}function TD(){return!1}function AD(e){try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=gO(r),o=[fO(),...n||[]],a=new Kc({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1}).injector,c=a.get(ue);return c.run(()=>{a.resolveInjectorInitializers();let u=a.get(lr,null),l;c.runOutsideAngular(()=>{l=c.onError.subscribe({next:p=>{u.handleError(p)}})});let d=()=>a.destroy(),f=i.get(MD);return f.add(d),a.onDestroy(()=>{l.unsubscribe(),f.delete(d)}),cO(u,c,()=>{let p=a.get(SD);return p.runInitializers(),p.donePromise.then(()=>{let g=a.get(Ps,Yc);PA(g||Yc);let _=a.get(Nr);return t!==void 0&&_.bootstrap(t),_})})})}catch(t){return Promise.reject(t)}}var jv=!1;function yO(){jv||(jv=!0,mM(),TA(),VA(),xA(),IA(),wA(),hA(),HM())}function _O(e,t){return Nh(e)}function OD(){return vi([{provide:Dc,useFactory:()=>{let e=!0;if(gc()){let t=v(yi,{optional:!0});e=!!(t!=null&&t.get(S_,null))}return e&&As("NgHydration"),e}},{provide:go,useValue:()=>{gc()&&v(Dc)&&(DO(),yO())},multi:!0},{provide:P_,useFactory:()=>gc()&&v(Dc)},{provide:wo,useFactory:()=>{if(gc()&&v(Dc)){let e=v(Nr),t=v(bt);return()=>{_O(e,t).then(()=>{ue.assertInAngularZone(),oA(e)})}}return()=>{}},multi:!0}])}function DO(){var n;let e=Ss(),t;for(let r of e.body.childNodes)if(r.nodeType===Node.COMMENT_NODE&&((n=r.textContent)==null?void 0:n.trim())===hM){t=r;break}if(!t)throw new C(-507,!1)}function Rs(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}var Ph=null;function vr(){return Ph}function LD(e){Ph||(Ph=e)}var bu=class{},de=new D("DocumentToken"),kD=(()=>{let t=class t{historyGo(r){throw new Error("Not implemented")}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(bO))(),providedIn:"platform"});let e=t;return e})();var bO=(()=>{let t=class t extends kD{constructor(){super(),this._doc=v(de),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return vr().getBaseHref(this._doc)}onPopState(r){let i=vr().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",r,!1),()=>i.removeEventListener("popstate",r)}onHashChange(r){let i=vr().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",r,!1),()=>i.removeEventListener("hashchange",r)}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(r){this._location.pathname=r}pushState(r,i,o){this._history.pushState(r,i,o)}replaceState(r,i,o){this._history.replaceState(r,i,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(r=0){this._history.go(r)}getState(){return this._history.state}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>new t)(),providedIn:"platform"});let e=t;return e})();function jD(e,t){if(e.length==0)return t;if(t.length==0)return e;let n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,n==2?e+t.substring(1):n==1?e+t:e+"/"+t}function xD(e){let t=e.match(/#|\?|$/),n=t&&t.index||e.length,r=n-(e[n-1]==="/"?1:0);return e.slice(0,r)+e.slice(n)}function Di(e){return e&&e[0]!=="?"?"?"+e:e}var Iu=(()=>{let t=class t{historyGo(r){throw new Error("Not implemented")}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(VD))(),providedIn:"root"});let e=t;return e})(),CO=new D("appBaseHref"),VD=(()=>{let t=class t extends Iu{constructor(r,i){var o,s,a;super(),this._platformLocation=r,this._removeListenerFns=[],this._baseHref=(a=(s=i!=null?i:this._platformLocation.getBaseHrefFromDOM())!=null?s:(o=v(de).location)==null?void 0:o.origin)!=null?a:""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}prepareExternalUrl(r){return jD(this._baseHref,r)}path(r=!1){let i=this._platformLocation.pathname+Di(this._platformLocation.search),o=this._platformLocation.hash;return o&&r?"".concat(i).concat(o):i}pushState(r,i,o,s){let a=this.prepareExternalUrl(o+Di(s));this._platformLocation.pushState(r,i,a)}replaceState(r,i,o,s){let a=this.prepareExternalUrl(o+Di(s));this._platformLocation.replaceState(r,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){var i,o;(o=(i=this._platformLocation).historyGo)==null||o.call(i,r)}};t.\u0275fac=function(i){return new(i||t)(I(kD),I(CO,8))},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Fs=(()=>{let t=class t{constructor(r){this._subject=new et,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=r;let i=this._locationStrategy.getBaseHref();this._basePath=MO(xD(ND(i))),this._locationStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){var r;(r=this._urlChangeSubscription)==null||r.unsubscribe(),this._urlChangeListeners=[]}path(r=!1){return this.normalize(this._locationStrategy.path(r))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(r,i=""){return this.path()==this.normalize(r+Di(i))}normalize(r){return t.stripTrailingSlash(SO(this._basePath,ND(r)))}prepareExternalUrl(r){return r&&r[0]!=="/"&&(r="/"+r),this._locationStrategy.prepareExternalUrl(r)}go(r,i="",o=null){this._locationStrategy.pushState(o,"",r,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+Di(i)),o)}replaceState(r,i="",o=null){this._locationStrategy.replaceState(o,"",r,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+Di(i)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(r=0){var i,o;(o=(i=this._locationStrategy).historyGo)==null||o.call(i,r)}onUrlChange(r){return this._urlChangeListeners.push(r),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{var o;let i=this._urlChangeListeners.indexOf(r);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&((o=this._urlChangeSubscription)==null||o.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(r="",i){this._urlChangeListeners.forEach(o=>o(r,i))}subscribe(r,i,o){return this._subject.subscribe({next:r,error:i,complete:o})}};t.normalizeQueryParams=Di,t.joinWithSlash=jD,t.stripTrailingSlash=xD,t.\u0275fac=function(i){return new(i||t)(I(Iu))},t.\u0275prov=S({token:t,factory:()=>IO(),providedIn:"root"});let e=t;return e})();function IO(){return new Fs(I(Iu))}function SO(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function ND(e){return e.replace(/\/index.html$/,"")}function MO(e){if(new RegExp("^(https?:)?//").test(e)){let[,n]=e.split(/\/\/[^\/]+/);return n}return e}function UD(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,o]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(o)}return null}var Xz=(()=>{let t=class t{constructor(r){this._viewContainerRef=r,this.ngComponentOutlet=null,this._inputsUsed=new Map}_needToReCreateNgModuleInstance(r){return r.ngComponentOutletNgModule!==void 0||r.ngComponentOutletNgModuleFactory!==void 0}_needToReCreateComponentInstance(r){return r.ngComponentOutlet!==void 0||r.ngComponentOutletContent!==void 0||r.ngComponentOutletInjector!==void 0||this._needToReCreateNgModuleInstance(r)}ngOnChanges(r){var i;if(this._needToReCreateComponentInstance(r)&&(this._viewContainerRef.clear(),this._inputsUsed.clear(),this._componentRef=void 0,this.ngComponentOutlet)){let o=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;this._needToReCreateNgModuleInstance(r)&&((i=this._moduleRef)==null||i.destroy(),this.ngComponentOutletNgModule?this._moduleRef=pD(this.ngComponentOutletNgModule,PD(o)):this.ngComponentOutletNgModuleFactory?this._moduleRef=this.ngComponentOutletNgModuleFactory.create(PD(o)):this._moduleRef=void 0),this._componentRef=this._viewContainerRef.createComponent(this.ngComponentOutlet,{injector:o,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent})}}ngDoCheck(){if(this._componentRef){if(this.ngComponentOutletInputs)for(let r of Object.keys(this.ngComponentOutletInputs))this._inputsUsed.set(r,!0);this._applyInputStateDiff(this._componentRef)}}ngOnDestroy(){var r;(r=this._moduleRef)==null||r.destroy()}_applyInputStateDiff(r){for(let[i,o]of this._inputsUsed)o?(r.setInput(i,this.ngComponentOutletInputs[i]),this._inputsUsed.set(i,!1)):(r.setInput(i,void 0),this._inputsUsed.delete(i))}};t.\u0275fac=function(i){return new(i||t)(y(Nt))},t.\u0275dir=$({type:t,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInputs:"ngComponentOutletInputs",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},standalone:!0,features:[on]});let e=t;return e})();function PD(e){return e.get(dr).injector}var Rh=class{constructor(t,n,r,i){this.$implicit=t,this.ngForOf=n,this.index=r,this.count=i}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Jz=(()=>{let t=class t{set ngForOf(r){this._ngForOf=r,this._ngForOfDirty=!0}set ngForTrackBy(r){this._trackByFn=r}get ngForTrackBy(){return this._trackByFn}constructor(r,i,o){this._viewContainer=r,this._template=i,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(r){r&&(this._template=r)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let r=this._ngForOf;if(!this._differ&&r)if(!1)try{}catch{}else this._differ=this._differs.find(r).create(this.ngForTrackBy)}if(this._differ){let r=this._differ.diff(this._ngForOf);r&&this._applyChanges(r)}}_applyChanges(r){let i=this._viewContainer;r.forEachOperation((o,s,a)=>{if(o.previousIndex==null)i.createEmbeddedView(this._template,new Rh(o.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)i.remove(s===null?void 0:s);else if(s!==null){let c=i.get(s);i.move(c,a),RD(c,o)}});for(let o=0,s=i.length;o{let s=i.get(o.currentIndex);RD(s,o)})}static ngTemplateContextGuard(r,i){return!0}};t.\u0275fac=function(i){return new(i||t)(y(Nt),y(pt),y(hh))},t.\u0275dir=$({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let e=t;return e})();function RD(e,t){e.context.$implicit=t.item}var Pt=(()=>{let t=class t{constructor(r,i){this._viewContainer=r,this._context=new Fh,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(r){this._context.$implicit=this._context.ngIf=r,this._updateView()}set ngIfThen(r){FD("ngIfThen",r),this._thenTemplateRef=r,this._thenViewRef=null,this._updateView()}set ngIfElse(r){FD("ngIfElse",r),this._elseTemplateRef=r,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(r,i){return!0}};t.\u0275fac=function(i){return new(i||t)(y(Nt),y(pt))},t.\u0275dir=$({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let e=t;return e})(),Fh=class{constructor(){this.$implicit=null,this.ngIf=null}};function FD(e,t){if(!!!(!t||t.createEmbeddedView))throw new Error("".concat(e," must be a TemplateRef, but received '").concat(wt(t),"'."))}function TO(e,t){return new C(2100,!1)}var Lh=class{createSubscription(t,n){return fh(()=>t.subscribe({next:n,error:r=>{throw r}}))}dispose(t){fh(()=>t.unsubscribe())}},kh=class{createSubscription(t,n){return t.then(n,r=>{throw r})}dispose(t){}},AO=new kh,OO=new Lh,zn=(()=>{let t=class t{constructor(r){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=r}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(r){return this._obj?r!==this._obj?(this._dispose(),this.transform(r)):this._latestValue:(r&&this._subscribe(r),this._latestValue)}_subscribe(r){this._obj=r,this._strategy=this._selectStrategy(r),this._subscription=this._strategy.createSubscription(r,i=>this._updateLatestValue(r,i))}_selectStrategy(r){if(xr(r))return AO;if(Mh(r))return OO;throw TO(t,r)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(r,i){r===this._obj&&(this._latestValue=i,this._ref.markForCheck())}};t.\u0275fac=function(i){return new(i||t)(y(gt,16))},t.\u0275pipe=pi({name:"async",type:t,pure:!1,standalone:!0});let e=t;return e})();var Rt=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=K({type:t}),t.\u0275inj=Z({});let e=t;return e})(),jh="browser",xO="server";function BD(e){return e===jh}function Ls(e){return e===xO}var Cu=class{};var Mu=class e{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split("\n").forEach(n=>{let r=n.indexOf(":");if(r>0){let i=n.slice(0,r),o=i.toLowerCase(),s=n.slice(r+1).trim();this.maybeSetNormalizedName(i,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((n,r)=>{this.setHeaderEntries(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(),Array.from(t.headers.keys()).forEach(n=>{this.headers.set(n,t.headers.get(n)),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 i=(t.op==="a"?this.headers.get(n):void 0)||[];i.push(...r),this.headers.set(n,i);break;case"d":let o=t.value;if(!o)this.headers.delete(n),this.normalizedNames.delete(n);else{let s=this.headers.get(n);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,s)}break}}setHeaderEntries(t,n){let r=(Array.isArray(n)?n:[n]).map(o=>o.toString()),i=t.toLowerCase();this.headers.set(i,r),this.maybeSetNormalizedName(t,i)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}};var YD=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}(YD||{}),Vh=class{constructor(t,n=200,r="OK"){this.headers=t.headers||new Mu,this.status=t.status!==void 0?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}};var Tu=class e extends Vh{constructor(t={}){super(t),this.type=YD.Response,this.body=t.body!==void 0?t.body:null}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})}};var PO=new D("");var HD="b",$D="h",zD="s",GD="st",WD="u",qD="rt",Su=new D(""),RO=["GET","HEAD"];function FO(e,t){var d;let l=v(Su),{isCacheActive:n}=l,r=gg(l,["isCacheActive"]),{transferCache:i,method:o}=e;if(!n||o==="POST"&&!r.includePostRequests&&!i||o!=="POST"&&!RO.includes(o)||i===!1||((d=r.filter)==null?void 0:d.call(r,e))===!1)return t(e);let s=v(yi),a=kO(e),c=s.get(a,null),u=r.includeHeaders;if(typeof i=="object"&&i.includeHeaders&&(u=i.includeHeaders),c){let{[HD]:f,[qD]:p,[$D]:g,[zD]:_,[GD]:M,[WD]:A}=c,Y=f;switch(p){case"arraybuffer":Y=new TextEncoder().encode(f).buffer;break;case"blob":Y=new Blob([f]);break}let B=new Mu(g);return T(new Tu({body:Y,headers:B,status:_,statusText:M,url:A}))}return t(e).pipe(Ne(f=>{f instanceof Tu&&s.set(a,{[HD]:f.body,[$D]:LO(f.headers,u),[zD]:f.status,[GD]:f.statusText,[WD]:f.url||"",[qD]:e.responseType})}))}function LO(e,t){if(!t)return{};let n={};for(let r of t){let i=e.getAll(r);i!==null&&(n[r]=i)}return n}function kO(e){let{params:t,method:n,responseType:r,url:i}=e,o=t.keys().sort().map(c=>"".concat(c,"=").concat(t.getAll(c))).join("&"),s=n+"."+r+"."+i+"?"+o,a=jO(s);return a}function jO(e){let t=0;for(let n of e)t=Math.imul(31,t)+n.charCodeAt(0)<<0;return t+=2147483647+1,t.toString()}function ZD(e){return[{provide:Su,useFactory:()=>(As("NgHttpTransferCache"),R({isCacheActive:!0},e))},{provide:PO,useValue:FO,multi:!0,deps:[yi,Su]},{provide:wo,multi:!0,useFactory:()=>{let t=v(Nr),n=v(Su);return()=>{Nh(t).then(()=>{n.isCacheActive=!1})}}}]}var Hh=class extends bu{constructor(){super(...arguments),this.supportsDOMEvents=!0}},$h=class e extends Hh{static makeCurrent(){LD(new e)}onAndCancel(t,n,r){return t.addEventListener(n,r),()=>{t.removeEventListener(n,r)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}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=VO();return n==null?null:UO(n)}resetBaseElement(){ks=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return UD(document.cookie,t)}},ks=null;function VO(){return ks=ks||document.querySelector("base"),ks?ks.getAttribute("href"):null}function UO(e){return new URL(e,document.baseURI).pathname}var BO=(()=>{let t=class t{build(){return new XMLHttpRequest}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),bo=new D("EventManagerPlugins"),JD=(()=>{let t=class t{constructor(r,i){this._zone=i,this._eventNameToPlugin=new Map,r.forEach(o=>{o.manager=this}),this._plugins=r.slice().reverse()}addEventListener(r,i,o){return this._findPluginFor(i).addEventListener(r,i,o)}getZone(){return this._zone}_findPluginFor(r){let i=this._eventNameToPlugin.get(r);if(i)return i;if(i=this._plugins.find(s=>s.supports(r)),!i)throw new C(5101,!1);return this._eventNameToPlugin.set(r,i),i}};t.\u0275fac=function(i){return new(i||t)(I(bo),I(ue))},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),Au=class{constructor(t){this._doc=t}},Uh="ng-app-id",e0=(()=>{let t=class t{constructor(r,i,o,s={}){this.doc=r,this.appId=i,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Ls(s),this.resetHostNodes()}addStyles(r){for(let i of r)this.changeUsageCount(i,1)===1&&this.onStyleAdded(i)}removeStyles(r){for(let i of r)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){let r=this.styleNodesInDOM;r&&(r.forEach(i=>i.remove()),r.clear());for(let i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(r){this.hostNodes.add(r);for(let i of this.getAllStyles())this.addStyleToHost(r,i)}removeHost(r){this.hostNodes.delete(r)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(r){for(let i of this.hostNodes)this.addStyleToHost(i,r)}onStyleRemoved(r){var o,s;let i=this.styleRef;(s=(o=i.get(r))==null?void 0:o.elements)==null||s.forEach(a=>a.remove()),i.delete(r)}collectServerRenderedStyles(){var i;let r=(i=this.doc.head)==null?void 0:i.querySelectorAll("style[".concat(Uh,'="').concat(this.appId,'"]'));if(r!=null&&r.length){let o=new Map;return r.forEach(s=>{s.textContent!=null&&o.set(s.textContent,s)}),o}return null}changeUsageCount(r,i){let o=this.styleRef;if(o.has(r)){let s=o.get(r);return s.usage+=i,s.usage}return o.set(r,{usage:i,elements:[]}),i}getStyleElement(r,i){let o=this.styleNodesInDOM,s=o==null?void 0:o.get(i);if((s==null?void 0:s.parentNode)===r)return o.delete(i),s.removeAttribute(Uh),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=i,this.platformIsServer&&a.setAttribute(Uh,this.appId),r.appendChild(a),a}}addStyleToHost(r,i){var c;let o=this.getStyleElement(r,i),s=this.styleRef,a=(c=s.get(i))==null?void 0:c.elements;a?a.push(o):s.set(i,{elements:[o],usage:1})}resetHostNodes(){let r=this.hostNodes;r.clear(),r.add(this.doc.head)}};t.\u0275fac=function(i){return new(i||t)(I(de),I(cu),I(nh,8),I(Qt))},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),Bh={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/MathML/"},Gh=/%COMP%/g,t0="%COMP%",HO="_nghost-".concat(t0),$O="_ngcontent-".concat(t0),zO=!0,GO=new D("RemoveStylesOnCompDestroy",{providedIn:"root",factory:()=>zO});function WO(e){return $O.replace(Gh,e)}function qO(e){return HO.replace(Gh,e)}function n0(e,t){return t.map(n=>n.replace(Gh,e))}var KD=(()=>{let t=class t{constructor(r,i,o,s,a,c,u,l=null){this.eventManager=r,this.sharedStylesHost=i,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=c,this.ngZone=u,this.nonce=l,this.rendererByCompId=new Map,this.platformIsServer=Ls(c),this.defaultRenderer=new js(r,a,u,this.platformIsServer)}createRenderer(r,i){if(!r||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===Fn.ShadowDom&&(i=Ve(R({},i),{encapsulation:Fn.Emulated}));let o=this.getOrCreateRenderer(r,i);return o instanceof Ou?o.applyToHost(r):o instanceof Vs&&o.applyStyles(),o}getOrCreateRenderer(r,i){let o=this.rendererByCompId,s=o.get(i.id);if(!s){let a=this.doc,c=this.ngZone,u=this.eventManager,l=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,f=this.platformIsServer;switch(i.encapsulation){case Fn.Emulated:s=new Ou(u,l,i,this.appId,d,a,c,f);break;case Fn.ShadowDom:return new zh(u,l,r,i,a,c,this.nonce,f);default:s=new Vs(u,l,i,d,a,c,f);break}o.set(i.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};t.\u0275fac=function(i){return new(i||t)(I(JD),I(e0),I(cu),I(GO),I(de),I(Qt),I(ue),I(nh))},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),js=class{constructor(t,n,r,i){this.eventManager=t,this.doc=n,this.ngZone=r,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,n){return n?this.doc.createElementNS(Bh[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(QD(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){t&&(QD(t)?t.content:t).insertBefore(n,r)}removeChild(t,n){t&&t.removeChild(n)}selectRootElement(t,n){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new C(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,i){if(i){n=i+":"+n;let o=Bh[i];o?t.setAttributeNS(o,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let i=Bh[r];i?t.removeAttributeNS(i,n):t.removeAttribute("".concat(r,":").concat(n))}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,i){i&(cr.DashCase|cr.Important)?t.style.setProperty(n,r,i&cr.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){r&cr.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){if(typeof t=="string"&&(t=vr().getGlobalEventTarget(this.doc,t),!t))throw new Error("Unsupported event target ".concat(t," for event ").concat(n));return this.eventManager.addEventListener(t,n,this.decoratePreventDefault(r))}decoratePreventDefault(t){return n=>{if(n==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(n)):t(n))===!1&&n.preventDefault()}}};function QD(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var zh=class extends js{constructor(t,n,r,i,o,s,a,c){super(t,o,s,c),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=n0(i.id,i.styles);for(let l of u){let d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=l,this.shadowRoot.appendChild(d)}}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(this.nodeOrShadowRoot(t),n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Vs=class extends js{constructor(t,n,r,i,o,s,a,c){super(t,o,s,a),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=i,this.styles=c?n0(c,r.styles):r.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},Ou=class extends Vs{constructor(t,n,r,i,o,s,a,c){let u=i+"-"+r.id;super(t,n,r,o,s,a,c,u),this.contentAttr=WO(u),this.hostAttr=qO(u)}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}},YO=(()=>{let t=class t extends Au{constructor(r){super(r)}supports(r){return!0}addEventListener(r,i,o){return r.addEventListener(i,o,!1),()=>this.removeEventListener(r,i,o)}removeEventListener(r,i,o){return r.removeEventListener(i,o)}};t.\u0275fac=function(i){return new(i||t)(I(de))},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),XD=["alt","control","meta","shift"],ZO={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},KO={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},QO=(()=>{let t=class t extends Au{constructor(r){super(r)}supports(r){return t.parseEventName(r)!=null}addEventListener(r,i,o){let s=t.parseEventName(i),a=t.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>vr().onAndCancel(r,s.domEventName,a))}static parseEventName(r){let i=r.toLowerCase().split("."),o=i.shift();if(i.length===0||!(o==="keydown"||o==="keyup"))return null;let s=t._normalizeKey(i.pop()),a="",c=i.indexOf("code");if(c>-1&&(i.splice(c,1),a="code."),XD.forEach(l=>{let d=i.indexOf(l);d>-1&&(i.splice(d,1),a+=l+".")}),a+=s,i.length!=0||s.length===0)return null;let u={};return u.domEventName=o,u.fullKey=a,u}static matchEventFullKeyCode(r,i){let o=ZO[r.key]||r.key,s="";return i.indexOf("code.")>-1&&(o=r.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),XD.forEach(a=>{if(a!==o){let c=KO[a];c(r)&&(s+=a+".")}}),s+=o,s===i)}static eventCallback(r,i,o){return s=>{t.matchEventFullKeyCode(s,r)&&o.runGuarded(()=>i(s))}}static _normalizeKey(r){return r==="esc"?"escape":r}};t.\u0275fac=function(i){return new(i||t)(I(de))},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})();function SG(e,t){return AD(R({rootComponent:e},XO(t)))}function XO(e){var t;return{appProviders:[...rx,...(t=e==null?void 0:e.providers)!=null?t:[]],platformProviders:nx}}function JO(){$h.makeCurrent()}function ex(){return new lr}function tx(){return Gy(document),document}var nx=[{provide:Qt,useValue:jh},{provide:th,useValue:JO,multi:!0},{provide:de,useFactory:tx,deps:[]}];var rx=[{provide:au,useValue:"root"},{provide:lr,useFactory:ex,deps:[]},{provide:bo,useClass:YO,multi:!0,deps:[de,ue,Qt]},{provide:bo,useClass:QO,multi:!0,deps:[de]},KD,e0,JD,{provide:li,useExisting:KD},{provide:Cu,useClass:BO,deps:[]},[]];function ix(){return new Wh(I(de))}var Wh=(()=>{let t=class t{constructor(r){this._doc=r}getTitle(){return this._doc.title}setTitle(r){this._doc.title=r||""}};t.\u0275fac=function(i){return new(i||t)(I(de))},t.\u0275prov=S({token:t,factory:function(i){let o=null;return i?o=new i:o=ix(),o},providedIn:"root"});let e=t;return e})();var Us=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:function(i){let o=null;return i?o=new(i||t):o=I(r0),o},providedIn:"root"});let e=t;return e})();function ox(e){return new r0(e.get(de))}var r0=(()=>{let t=class t extends Us{constructor(r){super(),this._doc=r}sanitize(r,i){if(i==null)return null;switch(r){case mt.NONE:return i;case mt.HTML:return Or(i,"HTML")?Vn(i):ch(this._doc,String(i)).toString();case mt.STYLE:return Or(i,"Style")?Vn(i):i;case mt.SCRIPT:if(Or(i,"Script"))return Vn(i);throw new C(5200,!1);case mt.URL:return Or(i,"URL")?Vn(i):du(String(i));case mt.RESOURCE_URL:if(Or(i,"ResourceURL"))return Vn(i);throw new C(5201,!1);default:throw new C(5202,!1)}}bypassSecurityTrustHtml(r){return f_(r)}bypassSecurityTrustStyle(r){return h_(r)}bypassSecurityTrustScript(r){return p_(r)}bypassSecurityTrustUrl(r){return m_(r)}bypassSecurityTrustResourceUrl(r){return g_(r)}};t.\u0275fac=function(i){return new(i||t)(I(de))},t.\u0275prov=S({token:t,factory:function(i){let o=null;return i?o=new i:o=ox(I(bt)),o},providedIn:"root"});let e=t;return e})();function MG(...e){let t=[],n=new Set,r=n.has(1);for(let{\u0275providers:i,\u0275kind:o}of e)n.add(o),i.length&&t.push(i);return vi([[],OD(),n.has(0)||r?[]:ZD({}),t])}var f0=(()=>{let t=class t{constructor(r,i){this._renderer=r,this._elementRef=i,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(r,i){this._renderer.setProperty(this._elementRef.nativeElement,r,i)}registerOnTouched(r){this.onTouched=r}registerOnChange(r){this.onChange=r}setDisabledState(r){this.setProperty("disabled",r)}};t.\u0275fac=function(i){return new(i||t)(y(gr),y(X))},t.\u0275dir=$({type:t});let e=t;return e})(),h0=(()=>{let t=class t extends f0{};t.\u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})(),t.\u0275dir=$({type:t,features:[$e]});let e=t;return e})(),Qh=new D("NgValueAccessor");var ax={provide:Qh,useExisting:fr(()=>p0),multi:!0};function cx(){let e=vr()?vr().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}var ux=new D("CompositionEventMode"),p0=(()=>{let t=class t extends f0{constructor(r,i,o){super(r,i),this._compositionMode=o,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!cx())}writeValue(r){let i=r==null?"":r;this.setProperty("value",i)}_handleInput(r){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(r)}_compositionStart(){this._composing=!0}_compositionEnd(r){this._composing=!1,this._compositionMode&&this.onChange(r)}};t.\u0275fac=function(i){return new(i||t)(y(gr),y(X),y(ux,8))},t.\u0275dir=$({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,o){i&1&&rt("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},features:[ze([ax]),$e]});let e=t;return e})();function lx(e){return e==null||(typeof e=="string"||Array.isArray(e))&&e.length===0}var m0=new D("NgValidators"),dx=new D("NgAsyncValidators");function fx(e){return lx(e.value)?{required:!0}:null}function i0(e){return null}function g0(e){return e!=null}function v0(e){return xr(e)?Oe(e):e}function y0(e){let t={};return e.forEach(n=>{t=n!=null?R(R({},t),n):t}),Object.keys(t).length===0?null:t}function _0(e,t){return t.map(n=>n(e))}function hx(e){return!e.validate}function D0(e){return e.map(t=>hx(t)?t:n=>t.validate(n))}function px(e){if(!e)return null;let t=e.filter(g0);return t.length==0?null:function(n){return y0(_0(n,t))}}function E0(e){return e!=null?px(D0(e)):null}function mx(e){if(!e)return null;let t=e.filter(g0);return t.length==0?null:function(n){let r=_0(n,t).map(v0);return yd(r).pipe(w(y0))}}function w0(e){return e!=null?mx(D0(e)):null}function o0(e,t){return e===null?[t]:Array.isArray(e)?[...e,t]:[e,t]}function gx(e){return e._rawValidators}function vx(e){return e._rawAsyncValidators}function qh(e){return e?Array.isArray(e)?e:[e]:[]}function Nu(e,t){return Array.isArray(e)?e.includes(t):e===t}function s0(e,t){let n=qh(t);return qh(e).forEach(i=>{Nu(n,i)||n.push(i)}),n}function a0(e,t){return qh(t).filter(n=>!Nu(e,n))}var Pu=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=E0(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=w0(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,n){return this.control?this.control.hasError(t,n):!1}getError(t,n){return this.control?this.control.getError(t,n):null}},Yh=class extends Pu{get formDirective(){return null}get path(){return null}},wi=class extends Pu{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},Zh=class{constructor(t){this._cd=t}get isTouched(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.touched)}get isUntouched(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.untouched)}get isPristine(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.pristine)}get isDirty(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.dirty)}get isValid(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.valid)}get isInvalid(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.invalid)}get isPending(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.pending)}get isSubmitted(){var t;return!!((t=this._cd)!=null&&t.submitted)}},yx={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},zG=Ve(R({},yx),{"[class.ng-submitted]":"isSubmitted"}),GG=(()=>{let t=class t extends Zh{constructor(r){super(r)}};t.\u0275fac=function(i){return new(i||t)(y(wi,2))},t.\u0275dir=$({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,o){i&2&&Xe("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},features:[$e]});let e=t;return e})();var Bs="VALID",xu="INVALID",Co="PENDING",Hs="DISABLED";function _x(e){return(Ru(e)?e.validators:e)||null}function Dx(e){return Array.isArray(e)?E0(e):e||null}function Ex(e,t){return(Ru(t)?t.asyncValidators:e)||null}function wx(e){return Array.isArray(e)?w0(e):e||null}function Ru(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}var Kh=class{constructor(t,n){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Bs}get invalid(){return this.status===xu}get pending(){return this.status==Co}get disabled(){return this.status===Hs}get enabled(){return this.status!==Hs}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(s0(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(s0(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(a0(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(a0(t,this._rawAsyncValidators))}hasValidator(t){return Nu(this._rawValidators,t)}hasAsyncValidator(t){return Nu(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(n=>{n.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=Co,t.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=Hs,this.errors=null,this._forEachChild(r=>{r.disable(Ve(R({},t),{onlySelf:!0}))}),this._updateValue(),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Ve(R({},t),{skipPristineCheck:n})),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=Bs,this._forEachChild(r=>{r.enable(Ve(R({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Ve(R({},t),{skipPristineCheck:n})),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Bs||this.status===Co)&&this._runAsyncValidator(t.emitEvent)),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Hs:Bs}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Co,this._hasOwnPendingAsyncValidator=!0;let n=v0(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,n={}){this.errors=t,this._updateControlsErrors(n.emitEvent!==!1)}get(t){let n=t;return n==null||(Array.isArray(n)||(n=n.split(".")),n.length===0)?null:n.reduce((r,i)=>r&&r._find(i),this)}getError(t,n){let r=n?this.get(n):this;return r&&r.errors?r.errors[t]:null}hasError(t,n){return!!this.getError(t,n)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new et,this.statusChanges=new et}_calculateStatus(){return this._allControlsDisabled()?Hs:this.errors?xu:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Co)?Co:this._anyControlsHaveStatus(xu)?xu:Bs}_anyControlsHaveStatus(t){return this._anyControls(n=>n.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Ru(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let n=this._parent&&this._parent.dirty;return!t&&!!n&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Dx(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=wx(this._rawAsyncValidators)}};var b0=new D("CallSetDisabledState",{providedIn:"root",factory:()=>Xh}),Xh="always";function bx(e,t){return[...t.path,e]}function Cx(e,t,n=Xh){var r,i;Sx(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||n==="always")&&((i=(r=t.valueAccessor).setDisabledState)==null||i.call(r,e.disabled)),Mx(e,t),Ax(e,t),Tx(e,t),Ix(e,t)}function c0(e,t){e.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(t)})}function Ix(e,t){if(t.valueAccessor.setDisabledState){let n=r=>{t.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(n),t._registerOnDestroy(()=>{e._unregisterOnDisabledChange(n)})}}function Sx(e,t){let n=gx(e);t.validator!==null?e.setValidators(o0(n,t.validator)):typeof n=="function"&&e.setValidators([n]);let r=vx(e);t.asyncValidator!==null?e.setAsyncValidators(o0(r,t.asyncValidator)):typeof r=="function"&&e.setAsyncValidators([r]);let i=()=>e.updateValueAndValidity();c0(t._rawValidators,i),c0(t._rawAsyncValidators,i)}function Mx(e,t){t.valueAccessor.registerOnChange(n=>{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,e.updateOn==="change"&&C0(e,t)})}function Tx(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,e.updateOn==="blur"&&e._pendingChange&&C0(e,t),e.updateOn!=="submit"&&e.markAsTouched()})}function C0(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Ax(e,t){let n=(r,i)=>{t.valueAccessor.writeValue(r),i&&t.viewToModelUpdate(r)};e.registerOnChange(n),t._registerOnDestroy(()=>{e._unregisterOnChange(n)})}function Ox(e,t){if(!e.hasOwnProperty("model"))return!1;let n=e.model;return n.isFirstChange()?!0:!Object.is(t,n.currentValue)}function xx(e){return Object.getPrototypeOf(e.constructor)===h0}function Nx(e,t){if(!t)return null;Array.isArray(t);let n,r,i;return t.forEach(o=>{o.constructor===p0?n=o:xx(o)?r=o:i=o}),i||r||n||null}function u0(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function l0(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===2&&"value"in e&&"disabled"in e}var Px=class extends Kh{constructor(t=null,n,r){super(_x(n),Ex(r,n)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ru(n)&&(n.nonNullable||n.initialValueIsDefault)&&(l0(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,n={}){this.value=this._pendingValue=t,this._onChange.length&&n.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,n.emitViewToModelChange!==!1)),this.updateValueAndValidity(n)}patchValue(t,n={}){this.setValue(t,n)}reset(t=this.defaultValue,n={}){this._applyFormState(t),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){u0(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){u0(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){l0(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Rx={provide:wi,useExisting:fr(()=>Fu)},d0=(()=>Promise.resolve())(),Fu=(()=>{let t=class t extends wi{constructor(r,i,o,s,a,c){super(),this._changeDetectorRef=a,this.callSetDisabledState=c,this.control=new Px,this._registered=!1,this.name="",this.update=new et,this._parent=r,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=Nx(this,s)}ngOnChanges(r){if(this._checkForErrors(),!this._registered||"name"in r){if(this._registered&&(this._checkName(),this.formDirective)){let i=r.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in r&&this._updateDisabled(r),Ox(r,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(r){this.viewModel=r,this.update.emit(r)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Cx(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(r){d0.then(()=>{var i;this.control.setValue(r,{emitViewToModelChange:!1}),(i=this._changeDetectorRef)==null||i.markForCheck()})}_updateDisabled(r){let i=r.isDisabled.currentValue,o=i!==0&&Rs(i);d0.then(()=>{var s;o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),(s=this._changeDetectorRef)==null||s.markForCheck()})}_getPath(r){return this._parent?bx(r,this._parent):[r]}};t.\u0275fac=function(i){return new(i||t)(y(Yh,9),y(m0,10),y(dx,10),y(Qh,10),y(gt,8),y(b0,8))},t.\u0275dir=$({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[ze([Rx]),$e,on]});let e=t;return e})();var Fx=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=K({type:t}),t.\u0275inj=Z({});let e=t;return e})();var Lx={provide:Qh,useExisting:fr(()=>kx),multi:!0},kx=(()=>{let t=class t extends h0{writeValue(r){this.setProperty("value",parseFloat(r))}registerOnChange(r){this.onChange=i=>{r(i==""?null:parseFloat(i))}}};t.\u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})(),t.\u0275dir=$({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(i,o){i&1&&rt("change",function(a){return o.onChange(a.target.value)})("input",function(a){return o.onChange(a.target.value)})("blur",function(){return o.onTouched()})},features:[ze([Lx]),$e]});let e=t;return e})();var jx=(()=>{let t=class t{constructor(){this._validator=i0}ngOnChanges(r){if(this.inputName in r){let i=this.normalizeInput(r[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):i0,this._onChange&&this._onChange()}}validate(r){return this._validator(r)}registerOnValidatorChange(r){this._onChange=r}enabled(r){return r!=null}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=$({type:t,features:[on]});let e=t;return e})();var Vx={provide:m0,useExisting:fr(()=>Ux),multi:!0};var Ux=(()=>{let t=class t extends jx{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=Rs,this.createValidator=r=>fx}enabled(r){return r}};t.\u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})(),t.\u0275dir=$({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,o){i&2&&at("required",o._enabled?"":null)},inputs:{required:"required"},features:[ze([Vx]),$e]});let e=t;return e})();var Bx=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=K({type:t}),t.\u0275inj=Z({imports:[Fx]});let e=t;return e})();var qG=(()=>{let t=class t{static withConfig(r){var i;return{ngModule:t,providers:[{provide:b0,useValue:(i=r.callSetDisabledState)!=null?i:Xh}]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=K({type:t}),t.\u0275inj=Z({imports:[Bx]});let e=t;return e})();var fe=new D("An abstraction over global window object",{factory:()=>{let{defaultView:e}=v(de);if(!e)throw new Error("Window is not available");return e}}),wn=new D("Shared Observable based on `window.requestAnimationFrame`",{factory:()=>{let{requestAnimationFrame:e,cancelAnimationFrame:t}=v(fe);return new N(r=>{let i=NaN,o=s=>{r.next(s),i=e(o)};return i=e(o),()=>{t(i)}}).pipe(Et())}}),JG=new D("An abstraction over window.caches object",{factory:()=>v(fe).caches}),e3=new D("An abstraction over window.crypto object",{factory:()=>v(fe).crypto}),t3=new D("An abstraction over window.CSS object",{factory:()=>v(fe).CSS||{escape:e=>e,supports:()=>!1}}),n3=new D("An abstraction over window.history object",{factory:()=>v(fe).history}),r3=new D("An abstraction over window.localStorage object",{factory:()=>v(fe).localStorage}),i3=new D("An abstraction over window.location object",{factory:()=>v(fe).location}),Io=new D("An abstraction over window.navigator object",{factory:()=>v(fe).navigator}),o3=new D("An abstraction over window.navigator.mediaDevices object",{factory:()=>v(Io).mediaDevices}),s3=new D("An abstraction over window.navigator.connection object",{factory:()=>v(Io).connection||null}),a3=new D("Shared Observable based on `document visibility changed`",{factory:()=>{let e=v(de);return On(e,"visibilitychange").pipe(_e(0),w(()=>e.visibilityState!=="hidden"),Ue(),Wt({refCount:!1,bufferSize:1}))}}),I0=new D("An abstraction over window.performance object",{factory:()=>v(fe).performance}),c3=new D("An abstraction over window.screen object",{factory:()=>v(fe).screen}),u3=new D("An abstraction over window.sessionStorage object",{factory:()=>v(fe).sessionStorage}),l3=new D("An abstraction over SpeechRecognition class",{factory:()=>{let e=v(fe);return e.speechRecognition||e.webkitSpeechRecognition||null}}),d3=new D("An abstraction over window.speechSynthesis object",{factory:()=>v(fe).speechSynthesis}),Jh=new D("An abstraction over window.navigator.userAgent object",{factory:()=>v(Io).userAgent});var Gn="*";function Ge(e,t){return{type:7,name:e,definitions:t,options:{}}}function G(e,t=null){return{type:4,styles:t,timings:e}}function S0(e,t=null){return{type:2,steps:e,options:t}}function E(e){return{type:6,styles:e,offset:null}}function ae(e,t,n=null){return{type:1,expr:e,animation:t,options:n}}function M0(e=null){return{type:9,options:e}}function ct(e,t,n=null){return{type:11,selector:e,animation:t,options:n}}function vt(e,t){return{type:12,timings:e,animation:t}}var Pr=class{constructor(t=0,n=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+n}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){let n=t=="start"?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}},$s=class{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let n=0,r=0,i=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++n==o&&this._onFinish()}),s.onDestroy(()=>{++r==o&&this._onDestroy()}),s.onStart(()=>{++i==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){let n=t*this.totalTime;this.players.forEach(r=>{let i=r.totalTime?Math.min(1,n/r.totalTime):1;r.setPosition(i)})}getPosition(){let t=this.players.reduce((n,r)=>n===null||r.totalTime>n.totalTime?r:n,null);return t!=null?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){let n=t=="start"?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}},Lu="!";var Rr=()=>!1,So=()=>!0,g3=79,T0={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0},v3=new vs,ep=[],tp=()=>{},A0=Object.assign(Object.assign({},T0),{toJSON(){return T0}}),y3=e=>String(e);function $x(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length}var _3=(e,t)=>e===t||$x(e,t),D3=Ge("tuiParentAnimation",[ae(":leave",[ct(":scope > *",[M0()],{optional:!0})])]),E3=Ge("tuiParentStop",[ae(":enter",[])]),Mo=1e3/15,O0=e=>"ownerSVGElement"in e?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,x0="\xA0",w3="\u2013";var N0="3.60.0";var P0="edge/";function C3(e,t){return parseInt(t.slice(t.toLowerCase().indexOf(P0)+P0.length),10)=t&&e=n?n:Math.round(e)}var zx=292;function Gx(e,t,n){if(e===1/0)return e;t=Math.min(t,zx);let r="".concat(e,"e").split("e"),i=n(Number("".concat(r[0],"e").concat(Number(r[1])+t))),o="".concat(i,"e").split("e");return Number("".concat(o[0],"e").concat(Number(o[1])-t))}function A3(e,t=0){return Gx(e,t,Math.round)}function F0(e,t){return e.slice(0,Math.max(t,0)).concat(e.slice(Math.max(t+1,0)))}function bn(e){return typeof e=="string"}function Ee(e){return ie(()=>e)}function ie(e){return new D("",{factory:e})}function L0(e){return e<.5?2*e*e:-1+(4-2*e)*e}function k0(e){return!e}function bi(e){return e!=null}function N3(e,t,n){return e===null?t===null:t===null?!1:n(e,t)}function Wx(e,t,n){let r=e;for(;r!==t.parentElement;){if(Math.floor(r.scrollTop)>0&&!n||Math.ceil(r.scrollTop+r.clientHeight)0&&!n||Math.ceil(r.scrollLeft+r.clientWidth)!e.contains(_));return g.length===4?g:null}function k3(e,t){let{offsetTop:n,offsetLeft:r,offsetParent:i}=t;for(;To(i)&&i!==e;)n+=i.offsetTop,r+=i.offsetLeft,i=i.offsetParent;return{offsetTop:n,offsetLeft:r}}function Vu(e,t=!0){return e===null?null:t&&e.scrollHeight>e.clientHeight||!t&&e.scrollWidth>e.clientWidth?e:Vu(e.parentElement,t)}function j3(e){return Kx(e)&&!e.readOnly||!!e.isContentEditable}function V3(e=0,t=0){let n={x:e,y:t,left:e,right:e,top:t,bottom:t,width:0,height:0};return Object.assign(Object.assign({},n),{toJSON(){return n}})}function U3(e){return"explicitOriginalTarget"in e?(e==null?void 0:e.explicitOriginalTarget)!==e.target:"pointerId"in e?e.pointerId===-1:"detail"in e&&"webkitForce"in e?(e==null?void 0:e.detail)===0:!1}function np({activeElement:e}){if(!(e!=null&&e.shadowRoot))return e;let t=e.shadowRoot.activeElement;for(;t!=null&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function U0(e){let t=np(e);To(t)&&t.blur()}function B0(e){if(e.hasAttribute("disabled")||e.getAttribute("tabIndex")==="-1")return!1;if(To(e)&&e.isContentEditable||e.getAttribute("tabIndex")==="0")return!0;switch(e.tagName){case"BUTTON":case"SELECT":case"TEXTAREA":return!0;case"VIDEO":case"AUDIO":return e.hasAttribute("controls");case"INPUT":return e.getAttribute("type")!=="hidden";case"A":case"LINK":return e.hasAttribute("href");default:return!1}}function Qx(e){return!e.hasAttribute("disabled")&&(e.getAttribute("tabIndex")==="-1"||B0(e))}function z3({initial:e,root:t,previous:n=!1,keyboard:r=!0}){if(!t.ownerDocument)return null;let i=r?B0:Qx,o=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,O0);for(o.currentNode=e;n?o.previousNode():o.nextNode();)if(To(o.currentNode)&&(e=o.currentNode),To(e)&&i(e))return e;return null}function Oo(e){return!!(e!=null&&e.ownerDocument)&&np(e.ownerDocument)===e&&e.ownerDocument.hasFocus()}function H0(e){if(!e.ownerDocument||!e.contains)return!1;let t=np(e.ownerDocument);return t!==null&&e.contains(t)&&e.ownerDocument.hasFocus()}function xo(e){return"".concat(e,"px")}function Xx(e){return e.platform.startsWith("Mac")||e.platform==="iPhone"}var Jx=/ipad|iphone|ipod/;function rp(e){return Jx.test(e.userAgent.toLowerCase())||Xx(e)&&e.maxTouchPoints>1}var eN=/^((?!chrome|android).)*safari/i;function $0(e){return rp(e)||eN.test(e.userAgent.toLowerCase())}function tN(){return Math.floor(Math.random()*Date.now())}function nN(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function rN(e){var t;let n=((t=e.match(/url\(("?)('*)#(.*?)('*)\)/g))!==null&&t!==void 0?t:[]).map(r=>r.slice(4,r.length-1).replace(/['"#]+/g,""));return Array.from(new Set(n))}function iN(e,t){try{let n=new DOMParser().parseFromString(e,"text/html");return n.body.querySelectorAll("[fill^=url]").forEach(r=>r.setAttribute("fill","".concat(r.getAttribute("fill")," ").concat(t).trim())),n.body.innerHTML.trim()}catch{return e}}function Uu(e,t=tN(),n="rgba(0, 0, 0, 0.7)"){if(bn(e)){let i=rN(e).reduce((o,s)=>{let a=nN(s),c="id_".concat(t,"_").concat(s);return o.replace(new RegExp('"'.concat(a,'"'),"g"),'"'.concat(c,'"')).replace(new RegExp("'".concat(a,"'"),"g"),"'".concat(c,"'")).replace(new RegExp("url\\('#".concat(a,"'\\)"),"g"),"url('#".concat(c,"')")).replace(new RegExp('url\\("#'.concat(a,'"\\)'),"g"),'url("#'.concat(c,'")')).replace(new RegExp("url\\(#".concat(a,"\\)"),"g"),"url(#".concat(c,")"))},e);return iN(i,n)}return e}var z0=class extends Error{constructor(t){super("")}},G0=class extends Error{constructor(t){super("")}},W0=class extends Error{constructor(t){super("")}},Bu=class extends Error{constructor(){super("")}},Gs=class extends Error{constructor(){super("")}},Ws=class extends Error{constructor(){super("")}};var Hu=class extends Error{constructor(){super("")}};function iW(e){return new N(t=>{if(!e.valueChanges)throw new Hu;e.valueChanges.pipe(_e(e.value)).subscribe(t)})}function J(e,t,n={}){return On(e,t,n)}function oN(e){return xe(J(e,"mouseup"),J(e,"dragend"))}function q0(e=0){return Xr(ee(()=>ht(e).pipe(w(Rr),_e(!0))),Ue())}var ip,op;function Y0(e){let t=J(e,"blur"),{ownerDocument:n}=e;if(!n)throw new Gs;return(!op||!ip)&&(ip=J(n,"mouseup",{capture:!0}).pipe(q0(),_e(!1),Wt({bufferSize:1,refCount:!0})),op=J(n,"mousedown",{capture:!0}).pipe(q0(),_e(!1),Wt({bufferSize:1,refCount:!0}))),xe(Vt(J(e,"focus").pipe(Ke(1)),t.pipe(ye(()=>!Oo(e)),Ke(1),Xi())).pipe(dc(),is(op,ip,(r,i,o)=>i||o),ye(k0))).pipe(ee(()=>t.pipe(w(Rr),Ke(1),_e(!0))),Ue())}function Z0(e,t=Boolean){return Xr(ee(n=>t(n)?e(n):Ae))}function K0(e){var t,n;return"observed"in e?e.observed:!!(!((n=(t=e)===null||t===void 0?void 0:t.observers)===null||n===void 0)&&n.length)}function oW(e,{onlyTrusted:t}={onlyTrusted:!0}){let{ownerDocument:n}=e;if(!n)throw new Gs;return J(e,"mousedown").pipe(ye(({isTrusted:r})=>r||!t),ee(()=>oN(n).pipe(w(Rr),Ke(1),_e(!0))))}function sN(){return Ne(e=>e.preventDefault())}function Q0(e){return J(e===e.ownerDocument.documentElement?e.ownerDocument:e,"scroll")}function X0(){return Ne(e=>{e.stopPropagation()})}function J0(e){return Ne(()=>{e.markForCheck()})}function aN(e){return t=>new N(n=>t.subscribe({next:r=>e.run(()=>n.next(r)),error:r=>e.run(()=>n.error(r)),complete:()=>e.run(()=>n.complete())}))}function Wn(e){return t=>new N(n=>e.runOutsideAngular(()=>t.subscribe(n)))}function qn(e){return Xr(Wn(e),aN(e))}var qs=new D("POLYMORPHEUS_CONTEXT"),Ci=class{constructor(t,n){this.component=t,this.i=n}createInjector(t,n){return bt.create({parent:this.i||t,providers:[{provide:qs,useValue:n}]})}},ap=(()=>{class e{constructor(n,r){this.template=n,this.cdr=r,this.polymorpheus=""}check(){this.cdr.markForCheck()}static ngTemplateContextGuard(n,r){return!0}}return e.\u0275fac=function(n){return new(n||e)(y(pt,2),y(gt))},e.\u0275dir=$({type:e,selectors:[["ng-template","polymorpheus",""]],inputs:{polymorpheus:"polymorpheus"},exportAs:["polymorpheus"]}),e})(),$u=class{constructor(t){this.$implicit=t}get polymorpheusOutlet(){return this.$implicit}};var Lr=(()=>{class e{constructor(n,r,i){this.vcr=n,this.i=r,this.t=i,this.content=""}get template(){return sp(this.content)?this.content.template:this.content instanceof pt?this.content:this.t}ngOnChanges({content:n}){var r;let i=this.getContext();if((r=this.c)===null||r===void 0||r.injector.get(gt).markForCheck(),!n)return;this.vcr.clear();let o=i&&new Proxy(i,{get:(s,a)=>{var c;return(c=this.getContext())===null||c===void 0?void 0:c[a]}});eE(this.content)?this.process(this.content,o):(i instanceof $u&&i.$implicit)!=null&&this.vcr.createEmbeddedView(this.template,o)}ngDoCheck(){sp(this.content)&&this.content.check()}static ngTemplateContextGuard(n,r){return!0}getContext(){return cN(this.content)||eE(this.content)?this.context:new $u(typeof this.content=="function"?this.content(this.context):this.content)}process(n,r){let i=n.createInjector(this.i,r);this.c=this.vcr.createComponent(i.get(Un).resolveComponentFactory(n.component),0,i)}}return e.\u0275fac=function(n){return new(n||e)(y(Nt),y(bt),y(pt))},e.\u0275dir=$({type:e,selectors:[["","polymorpheusOutlet",""]],inputs:{content:["polymorpheusOutlet","content"],context:["polymorpheusOutletContext","context"]},features:[on]}),e})();function sp(e){return e instanceof ap}function eE(e){return e instanceof Ci}function cN(e){return sp(e)||e instanceof pt}var kr=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();function cp(e,t={}){let{selector:n}=t,r=Pg(t,["selector"]);return new N(i=>{let o=new AbortController,{signal:s}=o,a=!0,{signal:c}=r;if(c)if(c.aborted)o.abort();else{let d=()=>{s.aborted||o.abort()};c.addEventListener("abort",d),i.add(()=>c.removeEventListener("abort",d))}let u=Object.assign(Object.assign({},r),{signal:s}),l=d=>{a=!1,i.error(d)};return fetch(e,u).then(d=>{n?Q(n(d)).subscribe(P(i,void 0,()=>{a=!1,i.complete()},l)):(a=!1,i.next(d),i.complete())}).catch(l),()=>{a&&o.abort()}})}function tE(e){return new C(3e3,!1)}function uN(){return new C(3100,!1)}function lN(){return new C(3101,!1)}function dN(e){return new C(3001,!1)}function fN(e){return new C(3003,!1)}function hN(e){return new C(3004,!1)}function pN(e,t){return new C(3005,!1)}function mN(){return new C(3006,!1)}function gN(){return new C(3007,!1)}function vN(e,t){return new C(3008,!1)}function yN(e){return new C(3002,!1)}function _N(e,t,n,r,i){return new C(3010,!1)}function DN(){return new C(3011,!1)}function EN(){return new C(3012,!1)}function wN(){return new C(3200,!1)}function bN(){return new C(3202,!1)}function CN(){return new C(3013,!1)}function IN(e){return new C(3014,!1)}function SN(e){return new C(3015,!1)}function MN(e){return new C(3016,!1)}function TN(e,t){return new C(3404,!1)}function AN(e){return new C(3502,!1)}function ON(e){return new C(3503,!1)}function xN(){return new C(3300,!1)}function NN(e){return new C(3504,!1)}function PN(e){return new C(3301,!1)}function RN(e,t){return new C(3302,!1)}function FN(e){return new C(3303,!1)}function LN(e,t){return new C(3400,!1)}function kN(e){return new C(3401,!1)}function jN(e){return new C(3402,!1)}function VN(e,t){return new C(3505,!1)}function jr(e){switch(e.length){case 0:return new Pr;case 1:return e[0];default:return new $s(e)}}function yE(e,t,n=new Map,r=new Map){let i=[],o=[],s=-1,a=null;if(t.forEach(c=>{let u=c.get("offset"),l=u==s,d=l&&a||new Map;c.forEach((f,p)=>{let g=p,_=f;if(p!=="offset")switch(g=e.normalizePropertyName(g,i),_){case Lu:_=n.get(p);break;case Gn:_=r.get(p);break;default:_=e.normalizeStyleValue(p,g,_,i);break}d.set(g,_)}),l||o.push(d),a=d,s=u}),i.length)throw AN(i);return o}function xp(e,t,n,r){switch(t){case"start":e.onStart(()=>r(n&&up(n,"start",e)));break;case"done":e.onDone(()=>r(n&&up(n,"done",e)));break;case"destroy":e.onDestroy(()=>r(n&&up(n,"destroy",e)));break}}function up(e,t,n){let r=n.totalTime,i=!!n.disabled,o=Np(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,r==null?e.totalTime:r,i),s=e._data;return s!=null&&(o._data=s),o}function Np(e,t,n,r,i="",o=0,s){return{element:e,triggerName:t,fromState:n,toState:r,phaseName:i,totalTime:o,disabled:!!s}}function Jt(e,t,n){let r=e.get(t);return r||e.set(t,r=n),r}function nE(e){let t=e.indexOf(":"),n=e.substring(1,t),r=e.slice(t+1);return[n,r]}var UN=(()=>typeof document>"u"?null:document.documentElement)();function Pp(e){let t=e.parentNode||e.host||null;return t===UN?null:t}function BN(e){return e.substring(1,6)=="ebkit"}var Ii=null,rE=!1;function HN(e){Ii||(Ii=$N()||{},rE=Ii.style?"WebkitAppearance"in Ii.style:!1);let t=!0;return Ii.style&&!BN(e)&&(t=e in Ii.style,!t&&rE&&(t="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in Ii.style)),t}function $N(){return typeof document<"u"?document.body:null}function _E(e,t){for(;t;){if(t===e)return!0;t=Pp(t)}return!1}function DE(e,t,n){if(n)return Array.from(e.querySelectorAll(t));let r=e.querySelector(t);return r?[r]:[]}var zN=(()=>{let t=class t{validateStyleProperty(r){return HN(r)}matchesElement(r,i){return!1}containsElement(r,i){return _E(r,i)}getParentElement(r){return Pp(r)}query(r,i,o){return DE(r,i,o)}computeStyle(r,i,o){return o||""}animate(r,i,o,s,a,c=[],u){return new Pr(o,s)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),EW=(()=>{let t=class t{};t.NOOP=new zN;let e=t;return e})(),mp=class{};var GN=1e3,EE="{{",WN="}}",wE="ng-enter",gp="ng-leave",Gu="ng-trigger",Ku=".ng-trigger",iE="ng-animating",vp=".ng-animating";function _r(e){if(typeof e=="number")return e;let t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:yp(parseFloat(t[1]),t[2])}function yp(e,t){switch(t){case"s":return e*GN;default:return e}}function Qu(e,t,n){return e.hasOwnProperty("duration")?e:qN(e,t,n)}function qN(e,t,n){let r=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,o=0,s="";if(typeof e=="string"){let a=e.match(r);if(a===null)return t.push(tE(e)),{duration:0,delay:0,easing:""};i=yp(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(o=yp(parseFloat(c),a[4]));let u=a[5];u&&(s=u)}else i=e;if(!n){let a=!1,c=t.length;i<0&&(t.push(uN()),a=!0),o<0&&(t.push(lN()),a=!0),a&&t.splice(c,0,tE(e))}return{duration:i,delay:o,easing:s}}function ea(e,t={}){return Object.keys(e).forEach(n=>{t[n]=e[n]}),t}function bE(e){let t=new Map;return Object.keys(e).forEach(n=>{let r=e[n];t.set(n,r)}),t}function YN(e){return e.length?e[0]instanceof Map?e:e.map(t=>bE(t)):[]}function Po(e,t=new Map,n){if(n)for(let[r,i]of n)t.set(r,i);for(let[r,i]of e)t.set(r,i);return t}function Yn(e,t,n){t.forEach((r,i)=>{let o=Rp(i);n&&!n.has(i)&&n.set(i,e.style[o]),e.style[o]=r})}function Mi(e,t){t.forEach((n,r)=>{let i=Rp(r);e.style[i]=""})}function Ys(e){return Array.isArray(e)?e.length==1?e[0]:S0(e):e}function ZN(e,t,n){let r=t.params||{},i=CE(e);i.length&&i.forEach(o=>{r.hasOwnProperty(o)||n.push(dN(o))})}var _p=new RegExp("".concat(EE,"\\s*(.+?)\\s*").concat(WN),"g");function CE(e){let t=[];if(typeof e=="string"){let n;for(;n=_p.exec(e);)t.push(n[1]);_p.lastIndex=0}return t}function Ks(e,t,n){let r=e.toString(),i=r.replace(_p,(o,s)=>{let a=t[s];return a==null&&(n.push(fN(s)),a=""),a.toString()});return i==r?e:i}function Xu(e){let t=[],n=e.next();for(;!n.done;)t.push(n.value),n=e.next();return t}var KN=/-+([a-z0-9])/g;function Rp(e){return e.replace(KN,(...t)=>t[1].toUpperCase())}function QN(e,t){return e===0||t===0}function XN(e,t,n){if(n.size&&t.length){let r=t[0],i=[];if(n.forEach((o,s)=>{r.has(s)||i.push(s),r.set(s,o)}),i.length)for(let o=1;os.set(a,IE(e,a)))}}return t}function Xt(e,t,n){switch(t.type){case 7:return e.visitTrigger(t,n);case 0:return e.visitState(t,n);case 1:return e.visitTransition(t,n);case 2:return e.visitSequence(t,n);case 3:return e.visitGroup(t,n);case 4:return e.visitAnimate(t,n);case 5:return e.visitKeyframes(t,n);case 6:return e.visitStyle(t,n);case 8:return e.visitReference(t,n);case 9:return e.visitAnimateChild(t,n);case 10:return e.visitAnimateRef(t,n);case 11:return e.visitQuery(t,n);case 12:return e.visitStagger(t,n);default:throw hN(t.type)}}function IE(e,t){return window.getComputedStyle(e)[t]}var JN=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"]),oE=class extends mp{normalizePropertyName(t,n){return Rp(t)}normalizeStyleValue(t,n,r,i){let o="",s=r.toString().trim();if(JN.has(n)&&r!==0&&r!=="0")if(typeof r=="number")o="px";else{let a=r.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push(pN(t,r))}return s+o}};var Ju="*";function eP(e,t){let n=[];return typeof e=="string"?e.split(/\s*,\s*/).forEach(r=>tP(r,n,t)):n.push(e),n}function tP(e,t,n){if(e[0]==":"){let c=nP(e,n);if(typeof c=="function"){t.push(c);return}e=c}let r=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(r==null||r.length<4)return n.push(SN(e)),t;let i=r[1],o=r[2],s=r[3];t.push(sE(i,s));let a=i==Ju&&s==Ju;o[0]=="<"&&!a&&t.push(sE(s,i))}function nP(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(n,r)=>parseFloat(r)>parseFloat(n);case":decrement":return(n,r)=>parseFloat(r) *"}}var Wu=new Set(["true","1"]),qu=new Set(["false","0"]);function sE(e,t){let n=Wu.has(e)||qu.has(e),r=Wu.has(t)||qu.has(t);return(i,o)=>{let s=e==Ju||e==i,a=t==Ju||t==o;return!s&&n&&typeof i=="boolean"&&(s=i?Wu.has(e):qu.has(e)),!a&&r&&typeof o=="boolean"&&(a=o?Wu.has(t):qu.has(t)),s&&a}}var SE=":self",rP=new RegExp("s*".concat(SE,"s*,?"),"g");function ME(e,t,n,r){return new Dp(e).build(t,n,r)}var aE="",Dp=class{constructor(t){this._driver=t}build(t,n,r){let i=new Ep(n);return this._resetContextStyleTimingState(i),Xt(this,Ys(t),i)}_resetContextStyleTimingState(t){t.currentQuerySelector=aE,t.collectedStyles=new Map,t.collectedStyles.set(aE,new Map),t.currentTime=0}visitTrigger(t,n){let r=n.queryCount=0,i=n.depCount=0,o=[],s=[];return t.name.charAt(0)=="@"&&n.errors.push(mN()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(n),a.type==0){let c=a,u=c.name;u.toString().split(/\s*,\s*/).forEach(l=>{c.name=l,o.push(this.visitState(c,n))}),c.name=u}else if(a.type==1){let c=this.visitTransition(a,n);r+=c.queryCount,i+=c.depCount,s.push(c)}else n.errors.push(gN())}),{type:7,name:t.name,states:o,transitions:s,queryCount:r,depCount:i,options:null}}visitState(t,n){let r=this.visitStyle(t.styles,n),i=t.options&&t.options.params||null;if(r.containsDynamicStyles){let o=new Set,s=i||{};if(r.styles.forEach(a=>{a instanceof Map&&a.forEach(c=>{CE(c).forEach(u=>{s.hasOwnProperty(u)||o.add(u)})})}),o.size){let a=Xu(o.values());n.errors.push(vN(t.name,a))}}return{type:0,name:t.name,style:r,options:i?{params:i}:null}}visitTransition(t,n){n.queryCount=0,n.depCount=0;let r=Xt(this,Ys(t.animation),n);return{type:1,matchers:eP(t.expr,n.errors),animation:r,queryCount:n.queryCount,depCount:n.depCount,options:Si(t.options)}}visitSequence(t,n){return{type:2,steps:t.steps.map(r=>Xt(this,r,n)),options:Si(t.options)}}visitGroup(t,n){let r=n.currentTime,i=0,o=t.steps.map(s=>{n.currentTime=r;let a=Xt(this,s,n);return i=Math.max(i,n.currentTime),a});return n.currentTime=i,{type:3,steps:o,options:Si(t.options)}}visitAnimate(t,n){let r=aP(t.timings,n.errors);n.currentAnimateTimings=r;let i,o=t.styles?t.styles:E({});if(o.type==5)i=this.visitKeyframes(o,n);else{let s=t.styles,a=!1;if(!s){a=!0;let u={};r.easing&&(u.easing=r.easing),s=E(u)}n.currentTime+=r.duration+r.delay;let c=this.visitStyle(s,n);c.isEmptyStep=a,i=c}return n.currentAnimateTimings=null,{type:4,timings:r,style:i,options:null}}visitStyle(t,n){let r=this._makeStyleAst(t,n);return this._validateStyleAst(r,n),r}_makeStyleAst(t,n){let r=[],i=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of i)typeof a=="string"?a===Gn?r.push(a):n.errors.push(yN(a)):r.push(bE(a));let o=!1,s=null;return r.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let c of a.values())if(c.toString().indexOf(EE)>=0){o=!0;break}}}),{type:6,styles:r,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,n){let r=n.currentAnimateTimings,i=n.currentTime,o=n.currentTime;r&&o>0&&(o-=r.duration+r.delay),t.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,c)=>{let u=n.collectedStyles.get(n.currentQuerySelector),l=u.get(c),d=!0;l&&(o!=i&&o>=l.startTime&&i<=l.endTime&&(n.errors.push(_N(c,l.startTime,l.endTime,o,i)),d=!1),o=l.startTime),d&&u.set(c,{startTime:o,endTime:i}),n.options&&ZN(a,n.options,n.errors)})})}visitKeyframes(t,n){let r={type:5,styles:[],options:null};if(!n.currentAnimateTimings)return n.errors.push(DN()),r;let i=1,o=0,s=[],a=!1,c=!1,u=0,l=t.steps.map(A=>{let Y=this._makeStyleAst(A,n),B=Y.offset!=null?Y.offset:sP(Y.styles),he=0;return B!=null&&(o++,he=Y.offset=B),c=c||he<0||he>1,a=a||he0&&o{let B=f>0?Y==p?1:f*Y:s[Y],he=B*M;n.currentTime=g+_.delay+he,_.duration=he,this._validateStyleAst(A,n),A.offset=B,r.styles.push(A)}),r}visitReference(t,n){return{type:8,animation:Xt(this,Ys(t.animation),n),options:Si(t.options)}}visitAnimateChild(t,n){return n.depCount++,{type:9,options:Si(t.options)}}visitAnimateRef(t,n){return{type:10,animation:this.visitReference(t.animation,n),options:Si(t.options)}}visitQuery(t,n){let r=n.currentQuerySelector,i=t.options||{};n.queryCount++,n.currentQuery=t;let[o,s]=iP(t.selector);n.currentQuerySelector=r.length?r+" "+o:o,Jt(n.collectedStyles,n.currentQuerySelector,new Map);let a=Xt(this,Ys(t.animation),n);return n.currentQuery=null,n.currentQuerySelector=r,{type:11,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:Si(t.options)}}visitStagger(t,n){n.currentQuery||n.errors.push(CN());let r=t.timings==="full"?{duration:0,delay:0,easing:"full"}:Qu(t.timings,n.errors,!0);return{type:12,animation:Xt(this,Ys(t.animation),n),timings:r,options:null}}};function iP(e){let t=!!e.split(/\s*,\s*/).find(n=>n==SE);return t&&(e=e.replace(rP,"")),e=e.replace(/@\*/g,Ku).replace(/@\w+/g,n=>Ku+"-"+n.slice(1)).replace(/:animating/g,vp),[e,t]}function oP(e){return e?ea(e):null}var Ep=class{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function sP(e){if(typeof e=="string")return null;let t=null;if(Array.isArray(e))e.forEach(n=>{if(n instanceof Map&&n.has("offset")){let r=n;t=parseFloat(r.get("offset")),r.delete("offset")}});else if(e instanceof Map&&e.has("offset")){let n=e;t=parseFloat(n.get("offset")),n.delete("offset")}return t}function aP(e,t){if(e.hasOwnProperty("duration"))return e;if(typeof e=="number"){let o=Qu(e,t).duration;return lp(o,0,"")}let n=e;if(n.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=lp(0,0,"");return o.dynamic=!0,o.strValue=n,o}let i=Qu(n,t);return lp(i.duration,i.delay,i.easing)}function Si(e){return e?(e=ea(e),e.params&&(e.params=oP(e.params))):e={},e}function lp(e,t,n){return{duration:e,delay:t,easing:n}}function Fp(e,t,n,r,i,o,s=null,a=!1){return{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:s,subTimeline:a}}var Qs=class{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,n){let r=this._map.get(t);r||this._map.set(t,r=[]),r.push(...n)}has(t){return this._map.has(t)}clear(){this._map.clear()}},cP=1,uP=":enter",lP=new RegExp(uP,"g"),dP=":leave",fP=new RegExp(dP,"g");function TE(e,t,n,r,i,o=new Map,s=new Map,a,c,u=[]){return new wp().buildKeyframes(e,t,n,r,i,o,s,a,c,u)}var wp=class{buildKeyframes(t,n,r,i,o,s,a,c,u,l=[]){u=u||new Qs;let d=new bp(t,n,u,i,o,l,[]);d.options=c;let f=c.delay?_r(c.delay):0;d.currentTimeline.delayNextStep(f),d.currentTimeline.setStyles([s],null,d.errors,c),Xt(this,r,d);let p=d.timelines.filter(g=>g.containsAnimation());if(p.length&&a.size){let g;for(let _=p.length-1;_>=0;_--){let M=p[_];if(M.element===n){g=M;break}}g&&!g.allowOnlyTimelineStyles()&&g.setStyles([a],null,d.errors,c)}return p.length?p.map(g=>g.buildKeyframes()):[Fp(n,[],[],[],0,f,"",!1)]}visitTrigger(t,n){}visitState(t,n){}visitTransition(t,n){}visitAnimateChild(t,n){let r=n.subInstructions.get(n.element);if(r){let i=n.createSubContext(t.options),o=n.currentTimeline.currentTime,s=this._visitSubInstructions(r,i,i.options);o!=s&&n.transformIntoNewTimeline(s)}n.previousNode=t}visitAnimateRef(t,n){let r=n.createSubContext(t.options);r.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],n,r),this.visitReference(t.animation,r),n.transformIntoNewTimeline(r.currentTimeline.currentTime),n.previousNode=t}_applyAnimationRefDelays(t,n,r){var i;for(let o of t){let s=o==null?void 0:o.delay;if(s){let a=typeof s=="number"?s:_r(Ks(s,(i=o==null?void 0:o.params)!=null?i:{},n.errors));r.delayNextStep(a)}}}_visitSubInstructions(t,n,r){let o=n.currentTimeline.currentTime,s=r.duration!=null?_r(r.duration):null,a=r.delay!=null?_r(r.delay):null;return s!==0&&t.forEach(c=>{let u=n.appendInstructionToTimeline(c,s,a);o=Math.max(o,u.duration+u.delay)}),o}visitReference(t,n){n.updateOptions(t.options,!0),Xt(this,t.animation,n),n.previousNode=t}visitSequence(t,n){let r=n.subContextCount,i=n,o=t.options;if(o&&(o.params||o.delay)&&(i=n.createSubContext(o),i.transformIntoNewTimeline(),o.delay!=null)){i.previousNode.type==6&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=el);let s=_r(o.delay);i.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>Xt(this,s,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),n.previousNode=t}visitGroup(t,n){let r=[],i=n.currentTimeline.currentTime,o=t.options&&t.options.delay?_r(t.options.delay):0;t.steps.forEach(s=>{let a=n.createSubContext(t.options);o&&a.delayNextStep(o),Xt(this,s,a),i=Math.max(i,a.currentTimeline.currentTime),r.push(a.currentTimeline)}),r.forEach(s=>n.currentTimeline.mergeTimelineCollectedStyles(s)),n.transformIntoNewTimeline(i),n.previousNode=t}_visitTiming(t,n){if(t.dynamic){let r=t.strValue,i=n.params?Ks(r,n.params,n.errors):r;return Qu(i,n.errors)}else return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,n){let r=n.currentAnimateTimings=this._visitTiming(t.timings,n),i=n.currentTimeline;r.delay&&(n.incrementTime(r.delay),i.snapshotCurrentStyles());let o=t.style;o.type==5?this.visitKeyframes(o,n):(n.incrementTime(r.duration),this.visitStyle(o,n),i.applyStylesToKeyframe()),n.currentAnimateTimings=null,n.previousNode=t}visitStyle(t,n){let r=n.currentTimeline,i=n.currentAnimateTimings;!i&&r.hasCurrentStyleProperties()&&r.forwardFrame();let o=i&&i.easing||t.easing;t.isEmptyStep?r.applyEmptyStep(o):r.setStyles(t.styles,o,n.errors,n.options),n.previousNode=t}visitKeyframes(t,n){let r=n.currentAnimateTimings,i=n.currentTimeline.duration,o=r.duration,a=n.createSubContext().currentTimeline;a.easing=r.easing,t.styles.forEach(c=>{let u=c.offset||0;a.forwardTime(u*o),a.setStyles(c.styles,c.easing,n.errors,n.options),a.applyStylesToKeyframe()}),n.currentTimeline.mergeTimelineCollectedStyles(a),n.transformIntoNewTimeline(i+o),n.previousNode=t}visitQuery(t,n){let r=n.currentTimeline.currentTime,i=t.options||{},o=i.delay?_r(i.delay):0;o&&(n.previousNode.type===6||r==0&&n.currentTimeline.hasCurrentStyleProperties())&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=el);let s=r,a=n.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,n.errors);n.currentQueryTotal=a.length;let c=null;a.forEach((u,l)=>{n.currentQueryIndex=l;let d=n.createSubContext(t.options,u);o&&d.delayNextStep(o),u===n.element&&(c=d.currentTimeline),Xt(this,t.animation,d),d.currentTimeline.applyStylesToKeyframe();let f=d.currentTimeline.currentTime;s=Math.max(s,f)}),n.currentQueryIndex=0,n.currentQueryTotal=0,n.transformIntoNewTimeline(s),c&&(n.currentTimeline.mergeTimelineCollectedStyles(c),n.currentTimeline.snapshotCurrentStyles()),n.previousNode=t}visitStagger(t,n){let r=n.parentContext,i=n.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(n.currentQueryTotal-1),c=s*n.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":c=a-c;break;case"full":c=r.currentStaggerTime;break}let l=n.currentTimeline;c&&l.delayNextStep(c);let d=l.currentTime;Xt(this,t.animation,n),n.previousNode=t,r.currentStaggerTime=i.currentTime-d+(i.startTime-r.currentTimeline.startTime)}},el={},bp=class e{constructor(t,n,r,i,o,s,a,c){this._driver=t,this.element=n,this.subInstructions=r,this._enterClassName=i,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=el,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new tl(this._driver,n,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,n){if(!t)return;let r=t,i=this.options;r.duration!=null&&(i.duration=_r(r.duration)),r.delay!=null&&(i.delay=_r(r.delay));let o=r.params;if(o){let s=i.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!n||!s.hasOwnProperty(a))&&(s[a]=Ks(o[a],s,this.errors))})}}_copyOptions(){let t={};if(this.options){let n=this.options.params;if(n){let r=t.params={};Object.keys(n).forEach(i=>{r[i]=n[i]})}}return t}createSubContext(t=null,n,r){let i=n||this.element,o=new e(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=el,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,n,r){let i={duration:n!=null?n:t.duration,delay:this.currentTimeline.currentTime+(r!=null?r:0)+t.delay,easing:""},o=new Cp(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(o),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,n,r,i,o,s){let a=[];if(i&&a.push(this.element),t.length>0){t=t.replace(lP,"."+this._enterClassName),t=t.replace(fP,"."+this._leaveClassName);let c=r!=1,u=this._driver.query(this.element,t,c);r!==0&&(u=r<0?u.slice(u.length+r,u.length):u.slice(0,r)),a.push(...u)}return!o&&a.length==0&&s.push(IN(n)),a}},tl=class e{constructor(t,n,r,i){this._driver=t,this.element=n,this.startTime=r,this._elementTimelineStylesLookup=i,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,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(t){let n=this._keyframes.size===1&&this._pendingStyles.size;this.duration||n?(this.forwardTime(this.currentTime+t),n&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,n){return this.applyStylesToKeyframe(),new e(this._driver,t,n||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+=cP,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,n){this._localTimelineStyles.set(t,n),this._globalTimelineStyles.set(t,n),this._styleSummary.set(t,{time:this.currentTime,value:n})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[n,r]of this._globalTimelineStyles)this._backFill.set(n,r||Gn),this._currentKeyframe.set(n,Gn);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,n,r,i){var a;n&&this._previousKeyframe.set("easing",n);let o=i&&i.params||{},s=hP(t,this._globalTimelineStyles);for(let[c,u]of s){let l=Ks(u,o,r);this._pendingStyles.set(c,l),this._localTimelineStyles.has(c)||this._backFill.set(c,(a=this._globalTimelineStyles.get(c))!=null?a:Gn),this._updateStyle(c,l)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((t,n)=>{this._currentKeyframe.set(n,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,n)=>{this._currentKeyframe.has(n)||this._currentKeyframe.set(n,t)}))}snapshotCurrentStyles(){for(let[t,n]of this._localTimelineStyles)this._pendingStyles.set(t,n),this._updateStyle(t,n)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let t=[];for(let n in this._currentKeyframe)t.push(n);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((n,r)=>{let i=this._styleSummary.get(r);(!i||n.time>i.time)&&this._updateStyle(r,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();let t=new Set,n=new Set,r=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((a,c)=>{let u=Po(a,new Map,this._backFill);u.forEach((l,d)=>{l===Lu?t.add(d):l===Gn&&n.add(d)}),r||u.set("offset",c/this.duration),i.push(u)});let o=t.size?Xu(t.values()):[],s=n.size?Xu(n.values()):[];if(r){let a=i[0],c=new Map(a);a.set("offset",0),c.set("offset",1),i=[a,c]}return Fp(this.element,i,o,s,this.duration,this.startTime,this.easing,!1)}},Cp=class extends tl{constructor(t,n,r,i,o,s,a=!1){super(t,n,s.delay),this.keyframes=r,this.preStyleProps=i,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:n,duration:r,easing:i}=this.timings;if(this._stretchStartingKeyframe&&n){let o=[],s=r+n,a=n/s,c=Po(t[0]);c.set("offset",0),o.push(c);let u=Po(t[0]);u.set("offset",cE(a)),o.push(u);let l=t.length-1;for(let d=1;d<=l;d++){let f=Po(t[d]),p=f.get("offset"),g=n+p*r;f.set("offset",cE(g/s)),o.push(f)}r=s,n=0,i="",t=o}return Fp(this.element,t,this.preStyleProps,this.postStyleProps,r,n,i,!0)}};function cE(e,t=3){let n=Math.pow(10,t-1);return Math.round(e*n)/n}function hP(e,t){let n=new Map,r;return e.forEach(i=>{if(i==="*"){r=r||t.keys();for(let o of r)n.set(o,Gn)}else Po(i,n)}),n}function uE(e,t,n,r,i,o,s,a,c,u,l,d,f){return{type:0,element:e,triggerName:t,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:s,timelines:a,queriedElements:c,preStyleProps:u,postStyleProps:l,totalTime:d,errors:f}}var dp={},nl=class{constructor(t,n,r){this._triggerName=t,this.ast=n,this._stateStyles=r}match(t,n,r,i){return pP(this.ast.matchers,t,n,r,i)}buildStyles(t,n,r){let i=this._stateStyles.get("*");return t!==void 0&&(i=this._stateStyles.get(t==null?void 0:t.toString())||i),i?i.buildStyles(n,r):new Map}build(t,n,r,i,o,s,a,c,u,l){var Ft;let d=[],f=this.ast.options&&this.ast.options.params||dp,p=a&&a.params||dp,g=this.buildStyles(r,p,d),_=c&&c.params||dp,M=this.buildStyles(i,_,d),A=new Set,Y=new Map,B=new Map,he=i==="void",De={params:mP(_,f),delay:(Ft=this.ast.options)==null?void 0:Ft.delay},It=l?[]:TE(t,n,this.ast.animation,o,s,g,M,De,u,d),O=0;if(It.forEach(yt=>{O=Math.max(yt.duration+yt.delay,O)}),d.length)return uE(n,this._triggerName,r,i,he,g,M,[],[],Y,B,O,d);It.forEach(yt=>{let dn=yt.element,Qn=Jt(Y,dn,new Set);yt.preStyleProps.forEach(In=>Qn.add(In));let $r=Jt(B,dn,new Set);yt.postStyleProps.forEach(In=>$r.add(In)),dn!==n&&A.add(dn)});let Ye=Xu(A.values());return uE(n,this._triggerName,r,i,he,g,M,It,Ye,Y,B,O)}};function pP(e,t,n,r,i){return e.some(o=>o(t,n,r,i))}function mP(e,t){let n=ea(t);for(let r in e)e.hasOwnProperty(r)&&e[r]!=null&&(n[r]=e[r]);return n}var Ip=class{constructor(t,n,r){this.styles=t,this.defaultParams=n,this.normalizer=r}buildStyles(t,n){let r=new Map,i=ea(this.defaultParams);return Object.keys(t).forEach(o=>{let s=t[o];s!==null&&(i[o]=s)}),this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=Ks(s,i,n));let c=this.normalizer.normalizePropertyName(a,n);s=this.normalizer.normalizeStyleValue(a,c,s,n),r.set(a,s)})}),r}};function gP(e,t,n){return new Sp(e,t,n)}var Sp=class{constructor(t,n,r){this.name=t,this.ast=n,this._normalizer=r,this.transitionFactories=[],this.states=new Map,n.states.forEach(i=>{let o=i.options&&i.options.params||{};this.states.set(i.name,new Ip(i.style,o,r))}),lE(this.states,"true","1"),lE(this.states,"false","0"),n.transitions.forEach(i=>{this.transitionFactories.push(new nl(t,i,this.states))}),this.fallbackTransition=vP(t,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,n,r,i){return this.transitionFactories.find(s=>s.match(t,n,r,i))||null}matchStyles(t,n,r){return this.fallbackTransition.buildStyles(t,n,r)}};function vP(e,t,n){let o={type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0};return new nl(e,o,t)}function lE(e,t,n){e.has(t)?e.has(n)||e.set(n,e.get(t)):e.has(n)&&e.set(t,e.get(n))}var yP=new Qs,Mp=class{constructor(t,n,r){this.bodyNode=t,this._driver=n,this._normalizer=r,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,n){let r=[],i=[],o=ME(this._driver,n,r,i);if(r.length)throw ON(r);i.length&&void 0,this._animations.set(t,o)}_buildPlayer(t,n,r){let i=t.element,o=yE(this._normalizer,t.keyframes,n,r);return this._driver.animate(i,o,t.duration,t.delay,t.easing,[],!0)}create(t,n,r={}){let i=[],o=this._animations.get(t),s,a=new Map;if(o?(s=TE(this._driver,n,o,wE,gp,new Map,new Map,r,yP,i),s.forEach(l=>{let d=Jt(a,l.element,new Map);l.postStyleProps.forEach(f=>d.set(f,null))})):(i.push(xN()),s=[]),i.length)throw NN(i);a.forEach((l,d)=>{l.forEach((f,p)=>{l.set(p,this._driver.computeStyle(d,p,Gn))})});let c=s.map(l=>{let d=a.get(l.element);return this._buildPlayer(l,new Map,d)}),u=jr(c);return this._playersById.set(t,u),u.onDestroy(()=>this.destroy(t)),this.players.push(u),u}destroy(t){let n=this._getPlayer(t);n.destroy(),this._playersById.delete(t);let r=this.players.indexOf(n);r>=0&&this.players.splice(r,1)}_getPlayer(t){let n=this._playersById.get(t);if(!n)throw PN(t);return n}listen(t,n,r,i){let o=Np(n,"","","");return xp(this._getPlayer(t),r,o,i),()=>{}}command(t,n,r,i){if(r=="register"){this.register(t,i[0]);return}if(r=="create"){let s=i[0]||{};this.create(t,n,s);return}let o=this._getPlayer(t);switch(r){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t);break}}},dE="ng-animate-queued",_P=".ng-animate-queued",fp="ng-animate-disabled",DP=".ng-animate-disabled",EP="ng-star-inserted",wP=".ng-star-inserted",bP=[],AE={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},CP={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Cn="__ng_removed",Xs=class{get params(){return this.options.params}constructor(t,n=""){this.namespaceId=n;let r=t&&t.hasOwnProperty("value"),i=r?t.value:t;if(this.value=SP(i),r){let o=ea(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){let n=t.params;if(n){let r=this.options.params;Object.keys(n).forEach(i=>{r[i]==null&&(r[i]=n[i])})}}},Zs="void",hp=new Xs(Zs),Tp=class{constructor(t,n,r){this.id=t,this.hostElement=n,this._engine=r,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,un(n,this._hostClassName)}listen(t,n,r,i){if(!this._triggers.has(n))throw RN(r,n);if(r==null||r.length==0)throw FN(n);if(!MP(r))throw LN(r,n);let o=Jt(this._elementListeners,t,[]),s={name:n,phase:r,callback:i};o.push(s);let a=Jt(this._engine.statesByElement,t,new Map);return a.has(n)||(un(t,Gu),un(t,Gu+"-"+n),a.set(n,hp)),()=>{this._engine.afterFlush(()=>{let c=o.indexOf(s);c>=0&&o.splice(c,1),this._triggers.has(n)||a.delete(n)})}}register(t,n){return this._triggers.has(t)?!1:(this._triggers.set(t,n),!0)}_getTrigger(t){let n=this._triggers.get(t);if(!n)throw kN(t);return n}trigger(t,n,r,i=!0){let o=this._getTrigger(n),s=new Js(this.id,n,t),a=this._engine.statesByElement.get(t);a||(un(t,Gu),un(t,Gu+"-"+n),this._engine.statesByElement.set(t,a=new Map));let c=a.get(n),u=new Xs(r,this.id);if(!(r&&r.hasOwnProperty("value"))&&c&&u.absorbOptions(c.options),a.set(n,u),c||(c=hp),!(u.value===Zs)&&c.value===u.value){if(!OP(c.params,u.params)){let _=[],M=o.matchStyles(c.value,c.params,_),A=o.matchStyles(u.value,u.params,_);_.length?this._engine.reportError(_):this._engine.afterFlush(()=>{Mi(t,M),Yn(t,A)})}return}let f=Jt(this._engine.playersByElement,t,[]);f.forEach(_=>{_.namespaceId==this.id&&_.triggerName==n&&_.queued&&_.destroy()});let p=o.matchTransition(c.value,u.value,t,u.params),g=!1;if(!p){if(!i)return;p=o.fallbackTransition,g=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:n,transition:p,fromState:c,toState:u,player:s,isFallbackTransition:g}),g||(un(t,dE),s.onStart(()=>{No(t,dE)})),s.onDone(()=>{let _=this.players.indexOf(s);_>=0&&this.players.splice(_,1);let M=this._engine.playersByElement.get(t);if(M){let A=M.indexOf(s);A>=0&&M.splice(A,1)}}),this.players.push(s),f.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(n=>n.delete(t)),this._elementListeners.forEach((n,r)=>{this._elementListeners.set(r,n.filter(i=>i.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);let n=this._engine.playersByElement.get(t);n&&(n.forEach(r=>r.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,n){let r=this._engine.driver.query(t,Ku,!0);r.forEach(i=>{if(i[Cn])return;let o=this._engine.fetchNamespacesByElement(i);o.size?o.forEach(s=>s.triggerLeaveAnimation(i,n,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>r.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(t,n,r,i){let o=this._engine.statesByElement.get(t),s=new Map;if(o){let a=[];if(o.forEach((c,u)=>{if(s.set(u,c.value),this._triggers.has(u)){let l=this.trigger(t,u,Zs,i);l&&a.push(l)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,n,s),r&&jr(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){let n=this._elementListeners.get(t),r=this._engine.statesByElement.get(t);if(n&&r){let i=new Set;n.forEach(o=>{let s=o.name;if(i.has(s))return;i.add(s);let c=this._triggers.get(s).fallbackTransition,u=r.get(s)||hp,l=new Xs(Zs),d=new Js(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:c,fromState:u,toState:l,player:d,isFallbackTransition:!0})})}}removeNode(t,n){let r=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,n),this.triggerLeaveAnimation(t,n,!0))return;let i=!1;if(r.totalAnimations){let o=r.players.length?r.playersByQueriedElement.get(t):[];if(o&&o.length)i=!0;else{let s=t;for(;s=s.parentNode;)if(r.statesByElement.get(s)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(t),i)r.markElementAsRemoved(this.id,t,!1,n);else{let o=t[Cn];(!o||o===AE)&&(r.afterFlush(()=>this.clearElementCache(t)),r.destroyInnerAnimations(t),r._onRemovalComplete(t,n))}}insertNode(t,n){un(t,this._hostClassName)}drainQueuedTransitions(t){let n=[];return this._queue.forEach(r=>{let i=r.player;if(i.destroyed)return;let o=r.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==r.triggerName){let c=Np(o,r.triggerName,r.fromState.value,r.toState.value);c._data=t,xp(r.player,a.phase,c,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):n.push(r)}),this._queue=[],n.sort((r,i)=>{let o=r.transition.ast.depCount,s=i.transition.ast.depCount;return o==0||s==0?o-s:this._engine.driver.containsElement(r.element,i.element)?1:-1})}destroy(t){this.players.forEach(n=>n.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}},Ap=class{_onRemovalComplete(t,n){this.onRemovalComplete(t,n)}constructor(t,n,r){this.bodyNode=t,this.driver=n,this._normalizer=r,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(i,o)=>{}}get queuedPlayers(){let t=[];return this._namespaceList.forEach(n=>{n.players.forEach(r=>{r.queued&&t.push(r)})}),t}createNamespace(t,n){let r=new Tp(t,n,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,n)?this._balanceNamespaceList(r,n):(this.newHostElements.set(n,r),this.collectEnterElement(n)),this._namespaceLookup[t]=r}_balanceNamespaceList(t,n){let r=this._namespaceList,i=this.namespacesByHostElement;if(r.length-1>=0){let s=!1,a=this.driver.getParentElement(n);for(;a;){let c=i.get(a);if(c){let u=r.indexOf(c);r.splice(u+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||r.unshift(t)}else r.push(t);return i.set(n,t),t}register(t,n){let r=this._namespaceLookup[t];return r||(r=this.createNamespace(t,n)),r}registerTrigger(t,n,r){let i=this._namespaceLookup[t];i&&i.register(n,r)&&this.totalAnimations++}destroy(t,n){t&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let r=this._fetchNamespace(t);this.namespacesByHostElement.delete(r.hostElement);let i=this._namespaceList.indexOf(r);i>=0&&this._namespaceList.splice(i,1),r.destroy(n),delete this._namespaceLookup[t]}))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){let n=new Set,r=this.statesByElement.get(t);if(r){for(let i of r.values())if(i.namespaceId){let o=this._fetchNamespace(i.namespaceId);o&&n.add(o)}}return n}trigger(t,n,r,i){if(Yu(n)){let o=this._fetchNamespace(t);if(o)return o.trigger(n,r,i),!0}return!1}insertNode(t,n,r,i){if(!Yu(n))return;let o=n[Cn];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(n);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){let s=this._fetchNamespace(t);s&&s.insertNode(n,r)}i&&this.collectEnterElement(n)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,n){n?this.disabledNodes.has(t)||(this.disabledNodes.add(t),un(t,fp)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),No(t,fp))}removeNode(t,n,r){if(Yu(n)){let i=t?this._fetchNamespace(t):null;i?i.removeNode(n,r):this.markElementAsRemoved(t,n,!1,r);let o=this.namespacesByHostElement.get(n);o&&o.id!==t&&o.removeNode(n,r)}else this._onRemovalComplete(n,r)}markElementAsRemoved(t,n,r,i,o){this.collectedLeaveElements.push(n),n[Cn]={namespaceId:t,setForRemoval:i,hasAnimation:r,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,n,r,i,o){return Yu(n)?this._fetchNamespace(t).listen(n,r,i,o):()=>{}}_buildInstruction(t,n,r,i,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,r,i,t.fromState.options,t.toState.options,n,o)}destroyInnerAnimations(t){let n=this.driver.query(t,Ku,!0);n.forEach(r=>this.destroyActiveAnimationsForElement(r)),this.playersByQueriedElement.size!=0&&(n=this.driver.query(t,vp,!0),n.forEach(r=>this.finishActiveQueriedAnimationOnElement(r)))}destroyActiveAnimationsForElement(t){let n=this.playersByElement.get(t);n&&n.forEach(r=>{r.queued?r.markedForDestroy=!0:r.destroy()})}finishActiveQueriedAnimationOnElement(t){let n=this.playersByQueriedElement.get(t);n&&n.forEach(r=>r.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return jr(this.players).onDone(()=>t());t()})}processLeaveNode(t){var r;let n=t[Cn];if(n&&n.setForRemoval){if(t[Cn]=AE,n.namespaceId){this.destroyInnerAnimations(t);let i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}(r=t.classList)!=null&&r.contains(fp)&&this.markElementAsDisabled(t,!1),this.driver.query(t,DP,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((r,i)=>this._balanceNamespaceList(r,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let r=0;rr()),this._flushFns=[],this._whenQuietFns.length){let r=this._whenQuietFns;this._whenQuietFns=[],n.length?jr(n).onDone(()=>{r.forEach(i=>i())}):r.forEach(i=>i())}}reportError(t){throw jN(t)}_flushAnimations(t,n){let r=new Qs,i=[],o=new Map,s=[],a=new Map,c=new Map,u=new Map,l=new Set;this.disabledNodes.forEach(x=>{l.add(x);let L=this.driver.query(x,_P,!0);for(let V=0;V{let V=wE+_++;g.set(L,V),x.forEach(ce=>un(ce,V))});let M=[],A=new Set,Y=new Set;for(let x=0;xA.add(ce)):Y.add(L))}let B=new Map,he=pE(f,Array.from(A));he.forEach((x,L)=>{let V=gp+_++;B.set(L,V),x.forEach(ce=>un(ce,V))}),t.push(()=>{p.forEach((x,L)=>{let V=g.get(L);x.forEach(ce=>No(ce,V))}),he.forEach((x,L)=>{let V=B.get(L);x.forEach(ce=>No(ce,V))}),M.forEach(x=>{this.processLeaveNode(x)})});let De=[],It=[];for(let x=this._namespaceList.length-1;x>=0;x--)this._namespaceList[x].drainQueuedTransitions(n).forEach(V=>{let ce=V.player,ke=V.element;if(De.push(ce),this.collectedEnterElements.length){let ut=ke[Cn];if(ut&&ut.setForMove){if(ut.previousTriggersValues&&ut.previousTriggersValues.has(V.triggerName)){let Xn=ut.previousTriggersValues.get(V.triggerName),Mt=this.statesByElement.get(V.element);if(Mt&&Mt.has(V.triggerName)){let zr=Mt.get(V.triggerName);zr.value=Xn,Mt.set(V.triggerName,zr)}}ce.destroy();return}}let tn=!d||!this.driver.containsElement(d,ke),St=B.get(ke),Sn=g.get(ke),Be=this._buildInstruction(V,r,Sn,St,tn);if(Be.errors&&Be.errors.length){It.push(Be);return}if(tn){ce.onStart(()=>Mi(ke,Be.fromStyles)),ce.onDestroy(()=>Yn(ke,Be.toStyles)),i.push(ce);return}if(V.isFallbackTransition){ce.onStart(()=>Mi(ke,Be.fromStyles)),ce.onDestroy(()=>Yn(ke,Be.toStyles)),i.push(ce);return}let Ta=[];Be.timelines.forEach(ut=>{ut.stretchStartingKeyframe=!0,this.disabledNodes.has(ut.element)||Ta.push(ut)}),Be.timelines=Ta,r.append(ke,Be.timelines);let Aa={instruction:Be,player:ce,element:ke};s.push(Aa),Be.queriedElements.forEach(ut=>Jt(a,ut,[]).push(ce)),Be.preStyleProps.forEach((ut,Xn)=>{if(ut.size){let Mt=c.get(Xn);Mt||c.set(Xn,Mt=new Set),ut.forEach((zr,qo)=>Mt.add(qo))}}),Be.postStyleProps.forEach((ut,Xn)=>{let Mt=u.get(Xn);Mt||u.set(Xn,Mt=new Set),ut.forEach((zr,qo)=>Mt.add(qo))})});if(It.length){let x=[];It.forEach(L=>{x.push(VN(L.triggerName,L.errors))}),De.forEach(L=>L.destroy()),this.reportError(x)}let O=new Map,Ye=new Map;s.forEach(x=>{let L=x.element;r.has(L)&&(Ye.set(L,L),this._beforeAnimationBuild(x.player.namespaceId,x.instruction,O))}),i.forEach(x=>{let L=x.element;this._getPreviousPlayers(L,!1,x.namespaceId,x.triggerName,null).forEach(ce=>{Jt(O,L,[]).push(ce),ce.destroy()})});let Ft=M.filter(x=>mE(x,c,u)),yt=new Map;hE(yt,this.driver,Y,u,Gn).forEach(x=>{mE(x,c,u)&&Ft.push(x)});let Qn=new Map;p.forEach((x,L)=>{hE(Qn,this.driver,new Set(x),c,Lu)}),Ft.forEach(x=>{var ce,ke;let L=yt.get(x),V=Qn.get(x);yt.set(x,new Map([...(ce=L==null?void 0:L.entries())!=null?ce:[],...(ke=V==null?void 0:V.entries())!=null?ke:[]]))});let $r=[],In=[],Ma={};s.forEach(x=>{let{element:L,player:V,instruction:ce}=x;if(r.has(L)){if(l.has(L)){V.onDestroy(()=>Yn(L,ce.toStyles)),V.disabled=!0,V.overrideTotalTime(ce.totalTime),i.push(V);return}let ke=Ma;if(Ye.size>1){let St=L,Sn=[];for(;St=St.parentNode;){let Be=Ye.get(St);if(Be){ke=Be;break}Sn.push(St)}Sn.forEach(Be=>Ye.set(Be,ke))}let tn=this._buildAnimation(V.namespaceId,ce,O,o,Qn,yt);if(V.setRealPlayer(tn),ke===Ma)$r.push(V);else{let St=this.playersByElement.get(ke);St&&St.length&&(V.parentPlayer=jr(St)),i.push(V)}}else Mi(L,ce.fromStyles),V.onDestroy(()=>Yn(L,ce.toStyles)),In.push(V),l.has(L)&&i.push(V)}),In.forEach(x=>{let L=o.get(x.element);if(L&&L.length){let V=jr(L);x.setRealPlayer(V)}}),i.forEach(x=>{x.parentPlayer?x.syncPlayerEvents(x.parentPlayer):x.destroy()});for(let x=0;x!tn.destroyed);ke.length?TP(this,L,ke):this.processLeaveNode(L)}return M.length=0,$r.forEach(x=>{this.players.push(x),x.onDone(()=>{x.destroy();let L=this.players.indexOf(x);this.players.splice(L,1)}),x.play()}),$r}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,n,r,i,o){let s=[];if(n){let a=this.playersByQueriedElement.get(t);a&&(s=a)}else{let a=this.playersByElement.get(t);if(a){let c=!o||o==Zs;a.forEach(u=>{u.queued||!c&&u.triggerName!=i||s.push(u)})}}return(r||i)&&(s=s.filter(a=>!(r&&r!=a.namespaceId||i&&i!=a.triggerName))),s}_beforeAnimationBuild(t,n,r){let i=n.triggerName,o=n.element,s=n.isRemovalTransition?void 0:t,a=n.isRemovalTransition?void 0:i;for(let c of n.timelines){let u=c.element,l=u!==o,d=Jt(r,u,[]);this._getPreviousPlayers(u,l,s,a,n.toState).forEach(p=>{let g=p.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),p.destroy(),d.push(p)})}Mi(o,n.fromStyles)}_buildAnimation(t,n,r,i,o,s){let a=n.triggerName,c=n.element,u=[],l=new Set,d=new Set,f=n.timelines.map(g=>{let _=g.element;l.add(_);let M=_[Cn];if(M&&M.removedBeforeQueried)return new Pr(g.duration,g.delay);let A=_!==c,Y=AP((r.get(_)||bP).map(O=>O.getRealPlayer())).filter(O=>{let Ye=O;return Ye.element?Ye.element===_:!1}),B=o.get(_),he=s.get(_),De=yE(this._normalizer,g.keyframes,B,he),It=this._buildPlayer(g,De,Y);if(g.subTimeline&&i&&d.add(_),A){let O=new Js(t,a,_);O.setRealPlayer(It),u.push(O)}return It});u.forEach(g=>{Jt(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>IP(this.playersByQueriedElement,g.element,g))}),l.forEach(g=>un(g,iE));let p=jr(f);return p.onDestroy(()=>{l.forEach(g=>No(g,iE)),Yn(c,n.toStyles)}),d.forEach(g=>{Jt(i,g,[]).push(p)}),p}_buildPlayer(t,n,r){return n.length>0?this.driver.animate(t.element,n,t.duration,t.delay,t.easing,r):new Pr(t.duration,t.delay)}},Js=class{constructor(t,n,r){this.namespaceId=t,this.triggerName=n,this.element=r,this._player=new Pr,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((n,r)=>{n.forEach(i=>xp(t,r,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){let n=this._player;n.triggerCallback&&t.onStart(()=>n.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,n){Jt(this._queuedCallbacks,t,[]).push(n)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}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(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){let n=this._player;n.triggerCallback&&n.triggerCallback(t)}};function IP(e,t,n){let r=e.get(t);if(r){if(r.length){let i=r.indexOf(n);r.splice(i,1)}r.length==0&&e.delete(t)}return r}function SP(e){return e!=null?e:null}function Yu(e){return e&&e.nodeType===1}function MP(e){return e=="start"||e=="done"}function fE(e,t){let n=e.style.display;return e.style.display=t!=null?t:"none",n}function hE(e,t,n,r,i){let o=[];n.forEach(c=>o.push(fE(c)));let s=[];r.forEach((c,u)=>{let l=new Map;c.forEach(d=>{let f=t.computeStyle(u,d,i);l.set(d,f),(!f||f.length==0)&&(u[Cn]=CP,s.push(u))}),e.set(u,l)});let a=0;return n.forEach(c=>fE(c,o[a++])),s}function pE(e,t){let n=new Map;if(e.forEach(a=>n.set(a,[])),t.length==0)return n;let r=1,i=new Set(t),o=new Map;function s(a){if(!a)return r;let c=o.get(a);if(c)return c;let u=a.parentNode;return n.has(u)?c=u:i.has(u)?c=r:c=s(u),o.set(a,c),c}return t.forEach(a=>{let c=s(a);c!==r&&n.get(c).push(a)}),n}function un(e,t){var n;(n=e.classList)==null||n.add(t)}function No(e,t){var n;(n=e.classList)==null||n.remove(t)}function TP(e,t,n){jr(n).onDone(()=>e.processLeaveNode(t))}function AP(e){let t=[];return OE(e,t),t}function OE(e,t){for(let n=0;ni.add(o)):t.set(e,r),n.delete(e),!0}var rl=class{constructor(t,n,r){this._driver=n,this._normalizer=r,this._triggerCache={},this.onRemovalComplete=(i,o)=>{},this._transitionEngine=new Ap(t.body,n,r),this._timelineEngine=new Mp(t.body,n,r),this._transitionEngine.onRemovalComplete=(i,o)=>this.onRemovalComplete(i,o)}registerTrigger(t,n,r,i,o){let s=t+"-"+i,a=this._triggerCache[s];if(!a){let c=[],u=[],l=ME(this._driver,o,c,u);if(c.length)throw TN(i,c);u.length&&void 0,a=gP(i,l,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(n,i,a)}register(t,n){this._transitionEngine.register(t,n)}destroy(t,n){this._transitionEngine.destroy(t,n)}onInsert(t,n,r,i){this._transitionEngine.insertNode(t,n,r,i)}onRemove(t,n,r){this._transitionEngine.removeNode(t,n,r)}disableAnimations(t,n){this._transitionEngine.markElementAsDisabled(t,n)}process(t,n,r,i){if(r.charAt(0)=="@"){let[o,s]=nE(r),a=i;this._timelineEngine.command(o,n,s,a)}else this._transitionEngine.trigger(t,n,r,i)}listen(t,n,r,i,o){if(r.charAt(0)=="@"){let[s,a]=nE(r);return this._timelineEngine.listen(s,n,a,o)}return this._transitionEngine.listen(t,n,r,i,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(t){this._transitionEngine.afterFlushAnimationsDone(t)}};function xP(e,t){let n=null,r=null;return Array.isArray(t)&&t.length?(n=pp(t[0]),t.length>1&&(r=pp(t[t.length-1]))):t instanceof Map&&(n=pp(t)),n||r?new NP(e,n,r):null}var NP=(()=>{let t=class t{constructor(r,i,o){this._element=r,this._startStyles=i,this._endStyles=o,this._state=0;let s=t.initialStylesByElement.get(r);s||t.initialStylesByElement.set(r,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Yn(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Yn(this._element,this._initialStyles),this._endStyles&&(Yn(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Mi(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Mi(this._element,this._endStyles),this._endStyles=null),Yn(this._element,this._initialStyles),this._state=3)}};t.initialStylesByElement=new WeakMap;let e=t;return e})();function pp(e){let t=null;return e.forEach((n,r)=>{PP(r)&&(t=t||new Map,t.set(r,n))}),t}function PP(e){return e==="display"||e==="position"}var il=class{constructor(t,n,r,i){this.element=t,this.keyframes=n,this.options=r,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map;let n=()=>this._onFinish();this.domPlayer.addEventListener("finish",n),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",n)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){let n=[];return t.forEach(r=>{n.push(Object.fromEntries(r))}),n}_triggerWebAnimation(t,n,r){return t.animate(this._convertKeyframesToObject(n),r)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),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&&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(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){var t;return+((t=this.domPlayer.currentTime)!=null?t:0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((r,i)=>{i!=="offset"&&t.set(i,this._finished?r:IE(this.element,i))}),this.currentSnapshot=t}triggerCallback(t){let n=t==="start"?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}},gE=class{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,n){return!1}containsElement(t,n){return _E(t,n)}getParentElement(t){return Pp(t)}query(t,n,r){return DE(t,n,r)}computeStyle(t,n,r){return window.getComputedStyle(t)[n]}animate(t,n,r,i,o,s=[]){let a=i==0?"both":"forwards",c={duration:r,delay:i,fill:a};o&&(c.easing=o);let u=new Map,l=s.filter(p=>p instanceof il);QN(r,i)&&l.forEach(p=>{p.currentSnapshot.forEach((g,_)=>u.set(_,g))});let d=YN(n).map(p=>Po(p));d=XN(t,d,u);let f=xP(t,d);return new il(t,d,c,f)}};var Zu="@",xE="@.disabled",ol=class{constructor(t,n,r,i){this.namespaceId=t,this.delegate=n,this.engine=r,this._onDestroy=i,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(t){var n,r;(r=(n=this.delegate).destroyNode)==null||r.call(n,t)}destroy(){var t;this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),(t=this._onDestroy)==null||t.call(this)}createElement(t,n){return this.delegate.createElement(t,n)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,n){this.delegate.appendChild(t,n),this.engine.onInsert(this.namespaceId,n,t,!1)}insertBefore(t,n,r,i=!0){this.delegate.insertBefore(t,n,r),this.engine.onInsert(this.namespaceId,n,t,i)}removeChild(t,n,r){this.engine.onRemove(this.namespaceId,n,this.delegate)}selectRootElement(t,n){return this.delegate.selectRootElement(t,n)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,n,r,i){this.delegate.setAttribute(t,n,r,i)}removeAttribute(t,n,r){this.delegate.removeAttribute(t,n,r)}addClass(t,n){this.delegate.addClass(t,n)}removeClass(t,n){this.delegate.removeClass(t,n)}setStyle(t,n,r,i){this.delegate.setStyle(t,n,r,i)}removeStyle(t,n,r){this.delegate.removeStyle(t,n,r)}setProperty(t,n,r){n.charAt(0)==Zu&&n==xE?this.disableAnimations(t,!!r):this.delegate.setProperty(t,n,r)}setValue(t,n){this.delegate.setValue(t,n)}listen(t,n,r){return this.delegate.listen(t,n,r)}disableAnimations(t,n){this.engine.disableAnimations(t,n)}},Op=class extends ol{constructor(t,n,r,i,o){super(n,r,i,o),this.factory=t,this.namespaceId=n}setProperty(t,n,r){n.charAt(0)==Zu?n.charAt(1)=="."&&n==xE?(r=r===void 0?!0:!!r,this.disableAnimations(t,r)):this.engine.process(this.namespaceId,t,n.slice(1),r):this.delegate.setProperty(t,n,r)}listen(t,n,r){if(n.charAt(0)==Zu){let i=RP(t),o=n.slice(1),s="";return o.charAt(0)!=Zu&&([o,s]=FP(o)),this.engine.listen(this.namespaceId,i,o,s,a=>{let c=a._data||-1;this.factory.scheduleListenerCallback(c,r,a)})}return this.delegate.listen(t,n,r)}};function RP(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}function FP(e){let t=e.indexOf("."),n=e.substring(0,t),r=e.slice(t+1);return[n,r]}var vE=class{constructor(t,n,r){this.delegate=t,this.engine=n,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,n.onRemovalComplete=(i,o)=>{let s=o==null?void 0:o.parentNode(i);s&&o.removeChild(s,i)}}createRenderer(t,n){var u;let r="",i=this.delegate.createRenderer(t,n);if(!t||!((u=n==null?void 0:n.data)!=null&&u.animation)){let l=this._rendererCache,d=l.get(i);if(!d){let f=()=>l.delete(i);d=new ol(r,i,this.engine,f),l.set(i,d)}return d}let o=n.id,s=n.id+"-"+this._currentId;this._currentId++,this.engine.register(s,t);let a=l=>{Array.isArray(l)?l.forEach(a):this.engine.registerTrigger(o,s,t,l.name,l)};return n.data.animation.forEach(a),new Op(this,s,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(t,n,r){if(t>=0&&tn(r));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),i.push([n,r])}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()}};var LP=ie(()=>{let e={onRemovalComplete:()=>{}},t=new We(null),n=v(rl,se.Optional)||e,{onRemovalComplete:r=e.onRemovalComplete}=n;return n.onRemovalComplete=(i,o)=>{t.next(i),r.call(n,i,o)},t.pipe(ee(i=>ht(0).pipe(w(()=>null),_e(i))),Et())});function NE(e,t=null){return Ao(e).activeElement!==e&&!e.matches(":disabled")&&!(t!=null&&t.contains(e))}function kP(e){return xe(J(e,"focusin").pipe(w(({target:t})=>t)),J(e,"focusout").pipe(ye(({target:t,relatedTarget:n})=>!!n&&NE(t)),w(({relatedTarget:t})=>t)))}var PE=ie(()=>{let e=v(LP),t=v(fe),n=v(de),r=J(t,"focusout"),i=J(t,"focusin"),o=J(t,"blur"),s=J(t,"mousedown"),a=J(t,"mouseup");return xe(r.pipe(be(s),wd(()=>a),is(e),ye(([c,u])=>NE(Fr(c),u)),w(([{relatedTarget:c}])=>c)),o.pipe(w(()=>n.activeElement),ye(c=>!!(c!=null&&c.matches("iframe")))),i.pipe(ee(c=>{let u=Fr(c),l=Ao(u);return l===n?T(u):kP(l).pipe(_e(u))})),s.pipe(ee(c=>{let u=Fr(c);return!n.activeElement||n.activeElement===n.body?T(u):r.pipe(Ke(1),w(()=>u),be(ht(0)))}))).pipe(Ue(),Et())}),RE=Ee([]);var FE=ie(()=>{var e,t;return(t=(e=v(de).querySelector("base"))===null||e===void 0?void 0:e.href)!==null&&t!==void 0?t:""}),NW=ie(()=>v(li).createRenderer(null,null)),jP=Ee([]);function LE(e){return{provide:jP,multi:!0,useExisting:e}}var PW=ie(()=>{var e;let t=(e=v(de).querySelector("base"))===null||e===void 0?void 0:e.href;if(t)return t;let n=v(de).createElement("a");return n.href="",n.pathname}),ta=new D("[TUI_FOCUSABLE_ITEM_ACCESSOR]");function sl(e){return{provide:ta,useExisting:e}}var RW=new D("[TUI_FONTS_READY]",{factory:()=>{var e;return Oe(((e=v(de).fonts)===null||e===void 0?void 0:e.ready)||Ae).pipe(Wt({bufferSize:1,refCount:!1}))}}),na=ie(()=>rp(v(Io))),VP=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/,UP=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/,Lp=ie(()=>VP.test(v(Jh).toLowerCase())||UP.test(v(Jh).slice(0,4).toLowerCase())),FW=ie(()=>v(Lp)&&!v(na)),LW=ie(()=>$0(v(Io))),kW=ie(()=>!!v(fe).chrome),BP=ie(()=>!!v(fe).Cypress),HP=ie(Rr),jW=ie(()=>v(BP)||v(HP)),VW=ie(()=>{var e;return typeof((e=v(fe))===null||e===void 0?void 0:e.mozCancelFullScreen)<"u"}),UW=ie(()=>v(fe).location.host.endsWith("stackblitz.io")),kE=ie(()=>{var e;return!!(!((e=v(fe))===null||e===void 0)&&e.webkitConvertPointFromNodeToPage)}),BW=Ee("web");var HW=ie(()=>BD(v(Qt))?new Range:{}),ra=ie(()=>new X(v(de).documentElement)),$W=Ee({timeout:500,threshold:30}),zW=ie(So),GW=ie(()=>v(fe).matchMedia("(any-pointer: coarse)").matches),kp=new D("[TUI_WINDOW_SIZE]",{factory:()=>{let e=v(fe);return J(e,"resize").pipe(_e(null),w(()=>{var t,n;let r=Math.max(e.innerWidth,((t=e.visualViewport)===null||t===void 0?void 0:t.width)||0),i=Math.max(e.innerHeight,((n=e.visualViewport)===null||n===void 0?void 0:n.height)||0);return{width:r,height:i,top:0,left:0,right:r,bottom:i}}),Wt({bufferSize:1,refCount:!0}))}}),WW=ie(()=>v(kp).pipe(w(({height:e})=>e))),qW=Ee({wheelSensitivity:.01});var qe=(()=>{class e extends rr{constructor(){super(1)}ngOnDestroy(){this.next(),this.complete()}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),f8=(()=>{class e{constructor(n,r){this.resolver=n,this.injector=r,this.map=new Map}addComponent(n){this.map.has(n)||this.map.set(n,this.resolver.resolveComponentFactory(n).create(this.injector))}}return e.\u0275fac=function(n){return new(n||e)(I(Un),I(vo))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),jp=(()=>{class e extends N{constructor({nativeElement:n},r,i){super(o=>this.focusVisible$.subscribe(o)),this.focusVisible$=Y0(n).pipe(J0(r),be(i))}}return e.\u0275fac=function(n){return new(n||e)(I(X),I(gt),I(qe,2))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),$P="tui_",VE=(()=>{class e{generate(){return"".concat($P).concat(e.autoId++).concat(Date.now())}}return e.autoId=0,e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),zP=(()=>{class e extends N{constructor(n,r){super(i=>this.callback$.subscribe(i)),this.callback$=An(()=>{let{nativeElement:i}=n,o=[r,i];for(;i.parentElement;)i=i.parentElement,o.push(i);return xe(...o.map(s=>J(s,"scroll")))})}}return e.\u0275fac=function(n){return new(n||e)(I(X),I(fe))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),h8=(()=>{class e extends N{constructor(n,{nativeElement:r},i,o,s,a){super(c=>this.obscured$.subscribe(c)),this.obscured$=xe(xe(n,On(o,"resize")).pipe(ns(0)),a.pipe(br(Mo))).pipe(w(()=>ju(r)),_e(null),Ue(),qn(i),be(s))}}return e.\u0275fac=function(n){return new(n||e)(I(zP,2),I(X),I(ue),I(fe),I(qe,2),I(wn))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})();var GP=300;function jE(e){return"scrollX"in e?e.scrollX:e.scrollLeft}function WP(e){return"scrollY"in e?e.scrollY:e.scrollTop}var p8=(()=>{class e{constructor(n,r){this.performanceRef=n,this.animationFrame$=r}scroll$(n,r,i=jE(n),o=GP){let s=WP(n),a=jE(n),c=r-s,u=i-a;return(o?An(()=>T(this.performanceRef.now())).pipe(ee(d=>this.animationFrame$.pipe(w(f=>f-d))),w(d=>L0(yr(d/o,0,1))),w(d=>[s+c*d,a+u*d]),rs([r,i]),be(ht(o))):T([r,i])).pipe(Ne(([d,f])=>{var p;(p=n.scrollTo)===null||p===void 0||p.call(n,f,d)}))}}return e.\u0275fac=function(n){return new(n||e)(I(I0),I(wn))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),UE=(()=>{class e{constructor(n,r){this.win=n,this.platformId=r,this.cache=new Map}request(n){let r=this.cache.get(n);if(r)return r;let o=("AbortController"in this.win||Ls(this.platformId)?cp(n):An(()=>Oe(fetch(n)))).pipe(ee(s=>Za(this,void 0,void 0,function*(){if(s.ok)return s.text();throw new Error("Failed to load ".concat(n," (").concat(s.statusText,")"))})),Wt({bufferSize:1,refCount:!1}));return this.cache.set(n,o),o}}return e.\u0275fac=function(n){return new(n||e)(I(fe),I(Qt))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var qP=["viewContainer"],YP="tui_interactive_",Up=(()=>{class e{constructor(){this.pseudoHover=null,this.pseudoActive=null,this.pseudoFocus=null,this.focusable=!0,this.nativeId="",this.focusedChange=new et,this.focusVisibleChange=new et,this.focusVisible=!1,this.autoIdString="".concat(YP).concat(e.autoId++).concat(Date.now())}get computedDisabled(){return this.disabled}get computedFocusable(){return!this.computedDisabled&&(this.focusable||this.focused)}get computedFocused(){var n;return!this.computedDisabled&&((n=this.pseudoFocus)!==null&&n!==void 0?n:this.focused)}get computedFocusVisible(){var n;return!this.computedDisabled&&((n=this.pseudoFocus)!==null&&n!==void 0?n:this.focusVisible)}get id(){return this.nativeId||this.autoIdString}updateFocused(n){this.focusedChange.emit(n)}updateFocusVisible(n){this.focusVisible!==n&&(this.focusVisible=n,this.focusVisibleChange.emit(n))}}return e.autoId=0,e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=$({type:e,hostVars:7,hostBindings:function(n,r){n&2&&(at("data-focused",r.pseudoFocus),Xe("_disabled",r.computedDisabled)("_focused",r.computedFocused)("_focus-visible",r.computedFocusVisible))},inputs:{pseudoHover:"pseudoHover",pseudoActive:"pseudoActive",pseudoFocus:"pseudoFocus",focusable:"focusable",nativeId:"nativeId"},outputs:{focusedChange:"focusedChange",focusVisibleChange:"focusVisibleChange"}}),e})(),Vp=class{},ia=(()=>{class e extends Up{constructor(n,r,i){super(),this.ngControl=n,this.cdr=r,this.valueTransformer=i,this.refresh$=new Te,this.onTouched=tp,this.onChange=tp,this.fallbackValue=this.getFallbackValue(),this.destroy$=new Te,this.readOnly=!1,this.pseudoInvalid=null,this.ngControl&&(this.ngControl.valueAccessor=this)}get computedInvalid(){return this.interactive&&(this.pseudoInvalid!==null?this.pseudoInvalid:this.touched&&this.invalid)}get value(){var n;return(n=this.previousInternalValue)!==null&&n!==void 0?n:this.fallbackValue}set value(n){this.updateValue(n)}get safeCurrentValue(){var n;return(n=this.rawValue)!==null&&n!==void 0?n:this.fallbackValue}get invalid(){return this.safeNgControlData(({invalid:n})=>n,!1)}get valid(){return this.safeNgControlData(({valid:n})=>n,!1)}get touched(){return this.safeNgControlData(({touched:n})=>n,!1)}get disabled(){return this.safeNgControlData(({disabled:n})=>n,!1)}get interactive(){return!this.readOnly&&!this.computedDisabled}get control(){return this.safeNgControlData(({control:n})=>n,null)}get computedName(){var n,r;return(r=(n=this.controlName)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:null}get controlName(){var n,r,i;return(i=(r=(n=this.ngControl)===null||n===void 0?void 0:n.name)===null||r===void 0?void 0:r.toString())!==null&&i!==void 0?i:null}get rawValue(){let{ngControl:n}=this;if(n===null)return;let r=n instanceof Fu&&this.previousInternalValue===void 0?n.viewModel:n.value;return this.fromControlValue(r)}ngOnInit(){this.refresh$.pipe(ns(0),_e(null),w(()=>{var n;return(n=this.ngControl)===null||n===void 0?void 0:n.control}),ye(bi),Ue(),ee(n=>xe(n.valueChanges,n.statusChanges)),be(this.destroy$)).subscribe(()=>{this.refreshLocalValue(this.safeCurrentValue)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}checkControlUpdate(){this.cdr.markForCheck()}registerOnChange(n){this.onChange=r=>{n(this.toControlValue(r))},this.refresh$.next()}registerOnTouched(n){this.onTouched=n}setDisabledState(){this.checkControlUpdate()}writeValue(n){let r=this.ngControl instanceof Fu&&this.previousInternalValue===void 0?this.ngControl.model:n;this.refreshLocalValue(this.fromControlValue(r))}updateFocused(n){n||this.controlMarkAsTouched(),super.updateFocused(n)}updateValue(n){this.disabled||this.valueIdenticalComparator(this.value,n)||(this.previousInternalValue=n,this.controlSetValue(n))}valueIdenticalComparator(n,r){return n===r}safeNgControlData(n,r){var i;return(i=this.ngControl&&n(this.ngControl))!==null&&i!==void 0?i:r}controlMarkAsTouched(){this.onTouched(),this.checkControlUpdate()}controlSetValue(n){this.onChange(n),this.checkControlUpdate()}refreshLocalValue(n){this.previousInternalValue=n,this.checkControlUpdate()}fromControlValue(n){return this.valueTransformer?this.valueTransformer.fromControlValue(n):n}toControlValue(n){return this.valueTransformer?this.valueTransformer.toControlValue(n):n}}return e.\u0275fac=function(n){return new(n||e)(y(wi,8),y(gt),y(Vp,8))},e.\u0275dir=$({type:e,hostVars:4,hostBindings:function(n,r){n&2&&Xe("_readonly",r.readOnly)("_invalid",r.computedInvalid)},inputs:{readOnly:"readOnly",pseudoInvalid:"pseudoInvalid"},features:[$e]}),e})();function N8(e){return{provide:ia,useExisting:e}}var BE=(()=>{class e{constructor(){this.change$=new Te}ngOnChanges(){this.change$.next()}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=$({type:e,features:[on]}),e})(),al=(()=>{class e extends N{constructor(n){super(r=>this.dialogs$.subscribe(r)),this.idService=n,this.dialogs$=new We([])}open(n,r={}){return new N(i=>{let o=a=>{i.next(a),i.complete()},s=Object.assign(Object.assign(Object.assign({},this.defaultOptions),r),{content:n,completeWith:o,$implicit:i,component:this.component,createdAt:Date.now(),id:this.idService.generate()});return this.dialogs$.next([...this.dialogs$.value,s]),()=>{this.dialogs$.next(this.dialogs$.value.filter(a=>a!==s))}})}}return e.\u0275fac=function(n){return new(n||e)(I(VE))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})();var P8=(()=>{class e extends ia{clear(){this.value=[]}getFallbackValue(){return[]}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275dir=$({type:e,features:[$e]}),e})(),R8=(()=>{class e extends ia{getFallbackValue(){return null}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275dir=$({type:e,features:[$e]}),e})(),cl=(()=>{class e{get safeHost(){if(!this.host)throw new Bu;return this.host}attach(n){this.host=n}add(n){return this.safeHost.addComponentChild(n)}remove({hostView:n}){n.destroyed||n.destroy()}addTemplate(n,r){return this.safeHost.addTemplateChild(n,r)}removeTemplate(n){n.destroyed||n.destroy()}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),Bp=(()=>{class e{constructor(n,r,i){this.injector=n,this.el=r,i.attach(this)}get clientRect(){return this.el.nativeElement.getBoundingClientRect()}addComponentChild(n){let r=n.createInjector(this.injector),o=r.get(Un).resolveComponentFactory(n.component),s=[{provide:e,useValue:this}],a=bt.create({parent:r,providers:s}),c=this.vcr.createComponent(o,void 0,a);return c.changeDetectorRef.detectChanges(),c}addTemplateChild(n,r){return this.vcr.createEmbeddedView(n,r)}}return e.\u0275fac=function(n){return new(n||e)(y(vo),y(X),y(cl))},e.\u0275dir=$({type:e,viewQuery:function(n,r){if(n&1&&_D(qP,5,Nt),n&2){let i;Ah(i=Oh())&&(r.vcr=i.first)}}}),e})();function HE(e){return e!==null&&typeof e<"u"&&"".concat(e)!=="false"}var k8=(()=>{class e{transform(n,r,...i){return r(n,...i)}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275pipe=pi({name:"tuiMapper",type:e,pure:!0}),e})(),j8=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();function ZP(e,t){if(e&1&&(ge(0,"div",3),Le(1,"div",4),pe()),e&2){let n=me().ngIf;Xe("t-bar_has-horizontal",n[1])}}function KP(e,t){if(e&1&&(ge(0,"div",5),Le(1,"div",6),pe()),e&2){let n=me().ngIf;Xe("t-bar_has-vertical",n[0])}}function QP(e,t){if(e&1&&(Dn(0),Ce(1,ZP,2,2,"div",1)(2,KP,2,2,"div",2),En()),e&2){let n=t.ngIf;re(1),U("ngIf",n[0]),re(1),U("ngIf",n[1])}}var ul=24;function XP({clientY:e},{top:t,height:n}){return(e-t)/n}function JP({clientX:e},{left:t,width:n}){return(e-t)/n}var eR=(()=>{class e{constructor(n,r,i,o,s,a){this.container=o,this.doc=s,this.el=a,this.tuiScrollbar="vertical";let{nativeElement:c}=this.el,u=J(c,"mousedown"),l=J(this.doc,"mousemove"),d=J(this.doc,"mouseup"),f=J(this.wrapper,"mousedown");xe(f.pipe(w(p=>this.getScrolled(p,.5,.5))),u.pipe(X0(),ee(p=>{let g=c.getBoundingClientRect(),_=XP(p,g),M=JP(p,g);return l.pipe(w(A=>this.getScrolled(A,_,M)),be(d))}))).pipe(Wn(n),be(r)).subscribe(([p,g])=>{this.tuiScrollbar==="vertical"?this.element.scrollTop=p:this.element.scrollLeft=g}),xe(i.pipe(br(Mo)),Q0(this.element)).pipe(Wn(n),be(r)).subscribe(()=>{this.tuiScrollbar==="vertical"?(c.style.top="".concat(this.thumb*100,"%"),c.style.height="".concat(this.view*100,"%")):(c.style.left="".concat(this.thumb*100,"%"),c.style.width="".concat(this.view*100,"%"))})}get wrapper(){return this.el.nativeElement.parentElement}get scrolled(){let{scrollTop:n,scrollHeight:r,clientHeight:i,scrollLeft:o,scrollWidth:s,clientWidth:a}=this.element;return this.tuiScrollbar==="vertical"?n/(r-i):o/(s-a)}get compensation(){let{clientHeight:n,scrollHeight:r,clientWidth:i,scrollWidth:o}=this.element;return n*n/r>ul&&this.tuiScrollbar==="vertical"||i*i/o>ul&&this.tuiScrollbar==="horizontal"?0:this.tuiScrollbar==="vertical"?ul/n:ul/i}get thumb(){let n=this.compensation||this.view;return this.scrolled*(1-n)}get view(){let{clientHeight:n,scrollHeight:r,clientWidth:i,scrollWidth:o}=this.element;return this.tuiScrollbar==="vertical"?Math.ceil(n/r*100)/100:Math.ceil(i/o*100)/100}get element(){return this.container.nativeElement}getScrolled({clientY:n,clientX:r},i,o){let{offsetHeight:s,offsetWidth:a}=this.el.nativeElement,{top:c,left:u,width:l,height:d}=this.wrapper.getBoundingClientRect(),f=this.element.scrollHeight-d,p=this.element.scrollWidth-l,g=(n-c-s*i)/(d-s),_=(r-u-a*o)/(l-a);return[f*g,p*_]}}return e.\u0275fac=function(n){return new(n||e)(y(ue),y(qe,2),y(wn),y(ra),y(de),y(X))},e.\u0275dir=$({type:e,selectors:[["","tuiScrollbar",""]],inputs:{tuiScrollbar:"tuiScrollbar"},features:[ze([qe])]}),e})(),n4=(()=>{class e{constructor(n,r,i){this.zone=n,this.scrollRef=r,this.animationFrame$=i,this.refresh$=this.animationFrame$.pipe(br(300),w(()=>this.scrollbars),_e([!1,!1]),Ue((o,s)=>o[0]===s[0]&&o[1]===s[1]),qn(this.zone))}get scrollbars(){let{clientHeight:n,scrollHeight:r,clientWidth:i,scrollWidth:o}=this.scrollRef.nativeElement;return[Math.ceil(n/r*100)<100,Math.ceil(i/o*100)<100]}}return e.\u0275fac=function(n){return new(n||e)(y(ue),y(ra),y(wn))},e.\u0275cmp=st({type:e,selectors:[["tui-scroll-controls"]],decls:2,vars:3,consts:[[4,"ngIf"],["class","t-bar t-bar_vertical",3,"t-bar_has-horizontal",4,"ngIf"],["class","t-bar t-bar_horizontal",3,"t-bar_has-vertical",4,"ngIf"],[1,"t-bar","t-bar_vertical"],["tuiScrollbar","vertical",1,"t-thumb"],[1,"t-bar","t-bar_horizontal"],["tuiScrollbar","horizontal",1,"t-thumb"]],template:function(n,r){n&1&&(Ce(0,QP,3,2,"ng-container",0),an(1,"async")),n&2&&U("ngIf",cn(1,1,r.refresh$))},dependencies:[Pt,eR,zn],styles:["[_nghost-%COMP%]{position:-webkit-sticky;position:sticky;top:0;left:0;z-index:1;min-width:calc(100% - 1px);min-height:calc(100% - 1px);max-width:calc(100% - 1px);max-height:calc(100% - 1px);float:left;-webkit-margin-end:calc(-100% + 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none}.t-bar[_ngcontent-%COMP%]{position:absolute;right:0;bottom:0;pointer-events:auto;animation:tuiFadeIn var(--tui-duration, .3s) ease-in-out}.t-bar_vertical[_ngcontent-%COMP%]{top:0;width:.875rem}.t-bar_horizontal[_ngcontent-%COMP%]{left:0;height:.875rem}.t-bar_has-horizontal[_ngcontent-%COMP%]{bottom:.5rem}.t-bar_has-vertical[_ngcontent-%COMP%]{right:.5rem}.t-thumb[_ngcontent-%COMP%]{position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;background:currentColor;background-clip:content-box;box-sizing:border-box;transition:all var(--tui-duration, .3s) ease-in-out;transition-property:width,height,opacity;opacity:.2}.t-thumb[_ngcontent-%COMP%]:hover{opacity:.24}.t-thumb[_ngcontent-%COMP%]:active{opacity:.48}.t-bar_vertical[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]{right:0;width:.75rem;min-height:1.25rem}.t-bar_vertical[_ngcontent-%COMP%]:hover .t-thumb[_ngcontent-%COMP%], .t-bar_vertical[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]:active{width:.875rem}.t-bar_horizontal[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]{bottom:0;height:.75rem;min-width:1.25rem}.t-bar_horizontal[_ngcontent-%COMP%]:hover .t-thumb[_ngcontent-%COMP%], .t-bar_horizontal[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]:active{height:.875rem}"],changeDetection:0}),e})();var r4=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=$({type:e,selectors:[["","tuiScrollRef",""]],features:[ze([{provide:ra,useExisting:X}])]}),e})(),i4=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({imports:[[Rt]]}),e})();function tR(e){let t=[],n=!1,r;return function(...o){return n&&t.length===o.length&&o.every((a,c)=>a===t[c])||(t=o,r=e.apply(this,o),n=!0),r}}function $E(e,t,n=!0){return function(){let i=e.call(this);return Object.defineProperty(this,t,{enumerable:n,value:i}),i}}function ll(e,t,n){if(typeof e=="function"){let c=t;if(c.kind==="getter")return $E(e,c.name);if(c.kind==="method")return tR(e);throw new Ws}let{get:r,enumerable:i,value:o}=n,s=t;if(r)return{configurable:!0,enumerable:i,get:$E(r,s,i)};if(typeof o!="function")throw new Ws;let a=o;return{configurable:!0,enumerable:i,get(){let c=[],u=!1,l,d=(...f)=>(u&&c.length===f.length&&f.every((g,_)=>g===c[_])||(c=f,l=a.apply(this,f),u=!0),l);return Object.defineProperty(this,s,{configurable:!0,value:d}),d}}}var w4=(()=>{class e{constructor(n,r,i,o){var s;this.active$=n,this.zone=r,this.el=i,this.directParentActiveZone=o,this.subActiveZones=[],this.tuiActiveZoneParent=null,this.tuiActiveZoneChange=this.active$.pipe(w(a=>!!a&&this.contains(a)),_e(!1),Ue(),Cd(1),qn(this.zone)),(s=this.directParentActiveZone)===null||s===void 0||s.addSubActiveZone(this)}set tuiActiveZoneParentSetter(n){this.setZone(n)}ngOnDestroy(){var n,r;(n=this.directParentActiveZone)===null||n===void 0||n.removeSubActiveZone(this),(r=this.tuiActiveZoneParent)===null||r===void 0||r.removeSubActiveZone(this)}contains(n){return this.el.nativeElement.contains(n)||this.subActiveZones.some((r,i,o)=>o.indexOf(r)===i&&r.contains(n))}setZone(n){var r;(r=this.tuiActiveZoneParent)===null||r===void 0||r.removeSubActiveZone(this),n==null||n.addSubActiveZone(this),this.tuiActiveZoneParent=n}addSubActiveZone(n){this.subActiveZones=[...this.subActiveZones,n]}removeSubActiveZone(n){this.subActiveZones=F0(this.subActiveZones,this.subActiveZones.indexOf(n))}}return e.\u0275fac=function(n){return new(n||e)(y(PE),y(ue),y(X),y(e,12))},e.\u0275dir=$({type:e,selectors:[["","tuiActiveZone","",5,"ng-container"],["","tuiActiveZoneChange","",5,"ng-container"],["","tuiActiveZoneParent","",5,"ng-container"]],inputs:{tuiActiveZoneParentSetter:["tuiActiveZoneParent","tuiActiveZoneParentSetter"]},outputs:{tuiActiveZoneChange:"tuiActiveZoneChange"},exportAs:["tuiActiveZone"]}),Ya([ll],e.prototype,"setZone",null),e})(),b4=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();var zE=(()=>{class e{constructor(n,r){this.focusable=n,this.el=r}get element(){var n;return((n=this.focusable)===null||n===void 0?void 0:n.nativeFocusableElement)||this.el.nativeElement}get isTextFieldElement(){return this.element.matches("input, textarea, [contenteditable]")}}return e.\u0275fac=function(n){ph()},e.\u0275dir=$({type:e}),e})(),nR=1e3,rR=".ng-animating",iR=(()=>{class e extends zE{constructor(n,r,i){super(n,r),this.animationFrame$=i}setFocus(){this.isTextFieldElement?_d(ht(nR),this.animationFrame$.pipe(br(Mo),w(()=>this.element.closest(rR)),Id(Boolean),Ke(1))).subscribe(()=>this.element.focus({preventScroll:!0})):this.element.focus({preventScroll:!0})}}return e.\u0275fac=function(n){return new(n||e)(y(ta,10),y(X),y(wn))},e.\u0275dir=$({type:e,features:[$e]}),e})(),oR=["type","inputMode","autocomplete","accept","min","max","step","pattern","size","maxlength"],sR=(()=>{class e extends zE{constructor(n,r,i,o,s){super(n,r),this.renderer=i,this.zone=o,this.win=s,this.patchCssStyles()}setFocus(){this.isTextFieldElement?this.zone.runOutsideAngular(()=>this.iosWebkitAutofocus()):this.element.focus({preventScroll:!0})}iosWebkitAutofocus(){var n;let r=this.makeFakeInput(),i=this.getDurationTimeBeforeFocus(),o=0,s=0,a=()=>r.focus({preventScroll:!0}),c=()=>{clearTimeout(o),o=this.win.setTimeout(()=>{clearTimeout(s),r.removeEventListener("blur",a),r.removeEventListener("focus",c),s=this.win.setTimeout(()=>{this.element.focus({preventScroll:!1}),r.remove()},i)})};r.addEventListener("blur",a,{once:!0}),r.addEventListener("focus",c),this.insideDialog()?this.win.document.body.appendChild(r):(n=this.element.parentElement)===null||n===void 0||n.appendChild(r),r.focus({preventScroll:!0})}makeFakeInput(){let n=this.renderer.createElement("input"),r=this.element.getBoundingClientRect();return this.patchFakeInputFromFocusableElement(n),n.style.height=xo(r.height),n.style.width=xo(r.width/2),n.style.position="fixed",n.style.zIndex="-99999999",n.style.caretColor="transparent",n.style.border="none",n.style.outline="none",n.style.color="transparent",n.style.background="transparent",n.style.cursor="none",n.style.fontSize=xo(16),n.style.top=xo(r.top),n.style.left=xo(r.left),n}getDurationTimeBeforeFocus(){return parseFloat(this.win.getComputedStyle(this.element).getPropertyValue("--tui-duration"))||0}insideDialog(){return!!this.element.closest("tui-dialog")}patchCssStyles(){[this.win.document.documentElement,this.win.document.body].forEach(n=>{n.style.setProperty("overflow","auto"),n.style.setProperty("height","100%")})}patchFakeInputFromFocusableElement(n){oR.forEach(r=>{let i=this.element.getAttribute(r);bi(i)&&n.setAttribute(r,i)})}}return e.\u0275fac=function(n){return new(n||e)(y(ta,10),y(X),y(gr),y(ue),y(fe))},e.\u0275dir=$({type:e,features:[$e]}),e})(),aR={delay:NaN},cR=Ee(aR);var GE=new D("[TUI_AUTOFOCUS_HANDLER]"),uR=[{provide:GE,useFactory:(e,t,n,r,i,o,s)=>s?new sR(e,t,r,i,o):new iR(e,t,n),deps:[[new hr,new jy,ta],X,wn,gr,ue,fe,na]},qe],WE=(()=>{class e{constructor(n,r,i){this.handler=n,this.options=r,this.destroy$=i,this.autoFocus=!0}ngAfterViewInit(){HE(this.autoFocus)&&this.focus()}focus(){Number.isNaN(this.options.delay)?Promise.resolve().then(()=>this.handler.setFocus()):ht(this.options.delay).pipe(be(this.destroy$)).subscribe(()=>this.handler.setFocus())}}return e.\u0275fac=function(n){return new(n||e)(y(GE),y(cR),y(qe,2))},e.\u0275dir=$({type:e,selectors:[["","tuiAutoFocus",""]],inputs:{autoFocus:["tuiAutoFocus","autoFocus"]},features:[ze(uR)]}),e})(),qE=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();var Hp=class{constructor(t){this.internalDirectiveInstance=t}get $implicit(){return this.internalDirectiveInstance.tuiLet}get tuiLet(){return this.internalDirectiveInstance.tuiLet}},YE=(()=>{class e{constructor(n,r){n.createEmbeddedView(r,new Hp(this))}static ngTemplateContextGuard(n,r){return!0}}return e.\u0275fac=function(n){return new(n||e)(y(Nt),y(pt))},e.\u0275dir=$({type:e,selectors:[["","tuiLet",""]],inputs:{tuiLet:"tuiLet"}}),e})(),ZE=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();var r5=(()=>{class e{constructor({nativeElement:n},r,i){this.mode="scroll",J(n,"wheel",{passive:!1}).pipe(ye(()=>this.enabled),Wn(r),be(i)).subscribe(o=>{this.processEvent(o,!!o.deltaY,o.deltaY?o.deltaY<0:o.deltaX<0)}),J(n,"touchstart",{passive:!0}).pipe(ee(({touches:o})=>{let{clientX:s,clientY:a}=o[0],c=0,u=0,l;return J(n,"touchmove",{passive:!1}).pipe(ye(()=>this.enabled),Ne(d=>{let f=d.changedTouches[0];c=s-f.clientX,u=a-f.clientY,s=f.clientX,a=f.clientY,l===void 0&&(l=Math.abs(u)>Math.abs(c)),this.processEvent(d,l,l?u<0:c<0)}))}),Wn(r),be(i)).subscribe()}get enabled(){return this.mode!=="none"}get overscrollBehavior(){return this.enabled?"contain":null}processEvent(n,r,i){var o;let{target:s,currentTarget:a,cancelable:c}=n;if(!(!c||!ku(s)||((o=s)===null||o===void 0?void 0:o.type)==="range")){if(this.mode==="all"&&(r&&!a.contains(Vu(s))||!r&&!a.contains(Vu(s,!1)))){n.preventDefault();return}if(r&&(i&&!zs(s,a,!0,!1)||!i&&!zs(s,a,!0,!0))){n.preventDefault();return}!r&&(i&&!zs(s,a,!1,!1)||!i&&!zs(s,a,!1,!0))&&n.preventDefault()}}}return e.\u0275fac=function(n){return new(n||e)(y(X),y(ue),y(qe,2))},e.\u0275dir=$({type:e,selectors:[["","tuiOverscroll",""]],hostVars:2,hostBindings:function(n,r){n&2&&Eo("overscroll-behavior",r.overscrollBehavior)},inputs:{mode:["tuiOverscroll","mode"]},features:[ze([qe])]}),e})(),i5=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();var lR=["*"],dR=(()=>{class e extends cl{}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),a5=(()=>{class e extends Bp{}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275cmp=st({type:e,selectors:[["tui-dropdown-host"]],features:[ze([{provide:cl,useExisting:dR},{provide:Bp,useExisting:e}]),$e],ngContentSelectors:lR,decls:3,vars:0,consts:[["viewContainer",""]],template:function(n,r){n&1&&(Hn(),zt(0),xs(1,null,0))},styles:['[_nghost-%COMP%]{position:relative;z-index:0;display:block;height:100%}[_nghost-%COMP%]:before{content:"";display:block;overflow:hidden}.t-position-fixed-offset[_ngcontent-%COMP%]{position:fixed;left:0;top:0;pointer-events:none;visibility:hidden;width:100%;height:100%}'],changeDetection:0}),e})(),c5=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();var $p=function(e){return e[e.Sunday=0]="Sunday",e[e.Monday=1]="Monday",e[e.Tuesday=2]="Tuesday",e[e.Wednesday=3]="Wednesday",e[e.Thursday=4]="Thursday",e[e.Friday=5]="Friday",e[e.Saturday=6]="Saturday",e}($p||{}),fR=function(e){return e[e.January=0]="January",e[e.February=1]="February",e[e.March=2]="March",e[e.April=3]="April",e[e.May=4]="May",e[e.June=5]="June",e[e.July=6]="July",e[e.August=7]="August",e[e.September=8]="September",e[e.October=9]="October",e[e.November=10]="November",e[e.December=11]="December",e}(fR||{});var sa="?v=".concat(N0);var KE=e=>e.includes(".svg#")?e:"#".concat(e),f5=()=>ep,zp={decimalLimit:1/0,decimalSeparator:",",thousandSeparator:x0,zeroPadding:!0,rounding:"truncate",decimal:"not-zero"},QE=["Spacebar","Backspace","Delete","ArrowLeft","ArrowRight","Left","Right","End","Home"];var h5="tui-scroll-into-view";var XE="tui-icon-error",p5=["bottom-left","bottom","bottom-right","top-left","top","top-right","left-top","left","left-bottom","right-top","right","right-bottom"];var h=function(e){return e.AD="AD",e.AE="AE",e.AF="AF",e.AG="AG",e.AI="AI",e.AL="AL",e.AM="AM",e.AO="AO",e.AR="AR",e.AT="AT",e.AU="AU",e.AW="AW",e.AZ="AZ",e.BA="BA",e.BB="BB",e.BD="BD",e.BE="BE",e.BF="BF",e.BG="BG",e.BH="BH",e.BI="BI",e.BJ="BJ",e.BL="BL",e.BM="BM",e.BN="BN",e.BO="BO",e.BQ="BQ",e.BR="BR",e.BS="BS",e.BT="BT",e.BW="BW",e.BY="BY",e.BZ="BZ",e.CA="CA",e.CD="CD",e.CF="CF",e.CG="CG",e.CH="CH",e.CI="CI",e.CL="CL",e.CM="CM",e.CN="CN",e.CO="CO",e.CR="CR",e.CU="CU",e.CV="CV",e.CW="CW",e.CY="CY",e.CZ="CZ",e.DE="DE",e.DJ="DJ",e.DK="DK",e.DM="DM",e.DO="DO",e.DZ="DZ",e.EC="EC",e.EE="EE",e.EG="EG",e.ER="ER",e.ES="ES",e.ET="ET",e.FI="FI",e.FJ="FJ",e.FK="FK",e.FM="FM",e.FR="FR",e.GA="GA",e.GB="GB",e.GD="GD",e.GE="GE",e.GF="GF",e.GH="GH",e.GI="GI",e.GL="GL",e.GM="GM",e.GN="GN",e.GP="GP",e.GQ="GQ",e.GR="GR",e.GT="GT",e.GW="GW",e.GY="GY",e.HK="HK",e.HN="HN",e.HR="HR",e.HT="HT",e.HU="HU",e.ID="ID",e.IE="IE",e.IL="IL",e.IN="IN",e.IQ="IQ",e.IR="IR",e.IS="IS",e.IT="IT",e.JM="JM",e.JO="JO",e.JP="JP",e.KE="KE",e.KG="KG",e.KH="KH",e.KM="KM",e.KN="KN",e.KP="KP",e.KR="KR",e.KW="KW",e.KY="KY",e.KZ="KZ",e.LA="LA",e.LB="LB",e.LC="LC",e.LI="LI",e.LK="LK",e.LR="LR",e.LS="LS",e.LT="LT",e.LU="LU",e.LV="LV",e.LY="LY",e.MA="MA",e.MC="MC",e.MD="MD",e.ME="ME",e.MF="MF",e.MG="MG",e.MK="MK",e.ML="ML",e.MM="MM",e.MN="MN",e.MO="MO",e.MQ="MQ",e.MR="MR",e.MS="MS",e.MT="MT",e.MU="MU",e.MV="MV",e.MW="MW",e.MX="MX",e.MY="MY",e.MZ="MZ",e.NA="NA",e.NC="NC",e.NE="NE",e.NG="NG",e.NI="NI",e.NL="NL",e.NO="NO",e.NP="NP",e.NZ="NZ",e.OM="OM",e.PA="PA",e.PE="PE",e.PF="PF",e.PG="PG",e.PH="PH",e.PK="PK",e.PL="PL",e.PT="PT",e.PW="PW",e.PY="PY",e.QA="QA",e.RE="RE",e.RO="RO",e.RS="RS",e.RU="RU",e.RW="RW",e.SA="SA",e.SB="SB",e.SC="SC",e.SD="SD",e.SE="SE",e.SG="SG",e.SH="SH",e.SI="SI",e.SK="SK",e.SL="SL",e.SM="SM",e.SN="SN",e.SO="SO",e.SR="SR",e.ST="ST",e.SV="SV",e.SX="SX",e.SY="SY",e.SZ="SZ",e.TC="TC",e.TD="TD",e.TG="TG",e.TH="TH",e.TJ="TJ",e.TL="TL",e.TM="TM",e.TN="TN",e.TO="TO",e.TR="TR",e.TT="TT",e.TW="TW",e.TZ="TZ",e.UA="UA",e.UG="UG",e.US="US",e.UY="UY",e.UZ="UZ",e.VC="VC",e.VE="VE",e.VG="VG",e.VN="VN",e.VU="VU",e.WS="WS",e.XK="XK",e.YE="YE",e.YT="YT",e.ZA="ZA",e.ZM="ZM",e.ZW="ZW",e}(h||{});var hR={cardNumber:["Number","Card number"],cardExpiry:["Expires","Valid through"]},pR={colorSelectorModeNames:["Solid color","Gradient"],toolbarTools:{undo:"Undo",redo:"Redo",font:"Font",fontStyle:"Font style",fontSize:"Font size",bold:"Bold",italic:"Italic",underline:"Underline",strikeThrough:"Strike through",justify:"Justify",justifyLeft:"Justify left",justifyCenter:"Justify center",justifyRight:"Justify right",justifyFull:"Justify full",list:"List",indent:"Indent",outdent:"Outdent",unorderedList:"Unordered list",orderedList:"Ordered list",quote:"Quote",foreColor:"Color",backColor:"Background color",hiliteColor:"Highlight color",clear:"Clear",link:"Link",attach:"Attach file",tex:"Insert TeX",code:"Code",image:"Insert image",insertHorizontalRule:"Insert horizontal rule",superscript:"Superscript",subscript:"Subscript",insertTable:"Insert table",insertGroup:"Insert group",hiliteGroup:"Hilite group",removeGroup:"Remove group",insertAnchor:"Insert anchor",mergeCells:"Merge cells",splitCells:"Split cells",rowsColumnsManaging:"Managing rows and columns",cellColor:"Cell color",setDetails:"Details",removeDetails:"Remove details"},editorEditLink:{urlExample:"example.com",anchorExample:"anchor"},editorTableCommands:[["Insert column before","Insert column after"],["Insert row before","Insert row after"],["Delete column","Delete row"]],editorCodeOptions:["Code in the text","Code in block"],editorFontOptions:{small:"Small",large:"Large",normal:"Normal",title:"Title",subtitle:"Subtitle"}},mR={previewTexts:{rotate:"Rotate"},zoomTexts:{zoomOut:"Zoom out",zoomIn:"Zoom in",reset:"Reset"}},gR={showHideText:"Show/Hide",paginationTexts:{pages:"Pages",linesPerPage:"Lines per page",of:"of"}},vR={[h.AD]:"Andorra",[h.AE]:"United Arab Emirates",[h.AF]:"Afghanistan",[h.AG]:"Antigua and Barbuda",[h.BL]:"Saint Barth\xE9lemy",[h.AI]:"Anguilla",[h.AL]:"Albania",[h.AM]:"Armenia",[h.AO]:"Angola",[h.AR]:"Argentina",[h.AT]:"Austria",[h.AU]:"Australia",[h.AW]:"Aruba",[h.AZ]:"Azerbaijan",[h.BA]:"Bosnia and Herzegovina",[h.BB]:"Barbados",[h.BD]:"Bangladesh",[h.BE]:"Belgium",[h.BF]:"Burkina Faso",[h.BG]:"Bulgaria",[h.BH]:"Bahrain",[h.BI]:"Burundi",[h.BJ]:"Benin",[h.GF]:"Guyana",[h.BM]:"Bermuda",[h.BN]:"Brunei Darussalam",[h.BO]:"Bolivia",[h.BQ]:"Bonaire, Sint Eustatius and Saba",[h.BR]:"Brazil",[h.BS]:"Bahamas",[h.BT]:"Bhutan",[h.BW]:"Botswana",[h.BY]:"Belarus",[h.BZ]:"Belize",[h.CA]:"Canada",[h.CD]:"Dem. Rep. Congo (Kinshasa)",[h.CF]:"Central African Republic",[h.CG]:"Congo (Brazzaville)",[h.CH]:"Switzerland",[h.CI]:"Ivory Coast",[h.CL]:"Chile",[h.CM]:"Cameroon",[h.CN]:"China",[h.CO]:"Colombia",[h.CR]:"Costa Rica",[h.CU]:"Cuba",[h.CV]:"Cape Verde",[h.CW]:"Cura\xE7ao",[h.CY]:"Cyprus",[h.CZ]:"Czech Republic",[h.DE]:"Germany",[h.DJ]:"Djibouti",[h.DK]:"Denmark",[h.DM]:"Dominica",[h.DO]:"Dominican Republic",[h.DZ]:"Algeria",[h.EC]:"Ecuador",[h.EE]:"Estonia",[h.EG]:"Egypt",[h.ER]:"Eritrea",[h.ES]:"Spain",[h.ET]:"Ethiopia",[h.FI]:"Finland",[h.FJ]:"Fiji",[h.FK]:"Falkland Islands",[h.FM]:"F.S. of Micronesia",[h.FR]:"France",[h.GA]:"Gabon",[h.GB]:"United Kingdom",[h.GD]:"Grenada",[h.GE]:"Georgia",[h.GP]:"Guadeloupe",[h.GH]:"Ghana",[h.GI]:"Gibraltar",[h.GL]:"Greenland",[h.GM]:"Gambia",[h.GN]:"Guinea",[h.MF]:"Saint-Martin",[h.GQ]:"Equatorial Guinea",[h.GR]:"Greece",[h.GT]:"Guatemala",[h.GW]:"Guinea-Bissau",[h.GY]:"Guyana",[h.HK]:"Hong Kong",[h.HN]:"Honduras",[h.HR]:"Croatia",[h.HT]:"Haiti",[h.HU]:"Hungary",[h.ID]:"Indonesia",[h.IE]:"Ireland",[h.IL]:"Israel",[h.IN]:"India",[h.IQ]:"Iraq",[h.IR]:"Iran",[h.IS]:"Iceland",[h.IT]:"Italy",[h.JM]:"Jamaica",[h.JO]:"Jordan",[h.JP]:"Japan",[h.KE]:"Kenya",[h.KG]:"Kyrgyzstan",[h.KH]:"Cambodia",[h.KM]:"Comoros",[h.KN]:"Saint Kitts and Nevis",[h.KP]:"Korean PDR",[h.KR]:"Rep. Korea",[h.KW]:"Kuwait",[h.KY]:"Cayman Islands",[h.KZ]:"Kazakhstan",[h.LA]:"Laos",[h.LB]:"Lebanon",[h.LC]:"Saint Lucia",[h.LI]:"Liechtenstein",[h.LK]:"Sri Lanka",[h.LR]:"Liberia",[h.LS]:"Lesotho",[h.LT]:"Lithuania",[h.LU]:"Luxembourg",[h.LV]:"Latvia",[h.LY]:"Libya",[h.MA]:"Morocco",[h.MC]:"Monaco",[h.MD]:"Moldova",[h.ME]:"Montenegro",[h.MQ]:"Martinique",[h.MG]:"Madagascar",[h.MK]:"Rep. of North Macedonia",[h.ML]:"Mali",[h.MM]:"Burma (Myanmar)",[h.MN]:"Mongolia",[h.MO]:"Macau",[h.RE]:"R\xE9union",[h.MR]:"Mauritania",[h.MS]:"Montserrat",[h.MT]:"Malta",[h.MU]:"Mauritius",[h.MV]:"Maldives",[h.MW]:"Malawi",[h.MX]:"Mexico",[h.MY]:"Malaysia",[h.MZ]:"Mozambique",[h.NA]:"Namibia",[h.NC]:"New Caledonia",[h.NE]:"Niger",[h.NG]:"Nigeria",[h.NI]:"Nicaragua",[h.NL]:"Netherlands",[h.NO]:"Norway",[h.NP]:"Nepal",[h.NZ]:"New Zealand",[h.OM]:"Oman",[h.PA]:"Panama",[h.PE]:"Peru",[h.PF]:"French Polynesia (Tahiti)",[h.PG]:"Papua New Guinea",[h.PH]:"Philippines",[h.PK]:"Pakistan",[h.PL]:"Poland",[h.PT]:"Portugal",[h.PW]:"Palau",[h.PY]:"Paraguay",[h.QA]:"Qatar",[h.YT]:"Mayotte",[h.RO]:"Romania",[h.RS]:"Serbia",[h.RU]:"Russia",[h.RW]:"Rwanda",[h.SA]:"Saudi Arabia",[h.SB]:"Solomon Islands",[h.SC]:"Seychelles",[h.SD]:"Sudan",[h.SE]:"Sweden",[h.SG]:"Singapore",[h.SH]:"Saint Helena",[h.SI]:"Slovenia",[h.SK]:"Slovakia",[h.SL]:"Sierra Leone",[h.SM]:"San Marino",[h.SN]:"Senegal",[h.SO]:"Somalia",[h.SR]:"Suriname",[h.ST]:"Sao Tome and Principe",[h.SV]:"El Salvador",[h.SX]:"Sint Maarten",[h.SY]:"Syrian Arab Republic",[h.SZ]:"Swaziland",[h.TC]:"Turks and Caicos",[h.TD]:"Chad",[h.TG]:"Togo",[h.TH]:"Thailand",[h.TJ]:"Tajikistan",[h.TL]:"East Timor",[h.TM]:"Turkmenistan",[h.TN]:"Tunisia",[h.TO]:"Tonga",[h.TR]:"Turkey",[h.TT]:"Trinidad and Tobago",[h.TW]:"Taiwan",[h.TZ]:"Tanzania",[h.UA]:"Ukraine",[h.UG]:"Uganda",[h.US]:"USA",[h.UY]:"Uruguay",[h.UZ]:"Uzbekistan",[h.VC]:"Saint Vincent and the Grenadines",[h.VE]:"Venezuela",[h.VG]:"British Virgin Islands",[h.VN]:"Vietnam",[h.VU]:"Vanuatu",[h.WS]:"Samoa",[h.XK]:"Kosovo",[h.YE]:"Yemen",[h.ZA]:"South Africa",[h.ZM]:"Zambia",[h.ZW]:"Zimbabwe"},yR={months:["January","February","March","April","May","June","July","August","September","October","November","December"],close:"Close",nothingFoundMessage:"Nothing found",defaultErrorMessage:"Value is invalid",spinTexts:["Previous","Next"],shortWeekDays:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],countries:vR},_R={cancel:"Cancel",done:"Done",more:"More",otherDate:"Other date...",showAll:"Show all",hide:"Hide",mobileCalendarTexts:["Choose day","Choose range","Choose days"],range:["from","to"],countTexts:["Plus","Minus"],time:{"HH:MM":"HH:MM","HH:MM:SS":"HH:MM:SS","HH:MM:SS.MSS":"HH:MM:SS.MSS"},dateTexts:{DMY:"dd.mm.yyyy",MDY:"mm.dd.yyyy",YMD:"yyyy.mm.dd"},digitalInformationUnits:["B","KiB","MiB"],passwordTexts:["Show password","Hide password"],copyTexts:["Copy","Copied"],shortCalendarMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],pagination:["Previous page","Next page"],fileTexts:{loadingError:"Upload failed",preview:"Preview",remove:"Remove"},inputFileTexts:{defaultLabelSingle:"or drop\xA0it\xA0here",defaultLabelMultiple:"or drop\xA0them\xA0here",defaultLinkSingle:"Choose a file",defaultLinkMultiple:"Choose files",maxSizeRejectionReason:"File is too large ",formatRejectionReason:"Wrong file type",drop:"Drop file here",dropMultiple:"Drop files here"},multiSelectTexts:{all:"Select all",none:"Select none"},prompt:{yes:"Yes",no:"No"}},JE=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:"english"},yR),_R),gR),hR),pR),mR);var DR=new D("[TUI_DEFAULT_LANGUAGE]",{factory:()=>JE}),ew=new D("[TUI_LANGUAGE]",{factory:()=>T(v(DR))}),w5=new D("[TUI_LANGUAGE_LOADER]"),b5=new D("[TUI_LANGUAGE_STORAGE_KEY]",{factory:()=>"tuiLanguage"});function Ti(e){return()=>v(ew).pipe(ee(t=>ti(t)?t:T(t)),w(t=>t[e]))}function ER(e){return!e||typeof getComputedStyle>"u"?!1:getComputedStyle(e).getPropertyValue("position")==="fixed"||ER(e.parentElement)}function dl({document:e,innerWidth:t}){return Math.max(e.documentElement.clientWidth||0,t||0)}var Gp='width="',Wp='height="',qp="")));if(!(r!=null&&r.includes(Gp))||!r.includes(Wp))return"".concat(n.replace(qp,'");let i=r.indexOf(Gp),o=r.indexOf(Wp),s=i+Gp.length,a=o+Wp.length,c=r.slice(s,r.indexOf('"',s)),u=r.slice(a,r.indexOf('"',a));if(!u||!c||c.includes("%")||u.includes("%")||c.includes("em")||u.includes("em"))return n.replace(qp,'').concat(n,"")}var Yp=1.5,wR=2.5;function P5(e,t=!1,n=!1,r=!1,i="m"){let o=i==="s"?0:.25,s=0;return e&&(s+=Yp+o),t&&(s+=Yp+o),n&&(s+=Yp+o),r&&(s+=wR+o),s}function fl(e){let t=e.endsWith("/")?e:"".concat(e,"/");return n=>n.startsWith("tuiIcon")?"".concat(t).concat(n,".svg").concat(sa,"#").concat(n):KE(n)}function R5(e){return e.length===1||QE.includes(e)}function F5(e,t="tui-hints-host"){var n;return!!(!((n=ju(e))===null||n===void 0)&&n.some(r=>!r.closest(t)))}function rw(e){let t=e.trim();return t.startsWith("<")&&t.endsWith(">")}function L5(e,t){return(n,r)=>{let i=n||Object.assign({},r||t);return Object.keys(e).forEach(o=>{i[o]=e[o]}),i}}var nw={xxs:0,xs:1,s:2,m:3,l:4,xl:5,xxl:6};function iw(e,t="s"){return nw[e]>nw[t]}function ow(e,{mobile:t}){return dl(e){var e,t,n;return(n=(t=(e=v(de).defaultView)===null||e===void 0?void 0:e.matchMedia)===null||t===void 0?void 0:t.call(e,"(prefers-reduced-motion: reduce)").matches)!==null&&n!==void 0?n:!1}),IR=300,Zp=ie(()=>v(CR)?0:IR),sw=ie(()=>({value:"",params:{duration:v(Zp)}})),Q5=ie(()=>TD()),SR={check:"tuiIconCheck",close:"tuiIconClose",error:"tuiIconAlertCircle",more:"tuiIconChevronRight"},hl=Ee(SR);var X5=new D("[TUI_DATA_LIST_ACCESSOR]");var MR=new D("[TUI_DATA_LIST_HOST]");function J5(e){return{provide:MR,useExisting:e}}var eq=Ee(e=>e.isWeekend?"weekend":"weekday"),tq=new D("[TUI_DOCUMENT_OR_SHADOW_ROOT]"),nq=new D("[TUI_ELEMENT_REF]"),TR=Ee($p.Monday),rq=ie(Ti("months")),pl=ie(Ti("close")),iq=ie(Ti("nothingFoundMessage")),oq=ie(Ti("defaultErrorMessage")),sq=ie(Ti("spinTexts")),AR=ie(Ti("shortWeekDays")),ml="assets/taiga-ui/icons",Kp=Ee(ml),aw=Ee({}),cw=ie(()=>fl(v(Kp))),Qp=Ee({mobile:768,desktopSmall:1024,desktopLarge:1280}),Xp=ie(()=>{let e=v(fe),t=v(Qp);return J(e,"resize").pipe(Et(),_e(null),w(()=>ow(e,t)),Ue(),qn(v(ue)))}),aq=new D("[TUI_LEGACY_MASK]"),Fo=new D("[TUI_MODE]"),OR={info:"tuiIconInfo",success:"tuiIconCheckCircle",error:"tuiIconXCircle",warning:"tuiIconAlertCircle",neutral:"tuiIconInfo"},xR={autoClose:3e3,label:"",status:"info",hasCloseButton:!0,icon:({$implicit:e})=>OR[e],size:"m",hasIcon:!0,defaultAutoCloseTime:3e3},cq=Ee(xR);var uq=Ee(zp);var lq=Ee(T(Object.assign(Object.assign({},zp),{decimalLimit:NaN}))),dq=new D("[TUI_OPTION_CONTENT]");var NR=e=>{let t=e.length-1;return[e[t],...e.slice(0,t)]},fq=ie(()=>{let e=v(TR);return v(AR).pipe(w(NR),w(t=>[...t.slice(e),...t.slice(0,e)]))}),gl=new D("[TUI_SANITIZER]");var hq=ie(()=>{let e=v(de);return xe(J(e,"selectionchange"),J(e,"mouseup"),J(e,"mousedown").pipe(ee(()=>J(e,"mousemove").pipe(be(J(e,"mouseup"))))),J(e,"keydown"),J(e,"keyup")).pipe(Et())}),pq=Ee({decrement:"tuiIconChevronLeft",increment:"tuiIconChevronRight"}),uw=Ee(Uu),lw=Ee(Qe),mq=Ee(aa.Textfield),PR=new D("[TUI_TEXTFIELD_HOST]");function gq(e){return{provide:PR,useExisting:e}}var vq=Ee("Taiga"),yq=new D("[TUI_VALUE_ACCESSOR]"),_q=ie(()=>{let e=v(fe);return{type:"viewport",getClientRect(){return{top:0,left:0,right:e.innerWidth,bottom:e.innerHeight,width:e.innerWidth,height:e.innerHeight}}}});var vl=class extends N{};function Tq(e){return{provide:vl,multi:!0,useExisting:e}}var yl=class{};function Aq(e){return{provide:yl,multi:!0,useExisting:e}}var Oq=(()=>{class e{constructor(n,r,i){this.destroy$=n,this.drivers=r,this.vehicles=i}ngOnInit(){let n=this.vehicles.find(({type:r})=>r===this.type);xe(...this.drivers.filter(({type:r})=>r===this.type)).pipe(Ue(),be(this.destroy$)).subscribe(r=>{n==null||n.toggle(r)})}}return e.\u0275fac=function(n){return new(n||e)(y(qe,2),y(vl),y(yl))},e.\u0275dir=$({type:e}),e})(),xq=(()=>{class e{constructor(n){this.host=n}get readOnly(){return this.host.readOnly}get disabled(){return this.host.computedDisabled}get invalid(){return this.host.computedInvalid}get focusable(){return this.host.computedFocusable}get inputMode(){return"text"}get value(){var n;return((n=this.host.value)===null||n===void 0?void 0:n.toString())||""}process(n){}}return e.\u0275fac=function(n){return new(n||e)(y(ia))},e.\u0275dir=$({type:e}),e})(),Ai=class{};function Nq(e){return{provide:Ai,deps:[[new pr,Ai]],useFactory:t=>t.find(n=>n.type===e)}}function Pq(e){return{provide:Ai,multi:!0,useExisting:e}}var ca=class{};function Rq(e,t){return{provide:ca,deps:[[new pr,ca],t],useFactory:RR(e)}}function RR(e){return(t,n)=>t.find(r=>r!==n&&r.type===e)||n}function Fq(e){return{provide:ca,multi:!0,useExisting:e}}var oe="primary",ba=Symbol("RouteTitle"),rm=class{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(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 Uo(e){return new rm(e)}function FR(e,t,n){let r=n.path.split("/");if(r.length>e.length||n.pathMatch==="full"&&(t.hasChildren()||r.lengthr[o]===i)}else return e===t}function vw(e){return e.length>0?e[e.length-1]:null}function Br(e){return ti(e)?e:xr(e)?Oe(Promise.resolve(e)):T(e)}var kR={exact:_w,subset:Dw},yw={exact:jR,subset:VR,ignored:()=>!0};function dw(e,t,n){return kR[n.paths](e.root,t.root,n.matrixParams)&&yw[n.queryParams](e.queryParams,t.queryParams)&&!(n.fragment==="exact"&&e.fragment!==t.fragment)}function jR(e,t){return Zn(e,t)}function _w(e,t,n){if(!xi(e.segments,t.segments)||!El(e.segments,t.segments,n)||e.numberOfChildren!==t.numberOfChildren)return!1;for(let r in t.children)if(!e.children[r]||!_w(e.children[r],t.children[r],n))return!1;return!0}function VR(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>gw(e[n],t[n]))}function Dw(e,t,n){return Ew(e,t,t.segments,n)}function Ew(e,t,n,r){if(e.segments.length>n.length){let i=e.segments.slice(0,n.length);return!(!xi(i,n)||t.hasChildren()||!El(i,n,r))}else if(e.segments.length===n.length){if(!xi(e.segments,n)||!El(e.segments,n,r))return!1;for(let i in t.children)if(!e.children[i]||!Dw(e.children[i],t.children[i],r))return!1;return!0}else{let i=n.slice(0,e.segments.length),o=n.slice(e.segments.length);return!xi(e.segments,i)||!El(e.segments,i,r)||!e.children[oe]?!1:Ew(e.children[oe],t,o,r)}}function El(e,t,n){return t.every((r,i)=>yw[n](e[i].parameters,r.parameters))}var Vr=class{constructor(t=new Ie([],{}),n={},r=null){this.root=t,this.queryParams=n,this.fragment=r}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Uo(this.queryParams)),this._queryParamMap}toString(){return HR.serialize(this)}},Ie=class{constructor(t,n){this.segments=t,this.children=n,this.parent=null,Object.values(n).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return wl(this)}},Oi=class{constructor(t,n){this.path=t,this.parameters=n}get parameterMap(){return this._parameterMap||(this._parameterMap=Uo(this.parameters)),this._parameterMap}toString(){return bw(this)}};function UR(e,t){return xi(e,t)&&e.every((n,r)=>Zn(n.parameters,t[r].parameters))}function xi(e,t){return e.length!==t.length?!1:e.every((n,r)=>n.path===t[r].path)}function BR(e,t){let n=[];return Object.entries(e.children).forEach(([r,i])=>{r===oe&&(n=n.concat(t(i,r)))}),Object.entries(e.children).forEach(([r,i])=>{r!==oe&&(n=n.concat(t(i,r)))}),n}var Am=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>new Cl)(),providedIn:"root"});let e=t;return e})(),Cl=class{parse(t){let n=new sm(t);return new Vr(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(t){let n="/".concat(ua(t.root,!0)),r=GR(t.queryParams),i=typeof t.fragment=="string"?"#".concat($R(t.fragment)):"";return"".concat(n).concat(r).concat(i)}},HR=new Cl;function wl(e){return e.segments.map(t=>bw(t)).join("/")}function ua(e,t){if(!e.hasChildren())return wl(e);if(t){let n=e.children[oe]?ua(e.children[oe],!1):"",r=[];return Object.entries(e.children).forEach(([i,o])=>{i!==oe&&r.push("".concat(i,":").concat(ua(o,!1)))}),r.length>0?"".concat(n,"(").concat(r.join("//"),")"):n}else{let n=BR(e,(r,i)=>i===oe?[ua(e.children[oe],!1)]:["".concat(i,":").concat(ua(r,!1))]);return Object.keys(e.children).length===1&&e.children[oe]!=null?"".concat(wl(e),"/").concat(n[0]):"".concat(wl(e),"/(").concat(n.join("//"),")")}}function ww(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function _l(e){return ww(e).replace(/%3B/gi,";")}function $R(e){return encodeURI(e)}function om(e){return ww(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function bl(e){return decodeURIComponent(e)}function fw(e){return bl(e.replace(/\+/g,"%20"))}function bw(e){return"".concat(om(e.path)).concat(zR(e.parameters))}function zR(e){return Object.keys(e).map(t=>";".concat(om(t),"=").concat(om(e[t]))).join("")}function GR(e){let t=Object.keys(e).map(n=>{let r=e[n];return Array.isArray(r)?r.map(i=>"".concat(_l(n),"=").concat(_l(i))).join("&"):"".concat(_l(n),"=").concat(_l(r))}).filter(n=>!!n);return t.length?"?".concat(t.join("&")):""}var WR=/^[^\/()?;#]+/;function Jp(e){let t=e.match(WR);return t?t[0]:""}var qR=/^[^\/()?;=#]+/;function YR(e){let t=e.match(qR);return t?t[0]:""}var ZR=/^[^=?&#]+/;function KR(e){let t=e.match(ZR);return t?t[0]:""}var QR=/^[^&#]+/;function XR(e){let t=e.match(QR);return t?t[0]:""}var sm=class{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ie([],{}):new Ie([],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(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(n).length>0)&&(r[oe]=new Ie(t,n)),r}parseSegment(){let t=Jp(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new C(4009,!1);return this.capture(t),new Oi(bl(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let n=YR(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let i=Jp(this.remaining);i&&(r=i,this.capture(r))}t[bl(n)]=bl(r)}parseQueryParam(t){let n=KR(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let s=XR(this.remaining);s&&(r=s,this.capture(r))}let i=fw(n),o=fw(r);if(t.hasOwnProperty(i)){let s=t[i];Array.isArray(s)||(s=[s],t[i]=s),s.push(o)}else t[i]=o}parseParens(t){let n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=Jp(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new C(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=oe);let s=this.parseChildren();n[o]=Object.keys(s).length===1?s[oe]:new Ie([],s),this.consumeOptional("//")}return n}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 C(4011,!1)}};function Cw(e){return e.segments.length>0?new Ie([],{[oe]:e}):e}function Iw(e){let t={};for(let r of Object.keys(e.children)){let i=e.children[r],o=Iw(i);if(r===oe&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))t[s]=a;else(o.segments.length>0||o.hasChildren())&&(t[r]=o)}let n=new Ie(e.segments,t);return JR(n)}function JR(e){if(e.numberOfChildren===1&&e.children[oe]){let t=e.children[oe];return new Ie(e.segments.concat(t.segments),t.children)}return e}function Bo(e){return e instanceof Vr}function eF(e,t,n=null,r=null){let i=Sw(e);return Mw(i,t,n,r)}function Sw(e){let t;function n(o){let s={};for(let c of o.children){let u=n(c);s[c.outlet]=u}let a=new Ie(o.url,s);return o===e&&(t=a),a}let r=n(e.root),i=Cw(r);return t!=null?t:i}function Mw(e,t,n,r){let i=e;for(;i.parent;)i=i.parent;if(t.length===0)return em(i,i,i,n,r);let o=tF(t);if(o.toRoot())return em(i,i,new Ie([],{}),n,r);let s=nF(o,i,e),a=s.processChildren?fa(s.segmentGroup,s.index,o.commands):Aw(s.segmentGroup,s.index,o.commands);return em(i,s.segmentGroup,a,n,r)}function Il(e){return typeof e=="object"&&e!=null&&!e.outlets&&!e.segmentPath}function ma(e){return typeof e=="object"&&e!=null&&e.outlets}function em(e,t,n,r,i){let o={};r&&Object.entries(r).forEach(([c,u])=>{o[c]=Array.isArray(u)?u.map(l=>"".concat(l)):"".concat(u)});let s;e===t?s=n:s=Tw(e,t,n);let a=Cw(Iw(s));return new Vr(a,o,i)}function Tw(e,t,n){let r={};return Object.entries(e.children).forEach(([i,o])=>{o===t?r[i]=n:r[i]=Tw(o,t,n)}),new Ie(e.segments,r)}var Sl=class{constructor(t,n,r){if(this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=r,t&&r.length>0&&Il(r[0]))throw new C(4003,!1);let i=r.find(ma);if(i&&i!==vw(r))throw new C(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function tF(e){if(typeof e[0]=="string"&&e.length===1&&e[0]==="/")return new Sl(!0,0,e);let t=0,n=!1,r=e.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?n=!0:a===".."?t++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new Sl(n,t,r)}var jo=class{constructor(t,n,r){this.segmentGroup=t,this.processChildren=n,this.index=r}};function nF(e,t,n){if(e.isAbsolute)return new jo(t,!0,0);if(!n)return new jo(t,!1,NaN);if(n.parent===null)return new jo(n,!0,0);let r=Il(e.commands[0])?0:1,i=n.segments.length-1+r;return rF(n,i,e.numberOfDoubleDots)}function rF(e,t,n){let r=e,i=t,o=n;for(;o>i;){if(o-=i,r=r.parent,!r)throw new C(4005,!1);i=r.segments.length}return new jo(r,!1,i-o)}function iF(e){return ma(e[0])?e[0].outlets:{[oe]:e}}function Aw(e,t,n){if(e||(e=new Ie([],{})),e.segments.length===0&&e.hasChildren())return fa(e,t,n);let r=oF(e,t,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndexo!==oe)&&e.children[oe]&&e.numberOfChildren===1&&e.children[oe].segments.length===0){let o=fa(e.children[oe],t,n);return new Ie(e.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=Aw(e.children[o],t,s))}),Object.entries(e.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new Ie(e.segments,i)}}function oF(e,t,n){let r=0,i=t,o={match:!1,pathIndex:0,commandIndex:0};for(;i=n.length)return o;let s=e.segments[i],a=n[r];if(ma(a))break;let c="".concat(a),u=r0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!pw(c,u,s))return o;r+=2}else{if(!pw(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function am(e,t,n){let r=e.segments.slice(0,t),i=0;for(;i{typeof r=="string"&&(r=[r]),r!==null&&(t[n]=am(new Ie([],{}),0,r))}),t}function hw(e){let t={};return Object.entries(e).forEach(([n,r])=>t[n]="".concat(r)),t}function pw(e,t,n){return e==n.path&&Zn(t,n.parameters)}var ha="imperative",ln=class{constructor(t,n){this.id=t,this.url=n}},ga=class extends ln{constructor(t,n,r="imperative",i=null){super(t,n),this.type=0,this.navigationTrigger=r,this.restoredState=i}toString(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}},Ni=class extends ln{constructor(t,n,r){super(t,n),this.urlAfterRedirects=r,this.type=1}toString(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}},Ur=class extends ln{constructor(t,n,r,i){super(t,n),this.reason=r,this.code=i,this.type=2}toString(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}},Pi=class extends ln{constructor(t,n,r,i){super(t,n),this.reason=r,this.code=i,this.type=16}},va=class extends ln{constructor(t,n,r,i){super(t,n),this.error=r,this.target=i,this.type=3}toString(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}},Ml=class extends ln{constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i,this.type=4}toString(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}},cm=class extends ln{constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i,this.type=7}toString(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}},um=class extends ln{constructor(t,n,r,i,o){super(t,n),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o,this.type=8}toString(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}},lm=class extends ln{constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i,this.type=5}toString(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}},dm=class extends ln{constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i,this.type=6}toString(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}},fm=class{constructor(t){this.route=t,this.type=9}toString(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}},hm=class{constructor(t){this.route=t,this.type=10}toString(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}},pm=class{constructor(t){this.snapshot=t,this.type=11}toString(){let t=this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"";return"ChildActivationStart(path: '".concat(t,"')")}},mm=class{constructor(t){this.snapshot=t,this.type=12}toString(){let t=this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"";return"ChildActivationEnd(path: '".concat(t,"')")}},gm=class{constructor(t){this.snapshot=t,this.type=13}toString(){let t=this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"";return"ActivationStart(path: '".concat(t,"')")}},vm=class{constructor(t){this.snapshot=t,this.type=14}toString(){let t=this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"";return"ActivationEnd(path: '".concat(t,"')")}};var ya=class{},_a=class{constructor(t){this.url=t}};var ym=class{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new Pl,this.attachRef=null}},Pl=(()=>{let t=class t{constructor(){this.contexts=new Map}onChildOutletCreated(r,i){let o=this.getOrCreateContext(r);o.outlet=i,this.contexts.set(r,o)}onChildOutletDestroyed(r){let i=this.getContext(r);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let r=this.contexts;return this.contexts=new Map,r}onOutletReAttached(r){this.contexts=r}getOrCreateContext(r){let i=this.getContext(r);return i||(i=new ym,this.contexts.set(r,i)),i}getContext(r){return this.contexts.get(r)||null}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Tl=class{constructor(t){this._root=t}get root(){return this._root.value}parent(t){let n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null}children(t){let n=_m(t,this._root);return n?n.children.map(r=>r.value):[]}firstChild(t){let n=_m(t,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(t){let n=Dm(t,this._root);return n.length<2?[]:n[n.length-2].children.map(i=>i.value).filter(i=>i!==t)}pathFromRoot(t){return Dm(t,this._root).map(n=>n.value)}};function _m(e,t){if(e===t.value)return t;for(let n of t.children){let r=_m(e,n);if(r)return r}return null}function Dm(e,t){if(e===t.value)return[t];for(let n of t.children){let r=Dm(e,n);if(r.length)return r.unshift(t),r}return[]}var en=class{constructor(t,n){this.value=t,this.children=n}toString(){return"TreeNode(".concat(this.value,")")}};function ko(e){let t={};return e&&e.children.forEach(n=>t[n.value.outlet]=n),t}var Al=class extends Tl{constructor(t,n){super(t),this.snapshot=n,xm(this,t)}toString(){return this.snapshot.toString()}};function Ow(e,t){let n=aF(e,t),r=new We([new Oi("",{})]),i=new We({}),o=new We({}),s=new We({}),a=new We(""),c=new Ho(r,i,s,a,o,oe,t,n.root);return c.snapshot=n.root,new Al(new en(c,[]),n)}function aF(e,t){let n={},r={},i={},o="",s=new Da([],n,i,o,r,oe,t,null,{});return new Ol("",new en(s,[]))}var Ho=class{constructor(t,n,r,i,o,s,a,c){var u,l;this.urlSubject=t,this.paramsSubject=n,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=(l=(u=this.dataSubject)==null?void 0:u.pipe(w(d=>d[ba])))!=null?l:T(void 0),this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o}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._paramMap=this.params.pipe(w(t=>Uo(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(w(t=>Uo(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}};function Om(e,t,n="emptyOnly"){var o,s;let r,{routeConfig:i}=e;return t!==null&&(n==="always"||(i==null?void 0:i.path)===""||!t.component&&!((o=t.routeConfig)!=null&&o.loadComponent))?r={params:R(R({},t.params),e.params),data:R(R({},t.data),e.data),resolve:R(R(R(R({},e.data),t.data),i==null?void 0:i.data),e._resolvedData)}:r={params:e.params,data:e.data,resolve:R(R({},e.data),(s=e._resolvedData)!=null?s:{})},i&&Nw(i)&&(r.resolve[ba]=i.title),r}var Da=class{get title(){var t;return(t=this.data)==null?void 0:t[ba]}constructor(t,n,r,i,o,s,a,c,u){this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u}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._paramMap=Uo(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Uo(this.queryParams)),this._queryParamMap}toString(){let t=this.url.map(r=>r.toString()).join("/"),n=this.routeConfig?this.routeConfig.path:"";return"Route(url:'".concat(t,"', path:'").concat(n,"')")}},Ol=class extends Tl{constructor(t,n){super(n),this.url=t,xm(this,n)}toString(){return xw(this._root)}};function xm(e,t){t.value._routerState=e,t.children.forEach(n=>xm(e,n))}function xw(e){let t=e.children.length>0?" { ".concat(e.children.map(xw).join(", ")," } "):"";return"".concat(e.value).concat(t)}function tm(e){if(e.snapshot){let t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,Zn(t.queryParams,n.queryParams)||e.queryParamsSubject.next(n.queryParams),t.fragment!==n.fragment&&e.fragmentSubject.next(n.fragment),Zn(t.params,n.params)||e.paramsSubject.next(n.params),LR(t.url,n.url)||e.urlSubject.next(n.url),Zn(t.data,n.data)||e.dataSubject.next(n.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function Em(e,t){let n=Zn(e.params,t.params)&&UR(e.url,t.url),r=!e.parent!=!t.parent;return n&&!r&&(!e.parent||Em(e.parent,t.parent))}function Nw(e){return typeof e.title=="string"||e.title===null}var cF=(()=>{let t=class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=oe,this.activateEvents=new et,this.deactivateEvents=new et,this.attachEvents=new et,this.detachEvents=new et,this.parentContexts=v(Pl),this.location=v(Nt),this.changeDetector=v(gt),this.environmentInjector=v(rn),this.inputBinder=v(Nm,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(r){if(r.name){let{firstChange:i,previousValue:o}=r.name;if(i)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){var r;this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),(r=this.inputBinder)==null||r.unsubscribeFromRouteData(this)}isTrackedInParentContexts(r){var i;return((i=this.parentContexts.getContext(r))==null?void 0:i.outlet)===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let r=this.parentContexts.getContext(this.name);r!=null&&r.route&&(r.attachRef?this.attach(r.attachRef,r.route):this.activateWith(r.route,r.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new C(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new C(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new C(4012,!1);this.location.detach();let r=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(r.instance),r}attach(r,i){var o;this.activated=r,this._activatedRoute=i,this.location.insert(r.hostView),(o=this.inputBinder)==null||o.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(r.instance)}deactivate(){if(this.activated){let r=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(r)}}activateWith(r,i){var l;if(this.isActivated)throw new C(4013,!1);this._activatedRoute=r;let o=this.location,a=r.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,u=new wm(r,c,o.injector);this.activated=o.createComponent(a,{index:o.length,injector:u,environmentInjector:i!=null?i:this.environmentInjector}),this.changeDetector.markForCheck(),(l=this.inputBinder)==null||l.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=$({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[on]});let e=t;return e})(),wm=class{constructor(t,n,r){this.route=t,this.childContexts=n,this.parent=r}get(t,n){return t===Ho?this.route:t===Pl?this.childContexts:this.parent.get(t,n)}},Nm=new D("");function uF(e,t,n){let r=Ea(e,t._root,n?n._root:void 0);return new Al(r,t)}function Ea(e,t,n){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){let r=n.value;r._futureSnapshot=t.value;let i=lF(e,t,n);return new en(r,i)}else{if(e.shouldAttach(t.value)){let o=e.retrieve(t.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>Ea(e,a)),s}}let r=dF(t.value),i=t.children.map(o=>Ea(e,o));return new en(r,i)}}function lF(e,t,n){return t.children.map(r=>{for(let i of n.children)if(e.shouldReuseRoute(r.value,i.value.snapshot))return Ea(e,r,i);return Ea(e,r)})}function dF(e){return new Ho(new We(e.url),new We(e.params),new We(e.queryParams),new We(e.fragment),new We(e.data),e.outlet,e.component,e)}var Pw="ngNavigationCancelingError";function Rw(e,t){let{redirectTo:n,navigationBehaviorOptions:r}=Bo(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,i=Fw(!1,0,t);return i.url=n,i.navigationBehaviorOptions=r,i}function Fw(e,t,n){let r=new Error("NavigationCancelingError: "+(e||""));return r[Pw]=!0,r.cancellationCode=t,n&&(r.url=n),r}function fF(e){return Lw(e)&&Bo(e.url)}function Lw(e){return e&&e[Pw]}var hF=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=st({type:t,selectors:[["ng-component"]],standalone:!0,features:[mD],decls:1,vars:0,template:function(i,o){i&1&&Le(0,"router-outlet")},dependencies:[cF],encapsulation:2});let e=t;return e})();function pF(e,t){var n;return e.providers&&!e._injector&&(e._injector=Th(e.providers,t,"Route: ".concat(e.path))),(n=e._injector)!=null?n:t}function Pm(e){let t=e.children&&e.children.map(Pm),n=t?Ve(R({},e),{children:t}):R({},e);return!n.component&&!n.loadComponent&&(t||n.loadChildren)&&n.outlet&&n.outlet!==oe&&(n.component=hF),n}function Kn(e){return e.outlet||oe}function mF(e,t){let n=e.filter(r=>Kn(r)===t);return n.push(...e.filter(r=>Kn(r)!==t)),n}function Ca(e){var t;if(!e)return null;if((t=e.routeConfig)!=null&&t._injector)return e.routeConfig._injector;for(let n=e.parent;n;n=n.parent){let r=n.routeConfig;if(r!=null&&r._loadedInjector)return r._loadedInjector;if(r!=null&&r._injector)return r._injector}return null}var gF=(e,t,n,r)=>w(i=>(new bm(t,i.targetRouterState,i.currentRouterState,n,r).activate(e),i)),bm=class{constructor(t,n,r,i,o){this.routeReuseStrategy=t,this.futureState=n,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(t){let n=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,r,t),tm(this.futureState.root),this.activateChildRoutes(n,r,t)}deactivateChildRoutes(t,n,r){let i=ko(n);t.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(t,n,r){let i=t.value,o=n?n.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(t,n,s.children)}else this.deactivateChildRoutes(t,n,r);else o&&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),i=r&&t.value.component?r.children:n,o=ko(t);for(let s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,n){let r=n.getContext(t.value.outlet),i=r&&t.value.component?r.children:n,o=ko(t);for(let s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(t,n,r){let i=ko(n);t.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new vm(o.value.snapshot))}),t.children.length&&this.forwardEvent(new mm(t.value.snapshot))}activateRoutes(t,n,r){let i=t.value,o=n?n.value:null;if(tm(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(t,n,s.children)}else this.activateChildRoutes(t,n,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.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),tm(a.route.value),this.activateChildRoutes(t,null,s.children)}else{let a=Ca(i.snapshot);s.attachRef=null,s.route=i,s.injector=a,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(t,null,s.children)}}else this.activateChildRoutes(t,null,r)}},xl=class{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},Vo=class{constructor(t,n){this.component=t,this.route=n}};function vF(e,t,n){let r=e._root,i=t?t._root:null;return la(r,i,n,[r.value])}function yF(e){let t=e.routeConfig?e.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:e,guards:t}}function zo(e,t){let n=Symbol(),r=t.get(e,n);return r===n?typeof e=="function"&&!Hv(e)?e:t.get(e):r}function la(e,t,n,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=ko(t);return e.children.forEach(s=>{_F(s,o[s.value.outlet],n,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>pa(a,n.getContext(s),i)),i}function _F(e,t,n,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=e.value,s=t?t.value:null,a=n?n.getContext(e.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=DF(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new xl(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?la(e,t,a?a.children:null,r,i):la(e,t,n,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new Vo(a.outlet.component,s))}else s&&pa(t,a,i),i.canActivateChecks.push(new xl(r)),o.component?la(e,null,a?a.children:null,r,i):la(e,null,n,r,i);return i}function DF(e,t,n){if(typeof n=="function")return n(e,t);switch(n){case"pathParamsChange":return!xi(e.url,t.url);case"pathParamsOrQueryParamsChange":return!xi(e.url,t.url)||!Zn(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Em(e,t)||!Zn(e.queryParams,t.queryParams);case"paramsChange":default:return!Em(e,t)}}function pa(e,t,n){let r=ko(e),i=e.value;Object.entries(r).forEach(([o,s])=>{i.component?t?pa(s,t.children.getContext(o),n):pa(s,null,n):pa(s,t,n)}),i.component?t&&t.outlet&&t.outlet.isActivated?n.canDeactivateChecks.push(new Vo(t.outlet.component,i)):n.canDeactivateChecks.push(new Vo(null,i)):n.canDeactivateChecks.push(new Vo(null,i))}function Ia(e){return typeof e=="function"}function EF(e){return typeof e=="boolean"}function wF(e){return e&&Ia(e.canLoad)}function bF(e){return e&&Ia(e.canActivate)}function CF(e){return e&&Ia(e.canActivateChild)}function IF(e){return e&&Ia(e.canDeactivate)}function SF(e){return e&&Ia(e.canMatch)}function kw(e){return e instanceof ir||(e==null?void 0:e.name)==="EmptyError"}var Dl=Symbol("INITIAL_VALUE");function $o(){return ee(e=>uc(e.map(t=>t.pipe(Ke(1),_e(Dl)))).pipe(w(t=>{for(let n of t)if(n!==!0){if(n===Dl)return Dl;if(n===!1||n instanceof Vr)return n}return!0}),ye(t=>t!==Dl),Ke(1)))}function MF(e,t){return Ze(n=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=n;return s.length===0&&o.length===0?T(Ve(R({},n),{guardsResult:!0})):TF(s,r,i,e).pipe(Ze(a=>a&&EF(a)?AF(r,o,e,t):T(a)),w(a=>Ve(R({},n),{guardsResult:a})))})}function TF(e,t,n,r){return Oe(e).pipe(Ze(i=>RF(i.component,i.route,n,t,r)),pn(i=>i!==!0,!0))}function AF(e,t,n,r){return Oe(t).pipe(ni(i=>Vt(xF(i.route.parent,r),OF(i.route,r),PF(e,i.path,n),NF(e,i.route,n))),pn(i=>i!==!0,!0))}function OF(e,t){return e!==null&&t&&t(new gm(e)),T(!0)}function xF(e,t){return e!==null&&t&&t(new pm(e)),T(!0)}function NF(e,t,n){let r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||r.length===0)return T(!0);let i=r.map(o=>An(()=>{var u;let s=(u=Ca(t))!=null?u:n,a=zo(o,s),c=bF(a)?a.canActivate(t,e):Ar(s,()=>a(t,e));return Br(c).pipe(pn())}));return T(i).pipe($o())}function PF(e,t,n){let r=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>yF(s)).filter(s=>s!==null).map(s=>An(()=>{let a=s.guards.map(c=>{var f;let u=(f=Ca(s.node))!=null?f:n,l=zo(c,u),d=CF(l)?l.canActivateChild(r,e):Ar(u,()=>l(r,e));return Br(d).pipe(pn())});return T(a).pipe($o())}));return T(o).pipe($o())}function RF(e,t,n,r,i){let o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||o.length===0)return T(!0);let s=o.map(a=>{var d;let c=(d=Ca(t))!=null?d:i,u=zo(a,c),l=IF(u)?u.canDeactivate(e,t,n,r):Ar(c,()=>u(e,t,n,r));return Br(l).pipe(pn())});return T(s).pipe($o())}function FF(e,t,n,r){let i=t.canLoad;if(i===void 0||i.length===0)return T(!0);let o=i.map(s=>{let a=zo(s,e),c=wF(a)?a.canLoad(t,n):Ar(e,()=>a(t,n));return Br(c)});return T(o).pipe($o(),jw(r))}function jw(e){return Xr(Ne(t=>{if(Bo(t))throw Rw(e,t)}),w(t=>t===!0))}function LF(e,t,n,r){let i=t.canMatch;if(!i||i.length===0)return T(!0);let o=i.map(s=>{let a=zo(s,e),c=SF(a)?a.canMatch(t,n):Ar(e,()=>a(t,n));return Br(c)});return T(o).pipe($o(),jw(r))}var wa=class{constructor(t){this.segmentGroup=t||null}},Nl=class extends Error{constructor(t){super(),this.urlTree=t}};function Lo(e){return Ki(new wa(e))}function kF(e){return Ki(new C(4e3,!1))}function jF(e){return Ki(Fw(!1,3))}var Cm=class{constructor(t,n){this.urlSerializer=t,this.urlTree=n}lineralizeSegments(t,n){let r=[],i=n.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return T(r);if(i.numberOfChildren>1||!i.children[oe])return kF(t.redirectTo);i=i.children[oe]}}applyRedirectCommands(t,n,r){let i=this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),t,r);if(n.startsWith("/"))throw new Nl(i);return i}applyRedirectCreateUrlTree(t,n,r,i){let o=this.createSegmentGroup(t,n.root,r,i);return new Vr(o,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(t,n){let r={};return Object.entries(t).forEach(([i,o])=>{if(typeof o=="string"&&o.startsWith(":")){let a=o.substring(1);r[i]=n[a]}else r[i]=o}),r}createSegmentGroup(t,n,r,i){let o=this.createSegments(t,n.segments,r,i),s={};return Object.entries(n.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(t,c,r,i)}),new Ie(o,s)}createSegments(t,n,r,i){return n.map(o=>o.path.startsWith(":")?this.findPosParam(t,o,i):this.findOrReturn(o,r))}findPosParam(t,n,r){let i=r[n.path.substring(1)];if(!i)throw new C(4001,!1);return i}findOrReturn(t,n){let r=0;for(let i of n){if(i.path===t.path)return n.splice(r),i;r++}return t}},Im={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function VF(e,t,n,r,i){let o=Rm(e,t,n);return o.matched?(r=pF(t,r),LF(r,t,n,i).pipe(w(s=>s===!0?o:R({},Im)))):T(o)}function Rm(e,t,n){var a,c;if(t.path==="**")return UF(n);if(t.path==="")return t.pathMatch==="full"&&(e.hasChildren()||n.length>0)?R({},Im):{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};let i=(t.matcher||FR)(n,e,t);if(!i)return R({},Im);let o={};Object.entries((a=i.posParams)!=null?a:{}).forEach(([u,l])=>{o[u]=l.path});let s=i.consumed.length>0?R(R({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:n.slice(i.consumed.length),parameters:s,positionalParamSegments:(c=i.posParams)!=null?c:{}}}function UF(e){return{matched:!0,parameters:e.length>0?vw(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}function mw(e,t,n,r){return n.length>0&&$F(e,n,r)?{segmentGroup:new Ie(t,HF(r,new Ie(n,e.children))),slicedSegments:[]}:n.length===0&&zF(e,n,r)?{segmentGroup:new Ie(e.segments,BF(e,t,n,r,e.children)),slicedSegments:n}:{segmentGroup:new Ie(e.segments,e.children),slicedSegments:n}}function BF(e,t,n,r,i){let o={};for(let s of r)if(Rl(e,n,s)&&!i[Kn(s)]){let a=new Ie([],{});o[Kn(s)]=a}return R(R({},i),o)}function HF(e,t){let n={};n[oe]=t;for(let r of e)if(r.path===""&&Kn(r)!==oe){let i=new Ie([],{});n[Kn(r)]=i}return n}function $F(e,t,n){return n.some(r=>Rl(e,t,r)&&Kn(r)!==oe)}function zF(e,t,n){return n.some(r=>Rl(e,t,r))}function Rl(e,t,n){return(e.hasChildren()||t.length>0)&&n.pathMatch==="full"?!1:n.path===""}function GF(e,t,n,r){return Kn(e)!==r&&(r===oe||!Rl(t,n,e))?!1:Rm(t,e,n).matched}function WF(e,t,n){return t.length===0&&!e.children[n]}var Sm=class{};function qF(e,t,n,r,i,o,s="emptyOnly"){return new Mm(e,t,n,r,i,s,o).recognize()}var YF=31,Mm=class{constructor(t,n,r,i,o,s,a){this.injector=t,this.configLoader=n,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Cm(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new C(4002,"'".concat(t.segmentGroup,"'"))}recognize(){let t=mw(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(w(n=>{let r=new Da([],Object.freeze({}),Object.freeze(R({},this.urlTree.queryParams)),this.urlTree.fragment,{},oe,this.rootComponentType,null,{}),i=new en(r,n),o=new Ol("",i),s=eF(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),this.inheritParamsAndData(o._root,null),{state:o,tree:s}}))}match(t){return this.processSegmentGroup(this.injector,this.config,t,oe).pipe(hn(r=>{if(r instanceof Nl)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof wa?this.noMatchError(r):r}))}inheritParamsAndData(t,n){let r=t.value,i=Om(r,n,this.paramsInheritanceStrategy);r.params=Object.freeze(i.params),r.data=Object.freeze(i.data),t.children.forEach(o=>this.inheritParamsAndData(o,r))}processSegmentGroup(t,n,r,i){return r.segments.length===0&&r.hasChildren()?this.processChildren(t,n,r):this.processSegment(t,n,r,r.segments,i,!0).pipe(w(o=>o instanceof en?[o]:[]))}processChildren(t,n,r){let i=[];for(let o of Object.keys(r.children))o==="primary"?i.unshift(o):i.push(o);return Oe(i).pipe(ni(o=>{let s=r.children[o],a=mF(n,o);return this.processSegmentGroup(t,a,s,o)}),fc((o,s)=>(o.push(...s),o)),Er(null),Ed(),Ze(o=>{if(o===null)return Lo(r);let s=Vw(o);return ZF(s),T(s)}))}processSegment(t,n,r,i,o,s){return Oe(n).pipe(ni(a=>{var c;return this.processSegmentAgainstRoute((c=a._injector)!=null?c:t,n,a,r,i,o,s).pipe(hn(u=>{if(u instanceof wa)return T(null);throw u}))}),pn(a=>!!a),hn(a=>{if(kw(a))return WF(r,i,o)?T(new Sm):Lo(r);throw a}))}processSegmentAgainstRoute(t,n,r,i,o,s,a){return GF(r,i,o,s)?r.redirectTo===void 0?this.matchSegmentAgainstRoute(t,i,r,o,s):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,i,n,r,o,s):Lo(i):Lo(i)}expandSegmentAgainstRouteUsingRedirect(t,n,r,i,o,s){let{matched:a,consumedSegments:c,positionalParamSegments:u,remainingSegments:l}=Rm(n,i,o);if(!a)return Lo(n);i.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>YF&&(this.allowRedirects=!1));let d=this.applyRedirects.applyRedirectCommands(c,i.redirectTo,u);return this.applyRedirects.lineralizeSegments(i,d).pipe(Ze(f=>this.processSegment(t,r,n,f.concat(l),s,!1)))}matchSegmentAgainstRoute(t,n,r,i,o){let s=VF(n,r,i,t,this.urlSerializer);return r.path==="**"&&(n.children={}),s.pipe(ee(a=>{var c;return a.matched?(t=(c=r._injector)!=null?c:t,this.getChildConfig(t,r,i).pipe(ee(({routes:u})=>{var Y,B,he;let l=(Y=r._loadedInjector)!=null?Y:t,{consumedSegments:d,remainingSegments:f,parameters:p}=a,g=new Da(d,p,Object.freeze(R({},this.urlTree.queryParams)),this.urlTree.fragment,QF(r),Kn(r),(he=(B=r.component)!=null?B:r._loadedComponent)!=null?he:null,r,XF(r)),{segmentGroup:_,slicedSegments:M}=mw(n,d,f,u);if(M.length===0&&_.hasChildren())return this.processChildren(l,u,_).pipe(w(De=>De===null?null:new en(g,De)));if(u.length===0&&M.length===0)return T(new en(g,[]));let A=Kn(r)===o;return this.processSegment(l,u,_,M,A?oe:o,!0).pipe(w(De=>new en(g,De instanceof en?[De]:[])))}))):Lo(n)}))}getChildConfig(t,n,r){return n.children?T({routes:n.children,injector:t}):n.loadChildren?n._loadedRoutes!==void 0?T({routes:n._loadedRoutes,injector:n._loadedInjector}):FF(t,n,r,this.urlSerializer).pipe(Ze(i=>i?this.configLoader.loadChildren(t,n).pipe(Ne(o=>{n._loadedRoutes=o.routes,n._loadedInjector=o.injector})):jF(n))):T({routes:[],injector:t})}};function ZF(e){e.sort((t,n)=>t.value.outlet===oe?-1:n.value.outlet===oe?1:t.value.outlet.localeCompare(n.value.outlet))}function KF(e){let t=e.value.routeConfig;return t&&t.path===""}function Vw(e){let t=[],n=new Set;for(let r of e){if(!KF(r)){t.push(r);continue}let i=t.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),n.add(i)):t.push(r)}for(let r of n){let i=Vw(r.children);t.push(new en(r.value,i))}return t.filter(r=>!n.has(r))}function QF(e){return e.data||{}}function XF(e){return e.resolve||{}}function JF(e,t,n,r,i,o){return Ze(s=>qF(e,t,n,r,s.extractedUrl,i,o).pipe(w(({state:a,tree:c})=>Ve(R({},s),{targetSnapshot:a,urlAfterRedirects:c}))))}function e1(e,t){return Ze(n=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=n;if(!i.length)return T(n);let o=new Set(i.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let u of Uw(c))s.add(u);let a=0;return Oe(s).pipe(ni(c=>o.has(c)?t1(c,r,e,t):(c.data=Om(c,c.parent,e).resolve,T(void 0))),Ne(()=>a++),Ji(1),Ze(c=>a===s.size?T(n):Ae))})}function Uw(e){let t=e.children.map(n=>Uw(n)).flat();return[e,...t]}function t1(e,t,n,r){let i=e.routeConfig,o=e._resolve;return(i==null?void 0:i.title)!==void 0&&!Nw(i)&&(o[ba]=i.title),n1(o,e,t,r).pipe(w(s=>(e._resolvedData=s,e.data=Om(e,e.parent,n).resolve,null)))}function n1(e,t,n,r){let i=im(e);if(i.length===0)return T({});let o={};return Oe(i).pipe(Ze(s=>r1(e[s],t,n,r).pipe(pn(),Ne(a=>{o[s]=a}))),Ji(1),ts(o),hn(s=>kw(s)?Ae:Ki(s)))}function r1(e,t,n,r){var a;let i=(a=Ca(t))!=null?a:r,o=zo(e,i),s=o.resolve?o.resolve(t,n):Ar(i,()=>o(t,n));return Br(s)}function nm(e){return ee(t=>{let n=e(t);return n?Oe(n).pipe(w(()=>t)):T(t)})}var Bw=(()=>{let t=class t{buildTitle(r){var s;let i,o=r.root;for(;o!==void 0;)i=(s=this.getResolvedTitleForRoute(o))!=null?s:i,o=o.children.find(a=>a.outlet===oe);return i}getResolvedTitleForRoute(r){return r.data[ba]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(i1))(),providedIn:"root"});let e=t;return e})(),i1=(()=>{let t=class t extends Bw{constructor(r){super(),this.title=r}updateTitle(r){let i=this.buildTitle(r);i!==void 0&&this.title.setTitle(i)}};t.\u0275fac=function(i){return new(i||t)(I(Wh))},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Fm=new D("",{providedIn:"root",factory:()=>({})}),Lm=new D("ROUTES"),o1=(()=>{let t=class t{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=v(xh)}loadComponent(r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return T(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=Br(r.loadComponent()).pipe(w(Hw),Ne(s=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s}),wr(()=>{this.componentLoaders.delete(r)})),o=new Wi(i,()=>new Te).pipe(Gi());return this.componentLoaders.set(r,o),o}loadChildren(r,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return T({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let s=s1(i,this.compiler,r,this.onLoadEndListener).pipe(wr(()=>{this.childrenLoaders.delete(i)})),a=new Wi(s,()=>new Te).pipe(Gi());return this.childrenLoaders.set(i,a),a}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function s1(e,t,n,r){return Br(e.loadChildren()).pipe(w(Hw),Ze(i=>i instanceof gs||Array.isArray(i)?T(i):Oe(t.compileModuleAsync(i))),w(i=>{r&&r(e);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(n).injector,s=o.get(Lm,[],{optional:!0,self:!0}).flat()),{routes:s.map(Pm),injector:o}}))}function a1(e){return e&&typeof e=="object"&&"default"in e}function Hw(e){return a1(e)?e.default:e}var km=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(c1))(),providedIn:"root"});let e=t;return e})(),c1=(()=>{let t=class t{shouldProcessUrl(r){return!0}extract(r){return r}merge(r,i){return r}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),u1=new D("");var l1=(()=>{let t=class t{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Te,this.transitionAbortSubject=new Te,this.configLoader=v(o1),this.environmentInjector=v(rn),this.urlSerializer=v(Am),this.rootContexts=v(Pl),this.location=v(Fs),this.inputBindingEnabled=v(Nm,{optional:!0})!==null,this.titleStrategy=v(Bw),this.options=v(Fm,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=v(km),this.createViewTransition=v(u1,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>T(void 0),this.rootComponentType=null;let r=o=>this.events.next(new fm(o)),i=o=>this.events.next(new hm(o));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=r}complete(){var r;(r=this.transitions)==null||r.complete()}handleNavigationRequest(r){var o;let i=++this.navigationId;(o=this.transitions)==null||o.next(Ve(R(R({},this.transitions.value),r),{id:i}))}setupNavigations(r,i,o){return this.transitions=new We({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:ha,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ye(s=>s.id!==0),w(s=>Ve(R({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),ee(s=>{this.currentTransition=s;let a=!1,c=!1;return T(s).pipe(Ne(u=>{this.currentNavigation={id:u.id,initialUrl:u.rawUrl,extractedUrl:u.extractedUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?Ve(R({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),ee(u=>{var f;let l=!r.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=(f=u.extras.onSameUrlNavigation)!=null?f:r.onSameUrlNavigation;if(!l&&d!=="reload"){let p="";return this.events.next(new Pi(u.id,this.urlSerializer.serialize(u.rawUrl),p,0)),u.resolve(null),Ae}if(this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return T(u).pipe(ee(p=>{var _,M;let g=(_=this.transitions)==null?void 0:_.getValue();return this.events.next(new ga(p.id,this.urlSerializer.serialize(p.extractedUrl),p.source,p.restoredState)),g!==((M=this.transitions)==null?void 0:M.getValue())?Ae:Promise.resolve(p)}),JF(this.environmentInjector,this.configLoader,this.rootComponentType,r.config,this.urlSerializer,this.paramsInheritanceStrategy),Ne(p=>{s.targetSnapshot=p.targetSnapshot,s.urlAfterRedirects=p.urlAfterRedirects,this.currentNavigation=Ve(R({},this.currentNavigation),{finalUrl:p.urlAfterRedirects});let g=new Ml(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot);this.events.next(g)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(u.currentRawUrl)){let{id:p,extractedUrl:g,source:_,restoredState:M,extras:A}=u,Y=new ga(p,this.urlSerializer.serialize(g),_,M);this.events.next(Y);let B=Ow(g,this.rootComponentType).snapshot;return this.currentTransition=s=Ve(R({},u),{targetSnapshot:B,urlAfterRedirects:g,extras:Ve(R({},A),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=g,T(s)}else{let p="";return this.events.next(new Pi(u.id,this.urlSerializer.serialize(u.extractedUrl),p,1)),u.resolve(null),Ae}}),Ne(u=>{let l=new cm(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(l)}),w(u=>(this.currentTransition=s=Ve(R({},u),{guards:vF(u.targetSnapshot,u.currentSnapshot,this.rootContexts)}),s)),MF(this.environmentInjector,u=>this.events.next(u)),Ne(u=>{if(s.guardsResult=u.guardsResult,Bo(u.guardsResult))throw Rw(this.urlSerializer,u.guardsResult);let l=new um(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.events.next(l)}),ye(u=>u.guardsResult?!0:(this.cancelNavigationTransition(u,"",3),!1)),nm(u=>{if(u.guards.canActivateChecks.length)return T(u).pipe(Ne(l=>{let d=new lm(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(d)}),ee(l=>{let d=!1;return T(l).pipe(e1(this.paramsInheritanceStrategy,this.environmentInjector),Ne({next:()=>d=!0,complete:()=>{d||this.cancelNavigationTransition(l,"",2)}}))}),Ne(l=>{let d=new dm(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(d)}))}),nm(u=>{let l=d=>{var p;let f=[];(p=d.routeConfig)!=null&&p.loadComponent&&!d.routeConfig._loadedComponent&&f.push(this.configLoader.loadComponent(d.routeConfig).pipe(Ne(g=>{d.component=g}),w(()=>{})));for(let g of d.children)f.push(...l(g));return f};return uc(l(u.targetSnapshot.root)).pipe(Er(),Ke(1))}),nm(()=>this.afterPreactivation()),ee(()=>{var f;let{currentSnapshot:u,targetSnapshot:l}=s,d=(f=this.createViewTransition)==null?void 0:f.call(this,this.environmentInjector,u.root,l.root);return d?Oe(d).pipe(w(()=>s)):T(s)}),w(u=>{let l=uF(r.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=s=Ve(R({},u),{targetRouterState:l}),this.currentNavigation.targetRouterState=l,s}),Ne(()=>{this.events.next(new ya)}),gF(this.rootContexts,r.routeReuseStrategy,u=>this.events.next(u),this.inputBindingEnabled),Ke(1),Ne({next:u=>{var l;a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Ni(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),(l=this.titleStrategy)==null||l.updateTitle(u.targetRouterState.snapshot),u.resolve(!0)},complete:()=>{a=!0}}),be(this.transitionAbortSubject.pipe(Ne(u=>{throw u}))),wr(()=>{var u;if(!a&&!c){let l="";this.cancelNavigationTransition(s,l,1)}((u=this.currentNavigation)==null?void 0:u.id)===s.id&&(this.currentNavigation=null)}),hn(u=>{var l;if(c=!0,Lw(u))this.events.next(new Ur(s.id,this.urlSerializer.serialize(s.extractedUrl),u.message,u.cancellationCode)),fF(u)?this.events.next(new _a(u.url)):s.resolve(!1);else{this.events.next(new va(s.id,this.urlSerializer.serialize(s.extractedUrl),u,(l=s.targetSnapshot)!=null?l:void 0));try{s.resolve(r.errorHandler(u))}catch(d){s.reject(d)}}return Ae}))}))}cancelNavigationTransition(r,i,o){let s=new Ur(r.id,this.urlSerializer.serialize(r.extractedUrl),i,o);this.events.next(s),r.resolve(!1)}isUpdatingInternalState(){var r,i;return((r=this.currentTransition)==null?void 0:r.extractedUrl.toString())!==((i=this.currentTransition)==null?void 0:i.currentUrlTree.toString())}isUpdatedBrowserUrl(){var i,o;return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==((i=this.currentTransition)==null?void 0:i.extractedUrl.toString())&&!((o=this.currentTransition)!=null&&o.extras.skipLocationChange)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function d1(e){return e!==ha}var f1=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(h1))(),providedIn:"root"});let e=t;return e})(),Tm=class{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig}},h1=(()=>{let t=class t extends Tm{};t.\u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})(),t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),$w=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(p1))(),providedIn:"root"});let e=t;return e})(),p1=(()=>{let t=class t extends $w{constructor(){super(...arguments),this.location=v(Fs),this.urlSerializer=v(Am),this.options=v(Fm,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=v(km),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Vr,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Ow(this.currentUrlTree,null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){var r,i;return this.canceledNavigationResolution!=="computed"?this.currentPageId:(i=(r=this.restoredState())==null?void 0:r.\u0275routerPageId)!=null?i:this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(r){return this.location.subscribe(i=>{i.type==="popstate"&&r(i.url,i.state)})}handleRouterEvent(r,i){if(r instanceof ga)this.stateMemento=this.createStateMemento();else if(r instanceof Pi)this.rawUrlTree=i.initialUrl;else if(r instanceof Ml){if(this.urlUpdateStrategy==="eager"&&!i.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(o,i)}}else r instanceof ya?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,this.urlUpdateStrategy==="deferred"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,i))):r instanceof Ur&&(r.code===3||r.code===2)?this.restoreHistory(i):r instanceof va?this.restoreHistory(i,!0):r instanceof Ni&&(this.lastSuccessfulId=r.id,this.currentPageId=this.browserPageId)}setBrowserUrl(r,i){let o=this.urlSerializer.serialize(r);if(this.location.isCurrentPathEqualTo(o)||i.extras.replaceUrl){let s=this.browserPageId,a=R(R({},i.extras.state),this.generateNgRouterState(i.id,s));this.location.replaceState(o,"",a)}else{let s=R(R({},i.extras.state),this.generateNgRouterState(i.id,this.browserPageId+1));this.location.go(o,"",s)}}restoreHistory(r,i=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,s=this.currentPageId-o;s!==0?this.location.historyGo(s):this.currentUrlTree===r.finalUrl&&s===0&&(this.resetState(r),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetState(r),this.resetUrlToCurrentUrlTree())}resetState(r){var i;this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,(i=r.finalUrl)!=null?i:this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(r,i){return this.canceledNavigationResolution==="computed"?{navigationId:r,\u0275routerPageId:i}:{navigationId:r}}};t.\u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})(),t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),da=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(da||{});function m1(e,t){e.events.pipe(ye(n=>n instanceof Ni||n instanceof Ur||n instanceof va||n instanceof Pi),w(n=>n instanceof Ni||n instanceof Pi?da.COMPLETE:(n instanceof Ur?n.code===0||n.code===1:!1)?da.REDIRECTING:da.FAILED),ye(n=>n!==da.REDIRECTING),Ke(1)).subscribe(()=>{t()})}function g1(e){throw e}var v1={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},y1={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},zw=(()=>{let t=class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){var r,i;this.disposed=!1,this.isNgZoneEnabled=!1,this.console=v(Eu),this.stateManager=v($w),this.options=v(Fm,{optional:!0})||{},this.pendingTasks=v(wu),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=v(l1),this.urlSerializer=v(Am),this.location=v(Fs),this.urlHandlingStrategy=v(km),this._events=new Te,this.errorHandler=this.options.errorHandler||g1,this.navigated=!1,this.routeReuseStrategy=v(f1),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=(i=(r=v(Lm,{optional:!0}))==null?void 0:r.flat())!=null?i:[],this.componentInputBindingEnabled=!!v(Nm,{optional:!0}),this.eventsSubscription=new it,this.isNgZoneEnabled=v(ue)instanceof ue&&ue.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:o=>{this.console.warn(o)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let r=this.navigationTransitions.events.subscribe(i=>{try{let o=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(o!==null&&s!==null){if(this.stateManager.handleRouterEvent(i,s),i instanceof Ur&&i.code!==0&&i.code!==1)this.navigated=!0;else if(i instanceof Ni)this.navigated=!0;else if(i instanceof _a){let a=this.urlHandlingStrategy.merge(i.url,o.currentRawUrl),c={skipLocationChange:o.extras.skipLocationChange,replaceUrl:this.urlUpdateStrategy==="eager"||d1(o.source)};this.scheduleNavigation(a,ha,null,c,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}D1(i)&&this._events.next(i)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(r)}resetRootComponentType(r){this.routerState.root.component=r,this.navigationTransitions.rootComponentType=r}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),ha,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription||(this.nonRouterCurrentEntryChangeSubscription=this.stateManager.registerNonRouterCurrentEntryChangeListener((r,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(r,"popstate",i)},0)}))}navigateToSyncWithBrowser(r,i,o){let s={replaceUrl:!0},a=o!=null&&o.navigationId?o:null;if(o){let u=R({},o);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(s.state=u)}let c=this.parseUrl(r);this.scheduleNavigation(c,i,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(r){this.config=r.map(Pm),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(r,i={}){let{relativeTo:o,queryParams:s,fragment:a,queryParamsHandling:c,preserveFragment:u}=i,l=u?this.currentUrlTree.fragment:a,d=null;switch(c){case"merge":d=R(R({},this.currentUrlTree.queryParams),s);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}d!==null&&(d=this.removeEmptyProps(d));let f;try{let p=o?o.snapshot:this.routerState.snapshot.root;f=Sw(p)}catch{(typeof r[0]!="string"||!r[0].startsWith("/"))&&(r=[]),f=this.currentUrlTree.root}return Mw(f,r,d,l!=null?l:null)}navigateByUrl(r,i={skipLocationChange:!1}){let o=Bo(r)?r:this.parseUrl(r),s=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(s,ha,null,i)}navigate(r,i={skipLocationChange:!1}){return _1(r),this.navigateByUrl(this.createUrlTree(r,i),i)}serializeUrl(r){return this.urlSerializer.serialize(r)}parseUrl(r){try{return this.urlSerializer.parse(r)}catch{return this.urlSerializer.parse("/")}}isActive(r,i){let o;if(i===!0?o=R({},v1):i===!1?o=R({},y1):o=i,Bo(r))return dw(this.currentUrlTree,r,o);let s=this.parseUrl(r);return dw(this.currentUrlTree,s,o)}removeEmptyProps(r){return Object.keys(r).reduce((i,o)=>{let s=r[o];return s!=null&&(i[o]=s),i},{})}scheduleNavigation(r,i,o,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,p)=>{c=f,u=p});let d=this.pendingTasks.add();return m1(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:r,extras:s,resolve:c,reject:u,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(f=>Promise.reject(f))}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function _1(e){for(let t=0;tn.\u0275providers)])}function w1(e){return e.routerState.root}function b1(){let e=v(bt);return t=>{var o,s;let n=e.get(Nr);if(t!==n.components[0])return;let r=e.get(zw),i=e.get(C1);e.get(I1)===1&&r.initialNavigation(),(o=e.get(S1,null,se.Optional))==null||o.setUpPreloading(),(s=e.get(E1,null,se.Optional))==null||s.init(),r.resetRootComponentType(n.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var C1=new D("",{factory:()=>new Te}),I1=new D("",{providedIn:"root",factory:()=>1});var S1=new D("");var w6=(()=>{class e extends N{constructor(n,r,i){super(o=>this.stream$.subscribe(o)),this.media=n,this.ngZone=r,this.size$=i,this.sorted=Object.values(this.media).sort((o,s)=>o-s),this.invert=Object.keys(this.media).reduce((o,s)=>Object.assign(Object.assign({},o),{[this.media[s]]:s}),{}),this.stream$=this.size$.pipe(w(({width:o})=>this.sorted.find(s=>s>o)),w(o=>this.invert[o||this.sorted[this.sorted.length-1]]),Ue(),qn(this.ngZone),Wt({bufferSize:1,refCount:!0}))}}return e.\u0275fac=function(n){return new(n||e)(I(Qp),I(ue),I(kp))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Gw=(()=>{class e{constructor(n){this.locale=n}format(n){return T(new Date(n).toLocaleTimeString(this.locale,{hour:"numeric",minute:"2-digit"}))}}return e.\u0275fac=function(n){return new(n||e)(I(Ps))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),b6=(()=>{class e extends We{constructor(){super([])}add(n){this.next(this.value.concat(n))}remove(n){this.value.includes(n)&&this.next(this.value.filter(r=>r!==n))}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var C6=(()=>{class e extends N{constructor(n,r,i,o){super(s=>r.pipe(w(()=>n.nativeElement.getBoundingClientRect()),w(a=>o.getPosition(a)),Wn(i),wr(()=>o.getPosition(A0))).subscribe(s))}}return e.\u0275fac=function(n){return new(n||e)(I(X),I(wn),I(ue),I(Ai))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})();var Ww=(()=>{class e{constructor(n,r,i){this.tuiSanitizer=n,this.sanitizer=r,this.originals={},this.items$=new We(new Map),this.define(i)}define(n){let{value:r}=this.items$;Object.keys(n).forEach(i=>{this.defineIcon(i,n[i],r)}),this.items$.next(r)}getOriginal(n){return this.originals[n]||null}defineIcon(n,r,i){if(i.has(n))return;let o=this.parseSrc(n,r);o&&(i.set(n,o),this.originals=Object.assign(Object.assign({},this.originals),{[n]:r}))}parseSrc(n,r){return this.sanitize(tw(r,n))}sanitize(n){return this.sanitizer.bypassSecurityTrustHtml((this.tuiSanitizer?this.tuiSanitizer.sanitize(mt.HTML,n):this.sanitizer.sanitize(mt.HTML,n))||"")}}return e.\u0275fac=function(n){return new(n||e)(I(gl,8),I(Us),I(aw))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),I6=(()=>{class e{constructor(n,r){this.win=n,this.isWebkit=r}correct(n){var r,i,o,s;return this.isWebkit?[n[0]+((i=(r=this.win.visualViewport)===null||r===void 0?void 0:r.offsetTop)!==null&&i!==void 0?i:0),n[1]+((s=(o=this.win.visualViewport)===null||o===void 0?void 0:o.offsetLeft)!==null&&s!==void 0?s:0)]:n}}return e.\u0275fac=function(n){return new(n||e)(I(fe),I(kE))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function T1(e,t){if(e&1&&Le(0,"div",3),e&2){let n=me().tuiLet;U("innerHTML",n,yo)}}function A1(e,t){if(e&1){let n=Bn();Cs(),ge(0,"svg",4),rt("error",function(){kn(n);let i=me(2);return jn(i.onError())}),Le(1,"use"),pe()}if(e&2){let n=me(2);re(1),at("href",n.use,null,"xlink")}}function O1(e,t){if(e&1&&(Dn(0),Ce(1,T1,1,1,"div",1)(2,A1,2,1,"ng-template",null,2,bD),En()),e&2){let n=dD(3),r=me();re(1),U("ngIf",r.isInnerHTML)("ngIfElse",n)}}var x1={tuiIconAttach:"tuiIconPaperclip",tuiIconAttention:"tuiIconAlertCircle",tuiIconBackCircle:"tuiIconArrowLeftCircle",tuiIconCall:"tuiIconPhone",tuiIconCallIn:"tuiIconPhoneIncoming",tuiIconCallOut:"tuiIconPhoneOutgoing",tuiIconCallTransfer:"tuiIconPhoneForwarded",tuiIconCancel:"tuiIconXCircle",tuiIconCancelCircle:"tuiIconSlash",tuiIconCard:"tuiIconCreditCard",tuiIconCards:"tuiIconCreditCard",tuiIconChartBar:"tuiIconBarChart",tuiIconChart:"tuiIconBarChart",tuiIconCheckList:"tuiIconClipboard",tuiIconCloseCircle:"tuiIconXCircle",tuiIconCollapse:"tuiIconMinimize",tuiIconComment:"tuiIconMessageSquare",tuiIconCommentFw:"tuiIconMessageForward",tuiIconCompany:"tuiIconBriefcase",tuiIconDefaultDoc:"tuiIconFile",tuiIconDesktop:"tuiIconMonitor",tuiIconDesktopOff:"tuiIconMonitorOff",tuiIconDislike:"tuiIconThumbsDown",tuiIconDone:"tuiIconCheckCircle",tuiIconDraft:"tuiIconEdit2",tuiIconEyeOpen:"tuiIconEye",tuiIconEyeClosed:"tuiIconEyeOff",tuiIconExpand:"tuiIconMaximize",tuiIconExternal:"tuiIconExternalLink",tuiIconFrame:"tuiIconLayout",tuiIconGeo:"tuiIconMapPin",tuiIconHeartFilled:"tuiIconHeart",tuiIconHide:"tuiIconEyeOff",tuiIconImg:"tuiIconImage",tuiIconInfoCircle:"tuiIconInfo",tuiIconLike:"tuiIconThumbsUp",tuiIconLockOpen:"tuiIconUnlock",tuiIconMobile:"tuiIconSmartphone",tuiIconMoreHor:"tuiIconMoreHorizontal",tuiIconMoreVer:"tuiIconMoreVertical",tuiIconMoreVert:"tuiIconMoreVertical",tuiIconPicture:"tuiIconImage",tuiIconPin:"tuiIconMapPin",tuiIconPrint:"tuiIconPrinter",tuiIconRefresh:"tuiIconRefreshCw",tuiIconRemove:"tuiIconX",tuiIconShow:"tuiIconEye",tuiIconSound:"tuiIconVolume",tuiIconSoundOff:"tuiIconVolumeX",tuiIconStarFilled:"tuiIconStar",tuiIconStop:"tuiIconSquare",tuiIconStructure:"tuiIconGrid",tuiIconTime:"tuiIconClock",tuiIconTooltip:"tuiIconHelpCircle",tuiIconViewList:"tuiIconList",tuiIconWifiOn:"tuiIconWifi"},N1={iconsPlace:ml,path:fl(ml),srcProcessor:Qe,contentProcessor:Uu,deprecated:e=>{let t=e.replace("Large","").replace("Outline",""),n=x1[t];return n?"".concat(t,"/(Large|Outline) is deprecated, use ").concat(n,"/(Large|Outline) instead"):""}},P1=ie(()=>({iconsPlace:v(Kp),path:v(cw),deprecated:N1.deprecated,srcProcessor:v(lw),contentProcessor:v(uw)})),R1=new D("[TUI_SVG_SRC_INTERCEPTORS]");var F1="Attempted to use undefined named icon",L1="External icon is missing on the given URL",k1="Failed to load external SVG",Go=(()=>{class e{constructor(n,r,i,o,s,a,c,u,l,d){this.doc=n,this.win=r,this.options=i,this.srcInterceptors=o,this.tuiSanitizer=s,this.svgService=a,this.staticRequestService=c,this.sanitizer=u,this.el=l,this.baseHref=d,this.src$=new rr(1),this.icon="",this.innerHTML$=this.src$.pipe(ee(()=>bn(this.icon)?this.isExternal?this.getExternalIcon(this.icon):T(this.getSafeHtml(this.icon)):T(this.icon)),_e(""))}set src(n){var r;let i=this.options.deprecated(String(n));this.icon=((r=this.srcInterceptors)!==null&&r!==void 0?r:[]).reduce((o,s)=>s(o,this.options),this.options.srcProcessor(n||"")),this.src$.next()}get src(){return this.icon}get use(){return bn(this.icon)?this.icon.includes(".svg#")?this.icon:this.resolveName(this.icon,this.options.path):""}get isInnerHTML(){return!bn(this.icon)||this.isSrc||this.isExternal||this.isName&&this.isShadowDOM}get isShadowDOM(){return Ao(this.el.nativeElement)!==this.doc}get isUse(){return this.use.replace(sa,"").includes(".svg#")}get isExternal(){return this.isUrl||this.isCrossDomain}get isUrl(){return bn(this.icon)&&this.icon.replace(sa,"").endsWith(".svg")}get isSrc(){return bn(this.icon)&&rw(this.icon)}get isName(){return!this.isUrl&&!this.isUse&&!this.isSrc}get isCrossDomain(){let{use:n,isUse:r,win:i}=this;return r&&n.startsWith("http")&&!!i.origin&&!n.startsWith(i.origin)}onError(n=L1){let{icon:r}=this,i=new CustomEvent(XE,{bubbles:!0,detail:{message:n,icon:r}});this.el.nativeElement.dispatchEvent(i)}resolveName(n,r){return r(n,this.baseHref)}getSafeHtml(n){return this.isSrc?this.sanitize(n):this.process(n)}process(n){let r=this.svgService.getOriginal(n);return this.isName&&!r&&n&&this.onError(F1),!this.isShadowDOM||!this.isName?"":this.sanitize(r||"")}sanitize(n){return n=this.options.contentProcessor(n),this.tuiSanitizer&&bn(n)?this.sanitizer.bypassSecurityTrustHtml(this.tuiSanitizer.sanitize(mt.HTML,n)||""):n}getExternalIcon(n){let r=n.includes(".svg")?n:this.use;return this.staticRequestService.request(r).pipe(hn(()=>(this.onError(k1),T(""))),w(i=>this.sanitize(i.replace("{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({imports:[[Rt,ZE]]}),e})();var q="{{duration}}ms ease-in-out",ve={params:{duration:300}},Ct=300,Yw=Ge("tuiHeightCollapse",[ae(":enter",[E({height:0}),G(q,E({height:"*"}))],ve),ae(":leave",[E({height:"*"}),G(q,E({height:0}))],ve)]),q6=Ge("tuiHeightCollapseList",[ae("* => *",[ct(":enter",[E({height:0}),vt(Ct,[G(q,E({height:"*"}))])],{optional:!0}),ct(":leave",[E({height:"*"}),vt(Ct,[G(q,E({height:0}))])],{optional:!0})],ve)]),Y6=Ge("tuiWidthCollapse",[ae(":enter",[E({width:0}),G(q,E({width:"*"}))],ve),ae(":leave",[E({width:"*"}),G(q,E({width:0}))],ve)]),Z6=Ge("tuiWidthCollapseList",[ae("* => *",[ct(":enter",[E({width:0}),vt(Ct,[G(q,E({width:"*"}))])],{optional:!0}),ct(":leave",[E({width:"*"}),vt(Ct,[G(q,E({width:0}))])],{optional:!0})],ve)]),Fl=Ge("tuiFadeIn",[ae(":enter",[E({opacity:0}),G(q,E({opacity:1}))],ve),ae(":leave",[E({opacity:1}),G(q,E({opacity:0}))],ve)]),K6=Ge("tuiFadeInList",[ae("* => *",[ct(":enter",[E({opacity:0}),vt(Ct,[G(q,E({opacity:1}))])],{optional:!0}),ct(":leave",[E({opacity:1}),vt(Ct,[G(q,E({opacity:0}))])],{optional:!0})],ve)]),Q6=Ge("tuiFadeInTop",[ae(":enter",[E({transform:"translateY(-10px)",opacity:0}),G(q,E({transform:"translateY(0)",opacity:1}))],ve),ae(":leave",[E({transform:"translateY(0)",opacity:1}),G(q,E({transform:"translateY(-10px)",opacity:0}))],ve)]),X6=Ge("tuiFadeInBottom",[ae(":enter",[E({transform:"translateY(10px)",opacity:0}),G(q,E({transform:"translateY(0)",opacity:1}))],ve),ae(":leave",[E({transform:"translateY(0)",opacity:1}),G(q,E({transform:"translateY(10px)",opacity:0}))],ve)]),J6=Ge("tuiDropdownAnimation",[ae(":enter",[E({transform:"translateY(-10px)",opacity:0}),G(q,E({transform:"translateY(0)",opacity:1}))],ve),ae(":leave",[E({transform:"translateY(0)",opacity:1}),G(q,E({transform:"translateY(-10px)",opacity:0}))],ve)]),eY=Ge("tuiScaleIn",[ae(":enter",[E({transform:"scale(0)"}),G(q,E({transform:"scale(1)"}))],ve),ae(":leave",[E({transform:"scale(1)"}),G(q,E({transform:"scale(0)"}))],ve)]),tY=Ge("tuiPop",[ae(":enter",[E({transform:"scale(0)"}),G(q,E({transform:"scale(1.1)"})),G(q,E({transform:"scale(1)"}))],ve),ae(":leave",[E({transform:"scale(1)"}),G(q,E({transform:"scale(1.1)"})),G(q,E({transform:"scale(0)"}))],ve)]),nY=Ge("tuiScaleInList",[ae("* => *",[ct(":enter",[E({transform:"scale(0)"}),vt(Ct,[G(q,E({transform:"scale(1)"}))])],{optional:!0}),ct(":leave",[E({transform:"scale(1)"}),vt(Ct,[G(q,E({transform:"scale(0)"}))])],{optional:!0})],ve)]),rY=Ge("tuiSlideIn",[ae("* => left",[E({transform:"translateX(-100%)"}),G(q,E({transform:"translateX(0)"}))],ve),ae("left => *",[E({transform:"translateX(0)"}),G(q,E({transform:"translateX(-100%)"}))],ve),ae("* => right",[E({transform:"translateX(100%)"}),G(q,E({transform:"translateX(0)"}))],ve),ae("right => *",[E({transform:"translateX(0)"}),G(q,E({transform:"translateX(100%)"}))],ve)]),iY=Ge("tuiSlideInLeft",[ae(":enter",[E({transform:"translateX(-100%)"}),G(q,E({transform:"translateX(0)"}))],ve),ae(":leave",[E({transform:"translateX(0)"}),G(q,E({transform:"translateX(-100%)"}))],ve)]),oY=Ge("tuiSlideInLeftList",[ae("* => *",[ct(":enter",[E({transform:"translateX(-100%)"}),vt(Ct,[G(q,E({transform:"translateX(0)"}))])],{optional:!0}),ct(":leave",[E({transform:"translateX(0)"}),vt(Ct,[G(q,E({transform:"translateX(-100%)"}))])],{optional:!0})],ve)]),Zw=Ge("tuiSlideInRight",[ae(":enter",[E({transform:"translateX(100%)"}),G(q,E({transform:"translateX(0)"}))],ve),ae(":leave",[E({transform:"translateX(0)"}),G(q,E({transform:"translateX(100%)"}))],ve)]),sY=Ge("tuiSlideInRightList",[ae("* => *",[ct(":enter",[E({transform:"translateX(100%)"}),vt(Ct,[G(q,E({transform:"translateX(0)"}))])],{optional:!0}),ct(":leave",[E({transform:"translateX(0)"}),vt(Ct,[G(q,E({transform:"translateX(100%)"}))])],{optional:!0})],ve)]),Kw=Ge("tuiSlideInTop",[ae(":enter",[E({transform:"translate3d(0,{{start}},0)"}),G(q,E({transform:"translate3d(0,{{end}},0)"}))],{params:{end:0,start:"100%",duration:300}}),ae(":leave",[E({transform:"translate3d(0,{{end}},0)"}),G(q,E({transform:"translate3d(0,{{start}},0)"}))],{params:{end:0,start:"100%",duration:300}})]),aY=Ge("tuiSlideInTopList",[ae("* => *",[ct(":enter",[E({transform:"translateY(100%)"}),vt(Ct,[G(q,E({transform:"translateY(0)"}))])],{optional:!0}),ct(":leave",[E({transform:"translateY(0)"}),vt(Ct,[G(q,E({transform:"translateY(100%)"}))])],{optional:!0})],ve)]),cY=Ge("tuiSlideInBottom",[ae(":enter",[E({transform:"translateY(-100%)"}),G(q,E({transform:"translateY(0)"}))],ve),ae(":leave",[E({transform:"translateY(0)"}),G(q,E({transform:"translateY(-100%)"}))],ve)]),uY=Ge("tuiSlideInBottomList",[ae("* => *",[ct(":enter",[E({transform:"translateY(-100%)"}),vt(Ct,[G(q,E({transform:"translateY(0)"}))])],{optional:!0}),ct(":leave",[E({transform:"translateY(0)"}),vt(Ct,[G(q,E({transform:"translateY(-100%)"}))])],{optional:!0})],ve)]);var Hr=(()=>{class e extends BE{constructor(){super(...arguments),this.mode=null}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275dir=$({type:e,selectors:[["","tuiMode",""]],inputs:{mode:["tuiMode","mode"]},features:[$e]}),e})();var yY={provide:Xp,deps:[[new pr,Xp],X],useFactory:(e,{nativeElement:t})=>(t["$.class._mobile"]=e,e)},Ll={provide:Fo,deps:[[new hr,Hr],X],useFactory:(e,{nativeElement:t})=>{let n=e?e.change$.pipe(_e(null),w(()=>e.mode)):T(null);return t["$.data-mode.attr"]=n,n}};function j1(e){return e.replace(/[a-z][A-Z]/g,t=>"".concat(t[0],"-").concat(t[1].toLowerCase()))}var Dr=class{supports(t){return t.includes(this.modifier)}addGlobalEventListener(){return()=>{}}unwrap(t){return t.split(".").filter(n=>!this.modifier.includes(n)).join(".")}},V1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier="$"}addEventListener(n,r){n[r]=n[r]||Ae;let i=this.getMethod(n,r),o=this.manager.getZone().onStable,s=Vt(o.pipe(hc(()=>n[r]===Ae)),An(()=>n[r])).subscribe(i);return()=>s.unsubscribe()}getMethod(n,r){let[,i,o,s=""]=r.split(".");return r.endsWith(".attr")?a=>a===null?n.removeAttribute(i):n.setAttribute(i,String(a)):i==="class"?a=>n.classList.toggle(o,!!a):i==="style"?a=>n.style.setProperty(j1(o),"".concat(a).concat(s)):a=>n[i]=a}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),U1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier="capture.once.passive"}supports(n){return n.includes(".")&&!this.unwrap(n).includes(".")}addEventListener(n,r,i){return n.addEventListener(this.unwrap(r),i,{once:r.includes(".once"),passive:r.includes(".passive"),capture:r.includes(".capture")}),()=>n.removeEventListener(this.unwrap(r),i)}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),B1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier=".prevent"}addEventListener(n,r,i){let o=s=>{s.preventDefault(),i(s)};return this.manager.addEventListener(n,this.unwrap(r),o)}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),H1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier=".self"}addEventListener(n,r,i){let o=s=>{s.target===s.currentTarget&&i(s)};return this.manager.addEventListener(n,this.unwrap(r),o)}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),kl=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier=".silent"}addEventListener(n,r,i){return e.ngZone=this.manager.getZone(),e.ngZone.runOutsideAngular(()=>this.manager.addEventListener(n,this.unwrap(r),i))}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),$1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier=".stop"}addEventListener(n,r,i){let o=s=>{s.stopPropagation(),i(s)};return this.manager.addEventListener(n,this.unwrap(r),o)}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),z1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier=".init"}addEventListener(){return console.warn(".init plugin is no longer necessary as of v3.1.0"),()=>{}}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),G1=[kl,V1,U1,B1,H1,$1,z1],W1=G1.map(e=>({provide:bo,multi:!0,useClass:e}));function bY(e){return(t,n,r)=>{let{value:i}=r;r.value=function(...o){e.apply(this,o)&&(kl.ngZone?kl.ngZone.run(()=>i.apply(this,o)):i.apply(this,o))}}}var CY=(()=>{class e{constructor([n]){console.assert(!(n instanceof kl)||e.initialized,"EventPluginsModule must come after BrowserModule in imports"),e.initialized=!0}}return e.initialized=!1,e.\u0275fac=function(n){return new(n||e)(I(bo))},e.\u0275mod=K({type:e}),e.\u0275inj=Z({providers:W1}),e})();var Qw=(()=>{class e{constructor(n){this.mode$=n,this.disabled=!1,this.readOnly=!1,this.hover=null,this.active=null,this.focus=!1,this.invalid=!1,this.appearance=""}get computedInvalid(){return!this.disabled&&!this.readOnly&&this.invalid}get computedFocused(){return this.focus&&!this.disabled}get interactiveState(){return this.disabled?Ro.Disabled:this.readOnly?Ro.Readonly:this.active?Ro.Active:this.hover?Ro.Hover:null}get noHover(){return this.readOnly||this.hover===!1}get noActive(){return this.readOnly||this.active===!1}}return e.\u0275fac=function(n){return new(n||e)(y(Fo))},e.\u0275dir=$({type:e,selectors:[["","tuiWrapper",""]],hostVars:10,hostBindings:function(n,r){n&1&&rt("$.data-mode.attr",function(){return r.mode$}),n&2&&(at("data-appearance",r.appearance)("data-state",r.interactiveState),Xe("_invalid",r.computedInvalid)("_focused",r.computedFocused)("_no-hover",r.noHover)("_no-active",r.noActive))},inputs:{disabled:"disabled",readOnly:"readOnly",hover:"hover",active:"active",focus:"focus",invalid:"invalid",appearance:"appearance"},features:[ze([Ll])]}),e})(),Xw=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();function Y1(e,t){if(e&1&&(Dn(0),$n(1),En()),e&2){let n=t.polymorpheusOutlet;re(1),sn(" ",n," ")}}function Z1(e,t){if(e&1&&(Cs(),by(),ge(0,"div",6),Ce(1,Y1,2,1,"ng-container",7),pe()),e&2){let n=me(2);Xe("t-text_horizontal",n.isHorizontal),re(1),U("polymorpheusOutlet",n.textContent)}}function K1(e,t){if(e&1&&(ge(0,"div",2),Cs(),ge(1,"svg",3),Le(2,"circle",4),pe(),Ce(3,Z1,2,3,"div",5),pe()),e&2){let n=me();Xe("t-loader_horizontal",n.isHorizontal)("t-loader_inherit-color",n.inheritColor),at("data-size",n.size),re(3),U("ngIf",n.hasText)}}var Q1=["*"],X1={size:"m",inheritColor:!1,overlay:!1},J1=Ee(X1);var Jw=(()=>{class e{constructor(n,r,i,o){this.doc=n,this.el=r,this.isIos=i,this.options=o,this.size=this.options.size,this.inheritColor=this.options.inheritColor,this.overlay=this.options.overlay,this.loading=!0,this.isApple=R0(this.el.nativeElement)||this.isIos}set showLoader(n){n&&this.focused&&U0(this.doc),this.loading=n}get hasOverlay(){return this.overlay&&this.loading}get hasText(){return!!this.textContent}get isHorizontal(){return!iw(this.size)}get focused(){return H0(this.el.nativeElement)}}return e.\u0275fac=function(n){return new(n||e)(y(de),y(X),y(na),y(J1))},e.\u0275cmp=st({type:e,selectors:[["tui-loader"]],hostVars:2,hostBindings:function(n,r){n&2&&Xe("_loading",r.loading)},inputs:{size:"size",inheritColor:"inheritColor",overlay:"overlay",textContent:"textContent",showLoader:"showLoader"},ngContentSelectors:Q1,decls:3,vars:7,consts:[[1,"t-content",3,"disabled"],["class","t-loader",3,"t-loader_horizontal","t-loader_inherit-color",4,"ngIf"],[1,"t-loader"],["automation-id","tui-loader__loader","focusable","false","viewBox","0 0 100 100","xmlns","http://www.w3.org/2000/svg",1,"t-icon"],["cx","50","cy","50","r","50","stroke-dasharray","314",1,"t-circle"],["automation-id","tui-loader__text","class","t-text",3,"t-text_horizontal",4,"ngIf"],["automation-id","tui-loader__text",1,"t-text"],[4,"polymorpheusOutlet"]],template:function(n,r){n&1&&(Hn(),ge(0,"fieldset",0),zt(1),pe(),Ce(2,K1,4,6,"div",1)),n&2&&(Xe("t-content_has-overlay",r.hasOverlay)("t-content_loading",r.loading),U("disabled",r.loading&&!r.isApple),at("inert",r.loading||null),re(2),U("ngIf",r.loading))},dependencies:[Pt,Lr],styles:["@keyframes _ngcontent-%COMP%_tuiLoaderDashOffset{0%{stroke-dashoffset:-66}50%{stroke-dashoffset:-314}to{stroke-dashoffset:-66}}@keyframes _ngcontent-%COMP%_tuiLoaderRotate{0%{transform:rotate(0)}50%{transform:rotate(1turn)}to{transform:rotate(3turn)}}[_nghost-%COMP%]{position:relative;display:flex;min-width:1.5rem}._loading[_nghost-%COMP%]{overflow:hidden}.t-content[_ngcontent-%COMP%]{z-index:0;min-width:100%;height:100%;padding:0;margin:0;border:none}.t-content_has-overlay[_ngcontent-%COMP%]{opacity:.3}.t-content_loading[_ngcontent-%COMP%]{pointer-events:none}.t-loader[_ngcontent-%COMP%]{position:relative;left:-100%;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:100%;flex-shrink:0;align-self:center;color:var(--tui-text-01);stroke:var(--tui-primary);animation:tuiFadeIn var(--tui-duration)}.t-loader.t-loader_horizontal[_ngcontent-%COMP%]{flex-direction:row}.t-loader.t-loader_inherit-color[_ngcontent-%COMP%]{color:inherit;stroke:currentColor}.t-loader[data-size=xs][_ngcontent-%COMP%]{font-size:.75rem;stroke-width:38}.t-loader[data-size=s][_ngcontent-%COMP%]{font-size:1rem;stroke-width:25}.t-loader[data-size=m][_ngcontent-%COMP%]{font-size:1.5rem;stroke-width:17}.t-loader[data-size=l][_ngcontent-%COMP%]{font-size:2.5rem;stroke-width:15}.t-loader[data-size=xl][_ngcontent-%COMP%]{font-size:3.5rem;stroke-width:14}.t-loader[data-size=xxl][_ngcontent-%COMP%]{font-size:5rem;stroke-width:10}.t-text[_ngcontent-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1rem;color:inherit;max-width:100%;text-align:center;stroke-width:0}.t-text_horizontal[_ngcontent-%COMP%]{margin:0 0 0 1rem}.t-icon[_ngcontent-%COMP%]{display:block;min-width:1em;max-width:1em;min-height:1em;max-height:1em;margin:.25rem -.5em;border-radius:100%;overflow:hidden;transform:scaleY(-1);animation:_ngcontent-%COMP%_tuiLoaderRotate 3s linear infinite}@supports (-webkit-hyphens: none){.t-icon[_ngcontent-%COMP%]{overflow:visible}}.t-circle[_ngcontent-%COMP%]{fill:none;stroke:inherit;stroke-width:inherit;animation:_ngcontent-%COMP%_tuiLoaderDashOffset 3s linear infinite}"],changeDetection:0}),e})(),eb=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({imports:[[Rt,kr]]}),e})();var tL=["tuiButton",""];function nL(e,t){e&1&&xs(0)}function rL(e,t){if(e&1&&Le(0,"tui-svg",8),e&2){let n=t.polymorpheusOutlet;U("src",n)}}function iL(e,t){if(e&1&&(ge(0,"span",6),Ce(1,rL,1,1,"tui-svg",7),pe()),e&2){let n=me();re(1),U("polymorpheusOutlet",n.icon)}}function oL(e,t){if(e&1&&Le(0,"tui-svg",8),e&2){let n=t.polymorpheusOutlet;U("src",n)}}function sL(e,t){if(e&1&&(ge(0,"span",9),Ce(1,oL,1,1,"tui-svg",7),pe()),e&2){let n=me();re(1),U("polymorpheusOutlet",n.iconRight)}}function aL(e,t){if(e&1&&Le(0,"tui-loader",10),e&2){let n=me();U("inheritColor",!0)("size",n.loaderSize)}}var cL=["*"],uL={size:"l",shape:null,appearance:aa.Primary},jm=Ee(uL);var Sa=(()=>{class e extends Up{constructor(n,r,i){var o;super(),this.mode=n,this.el=r,this.options=i,this.mode$=((o=this.mode)===null||o===void 0?void 0:o.change$)||Ae,this.appearance=null,this.disabled=!1,this.shape=this.options.shape,this.showLoader=!1,this.size=this.options.size,this.appearance$=this.mode$.pipe(_e(null),w(()=>this.computedAppearance),Ue())}get nativeFocusableElement(){return this.nativeDisabled?null:this.el.nativeElement}get focused(){return!this.showLoader&&Oo(this.el.nativeElement)}get loaderSize(){return this.size==="l"||this.size==="xl"?"m":"s"}get computedAppearance(){var n;return(n=this.appearance)!==null&&n!==void 0?n:this.options.appearance||""}get nativeDisabled(){return this.computedDisabled||this.showLoader?"":null}get tabIndex(){return this.focusable?0:-1}onFocused(n){this.updateFocused(n)}}return e.\u0275fac=function(n){return new(n||e)(y(Hr,8),y(X),y(jm))},e.\u0275cmp=st({type:e,selectors:[["button","tuiButton",""],["button","tuiIconButton",""],["a","tuiButton",""],["a","tuiIconButton",""]],hostVars:7,hostBindings:function(n,r){n&1&&rt("focusin",function(){return r.onFocused(!0)})("focusout",function(){return r.onFocused(!1)}),n&2&&(Sh("tabIndex",r.tabIndex),at("data-shape",r.shape)("data-size",r.size)("data-appearance",r.computedAppearance)("disabled",r.nativeDisabled),Xe("_loading",r.showLoader))},inputs:{appearance:"appearance",disabled:"disabled",icon:"icon",iconRight:"iconRight",shape:"shape",showLoader:"showLoader",size:"size"},features:[ze([sl(e),qe]),$e],attrs:tL,ngContentSelectors:cL,decls:8,vars:10,consts:[[4,"ngIf"],["tuiWrapper","",1,"t-wrapper",3,"active","appearance","disabled","hover"],[1,"t-content"],["class","t-left",4,"ngIf"],["class","t-right",4,"ngIf"],["class","t-loader",3,"inheritColor","size",4,"ngIf"],[1,"t-left"],["class","t-icon",3,"src",4,"polymorpheusOutlet"],[1,"t-icon",3,"src"],[1,"t-right"],[1,"t-loader",3,"inheritColor","size"]],template:function(n,r){n&1&&(Hn(),Ce(0,nL,1,0,"ng-container",0),an(1,"async"),ge(2,"div",1)(3,"span",2),Ce(4,iL,2,1,"span",3),zt(5),Ce(6,sL,2,1,"span",4),pe(),Ce(7,aL,1,2,"tui-loader",5),pe()),n&2&&(U("ngIf",cn(1,8,r.appearance$)),re(2),U("active",r.pseudoActive)("appearance",r.computedAppearance)("disabled",r.computedDisabled)("hover",r.pseudoHover),re(2),U("ngIf",r.icon),re(2),U("ngIf",r.iconRight),re(1),U("ngIf",r.showLoader))},dependencies:[Go,Jw,Pt,Qw,Lr,zn],styles:["[_nghost-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:inline-block;flex-shrink:0;vertical-align:top;border-radius:var(--tui-radius-m);-webkit-user-select:none;-moz-user-select:none;user-select:none;outline:none;color:inherit}[data-shape=rounded][_nghost-%COMP%]{border-radius:6.25rem}[data-size=xs][_nghost-%COMP%]{height:var(--tui-height-xs);font-weight:normal}[data-size=xs][data-shape=square][_nghost-%COMP%], [data-size=xs][tuiIconButton][_nghost-%COMP%]{width:var(--tui-height-xs)}[data-size=s][_nghost-%COMP%]{height:var(--tui-height-s);font-weight:normal}[data-size=s][data-shape=square][_nghost-%COMP%], [data-size=s][tuiIconButton][_nghost-%COMP%]{width:var(--tui-height-s)}[data-size=m][_nghost-%COMP%]{height:var(--tui-height-m);font:var(--tui-font-text-m);font-weight:bold}[data-size=m][data-shape=square][_nghost-%COMP%], [data-size=m][tuiIconButton][_nghost-%COMP%]{width:var(--tui-height-m)}[data-size=l][_nghost-%COMP%]{height:var(--tui-height-l);font:var(--tui-font-text-m);font-weight:bold}[data-size=l][data-shape=square][_nghost-%COMP%], [data-size=l][tuiIconButton][_nghost-%COMP%]{width:var(--tui-height-l)}[data-size=xl][_nghost-%COMP%]{height:3.75rem;font:var(--tui-font-text-m);font-weight:bold}[data-size=xl][data-shape=square][_nghost-%COMP%], [data-size=xl][tuiIconButton][_nghost-%COMP%]{width:3.75rem}[tuiIconButton][_nghost-%COMP%]{font-size:0!important}[tuiIconButton][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [tuiIconButton][_nghost-%COMP%] .t-right[_ngcontent-%COMP%]{margin:0!important}.t-loader[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;cursor:default}.t-left[_ngcontent-%COMP%]{margin-right:.5rem}[data-size=s][_nghost-%COMP%] .t-left[_ngcontent-%COMP%]{margin-right:.375rem}[data-size=xs][_nghost-%COMP%] .t-left[_ngcontent-%COMP%]{margin-right:.25rem}.t-right[_ngcontent-%COMP%]{margin:0 -.25rem 0 .25rem}[data-size=s][_nghost-%COMP%] .t-right[_ngcontent-%COMP%]{margin:0 -.25rem 0 .375rem}[data-size=xs][_nghost-%COMP%] .t-right[_ngcontent-%COMP%]{margin:0 -.125rem 0 .25rem}.t-icon[_ngcontent-%COMP%]{display:flex;max-width:100%;max-height:100%;align-items:center;justify-content:center}.t-left[_ngcontent-%COMP%], .t-right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem}[data-size=s][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [data-size=s][_nghost-%COMP%] .t-right[_ngcontent-%COMP%], [data-size=xs][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [data-size=xs][_nghost-%COMP%] .t-right[_ngcontent-%COMP%]{width:1rem;height:1rem}[tuiIconButton][data-appearance=icon][data-size=s][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [tuiIconButton][data-appearance=icon][data-size=s][_nghost-%COMP%] .t-right[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}.t-wrapper[_ngcontent-%COMP%]{box-sizing:border-box;cursor:pointer;isolation:isolate}[data-size=xs][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0 var(--tui-padding, .375rem)}[data-size=xs][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]:after{border-width:1px}[data-size=s][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0 var(--tui-padding, .75rem)}[data-size=m][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0 var(--tui-padding, 1.5rem)}[data-size=l][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0 var(--tui-padding, 2.25rem)}[data-size=xl][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0 var(--tui-padding, 2.5rem)}[data-shape=square][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%], [tuiIconButton][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0}.t-content[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center;justify-content:center;text-align:center}._loading[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{opacity:0}"],changeDetection:0}),e})(),jl=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({imports:[[Rt,kr,Xw,Wo,eb]]}),e})();var dL=["tuiLink",""];function fL(e,t){if(e&1&&Le(0,"tui-svg",3),e&2){let n=me();U("src",n.icon||"")}}function hL(e,t){if(e&1&&Le(0,"tui-svg",4),e&2){let n=me();U("src",n.icon||"")}}var pL=["*"],tb=(()=>{class e{constructor(n,r,i){this.el=n,this.mode$=r,this.pseudo=!1,this.icon="",this.iconAlign="right",this.iconRotated=!1,this.mode=null,this.focusVisible=!1,this.focusedChange=xe(J(this.el.nativeElement,"focusin").pipe(w(So)),J(this.el.nativeElement,"focusout").pipe(w(Rr))),i.subscribe(o=>{this.focusVisible=o})}get nativeFocusableElement(){return this.el.nativeElement}get focused(){return Oo(this.nativeFocusableElement)}get hasIcon(){return!!this.icon}get iconAlignLeft(){return this.hasIcon&&this.iconAlign==="left"}get iconAlignRight(){return this.hasIcon&&this.iconAlign==="right"}}return e.\u0275fac=function(n){return new(n||e)(y(X),y(Fo),y(jp))},e.\u0275cmp=st({type:e,selectors:[["a","tuiLink",""],["button","tuiLink",""]],hostVars:7,hostBindings:function(n,r){n&1&&rt("$.data-mode.attr",function(){return r.mode$}),n&2&&(at("data-host-mode",r.mode),Xe("_pseudo",r.pseudo)("_icon-rotated",r.iconRotated)("_focus-visible",r.focusVisible))},inputs:{pseudo:"pseudo",icon:"icon",iconAlign:"iconAlign",iconRotated:"iconRotated",mode:"mode"},exportAs:["tuiLink"],features:[ze([sl(e),jp,qe,Ll])],attrs:dL,ngContentSelectors:pL,decls:4,vars:2,consts:[["class","t-icon t-icon_left",3,"src",4,"ngIf"],[1,"t-content"],["class","t-icon t-icon_right",3,"src",4,"ngIf"],[1,"t-icon","t-icon_left",3,"src"],[1,"t-icon","t-icon_right",3,"src"]],template:function(n,r){n&1&&(Hn(),Ce(0,fL,1,1,"tui-svg",0),ge(1,"span",1),zt(2),pe(),Ce(3,hL,1,1,"tui-svg",2)),n&2&&(U("ngIf",r.iconAlignLeft),re(3),U("ngIf",r.iconAlignRight))},dependencies:[Go,Pt],styles:["[_nghost-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;color:var(--tui-link);text-align:left;text-transform:inherit;font-weight:inherit;cursor:pointer;outline:none}[_nghost-%COMP%]:hover{color:var(--tui-link-hover)}[_nghost-%COMP%]:disabled{opacity:var(--tui-disabled-opacity);cursor:default}[data-mode=onLight][_nghost-%COMP%]{color:var(--tui-text-02)}[data-mode=onLight][_nghost-%COMP%]:hover, [data-mode=onLight]._active[_nghost-%COMP%]{color:var(--tui-text-01)}[data-mode=onLight]._pseudo[_nghost-%COMP%]{color:var(--tui-text-01)}[data-mode=onLight]._pseudo[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{-webkit-text-decoration-color:rgba(0,0,0,.48);text-decoration-color:#0000007a}[data-mode=onLight]._pseudo[_nghost-%COMP%]:hover, [data-mode=onLight]._pseudo._active[_nghost-%COMP%]{color:var(--tui-text-03)}[data-mode=onLight][data-host-mode=negative][_nghost-%COMP%]{color:var(--tui-negative-night)}[data-mode=onLight][data-host-mode=negative][_nghost-%COMP%]:hover, [data-mode=onLight][data-host-mode=negative][_nghost-%COMP%]:active, [data-mode=onLight][data-host-mode=negative]._active[_nghost-%COMP%]{color:var(--tui-negative-night-hover)}[data-mode=onDark][_nghost-%COMP%]{color:var(--tui-text-03-night)}[data-mode=onDark][_nghost-%COMP%]:hover, [data-mode=onDark][_nghost-%COMP%]:active, [data-mode=onDark]._active[_nghost-%COMP%]{color:var(--tui-text-01-night)}[data-mode=onDark]._pseudo[_nghost-%COMP%]{color:var(--tui-text-01-night)}[data-mode=onDark]._pseudo[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{-webkit-text-decoration-color:rgba(255,255,255,.48);text-decoration-color:#ffffff7a}[data-mode=onDark]._pseudo[_nghost-%COMP%]:hover, [data-mode=onDark]._pseudo[_nghost-%COMP%]:active, [data-mode=onDark]._pseudo._active[_nghost-%COMP%]{color:var(--tui-text-03-night)}[data-mode=onDark][data-host-mode=positive][_nghost-%COMP%]{color:var(--tui-positive-night)}[data-mode=onDark][data-host-mode=positive][_nghost-%COMP%]:hover, [data-mode=onDark][data-host-mode=positive][_nghost-%COMP%]:active, [data-mode=onDark][data-host-mode=positive]._active[_nghost-%COMP%]{color:var(--tui-positive-night-hover)}[data-host-mode=negative][_nghost-%COMP%]{color:var(--tui-negative)}[data-host-mode=negative][_nghost-%COMP%]:hover{color:var(--tui-negative-hover)}[data-host-mode=negative]._pseudo[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{-webkit-text-decoration-color:rgba(222,76,30,.48);text-decoration-color:#de4c1e7a}[data-host-mode=positive][_nghost-%COMP%]{color:var(--tui-positive)}[data-host-mode=positive][_nghost-%COMP%]:hover{color:var(--tui-positive-hover)}[data-host-mode=positive]._pseudo[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{-webkit-text-decoration-color:rgba(58,169,129,.48);text-decoration-color:#3aa9817a}._focus-visible[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{background:var(--tui-selection)}[data-mode=onLight]._focus-visible[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{background:var(--tui-clear);color:var(--tui-text-01)}[data-mode=onDark]._focus-visible[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{background:var(--tui-clear-inverse);color:var(--tui-text-01-night)}[data-host-mode=positive]._focus-visible[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{background:var(--tui-success-bg)}[data-host-mode=negative]._focus-visible[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{background:var(--tui-error-bg)}._pseudo[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding-bottom:.15em;-webkit-text-decoration:underline dashed rgba(51,111,238,.48);text-decoration:underline dashed rgba(51,111,238,.48);text-underline-offset:.2em;text-decoration-thickness:.7px}.t-icon[_ngcontent-%COMP%]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;width:var(--tui-link-icon-size, 1.5rem);height:var(--tui-link-icon-size, 1.5rem);margin-top:-.125rem}.t-icon_left[_ngcontent-%COMP%]{margin-right:.25rem}.t-icon_right[_ngcontent-%COMP%]{margin-left:.25rem}._icon-rotated[_nghost-%COMP%] .t-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}"],changeDetection:0}),e})(),nb=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({imports:[[Rt,Wo]]}),e})();function mL(e,t){if(e&1&&(Dn(0),$n(1),En()),e&2){let n=t.polymorpheusOutlet;re(1),sn(" ",n," ")}}function gL(e,t){if(e&1&&(ge(0,"header",6),Ce(1,mL,2,1,"ng-container",3),pe()),e&2){let n=me();re(1),U("polymorpheusOutlet",n.header)("polymorpheusOutletContext",n.context)}}function vL(e,t){if(e&1){let n=Bn();Dn(0),Le(1,"div",7),ge(2,"div",8)(3,"button",9),rt("click",function(){kn(n);let i=me();return jn(i.context.$implicit.complete())}),$n(4),pe()(),En()}if(e&2){let n=t.polymorpheusOutlet,r=me(),i;re(1),U("innerHTML",n,yo),re(3),sn(" ",((i=r.context.data)==null?null:i.button)||"OK"," ")}}function yL(e,t){if(e&1){let n=Bn();ge(0,"div",10)(1,"button",11),rt("click",function(){kn(n);let i=me();return jn(i.close$.next())})("mousedown.prevent.silent",function(){return 0}),an(2,"async"),pe()()}if(e&2){let n=me();re(1),U("appearance",n.fullscreen?"secondary":"")("icon",n.icons.close)("title",cn(2,3,n.closeWord$))}}var _L={size:"m",required:!1,closeable:!0,dismissible:!0,label:"",header:""},DL=Ee(Ae),EL=Ee(_L);var wL=17,rb=(()=>{class e extends N{constructor(n,r,i){super(o=>xe(this.esc$,this.mousedown$).subscribe(o)),this.win=n,this.doc=r,this.el=i,this.esc$=J(this.doc,"keydown").pipe(ye(o=>{let s=Fr(o);return o.key==="Escape"&&!o.defaultPrevented&&(this.element.contains(s)||this.isOutside(s))})),this.mousedown$=J(this.doc,"mousedown").pipe(ye(o=>dl(this.win)-o.clientX>wL&&this.isOutside(Fr(o))),ee(()=>J(this.doc,"mouseup").pipe(Ke(1),w(Fr),ye(o=>this.isOutside(o)))))}get element(){return this.el.nativeElement}isOutside(n){return ku(n)&&(!V0(this.element,n)||n===this.element)}}return e.\u0275fac=function(n){return new(n||e)(I(fe),I(de),I(X))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),bL=new Error("Required dialog was dismissed");function ib(e){return ti(e)?e:T(e)}var CL=(()=>{class e{constructor(n,r,i,o,s,a,c,u){this.duration=n,this.isMobile=r,this.context=i,this.closeWord$=c,this.icons=u,this.animation={value:"",params:{start:"40px",duration:this.duration}},this.fullscreenAnimation={value:"",params:{start:"100vh",duration:this.duration}},this.close$=new Te,xe(this.close$.pipe(ee(()=>ib(i.closeable))),s.pipe(ee(()=>ib(i.dismissible))),a.pipe(w(So))).pipe(ye(Boolean),be(o)).subscribe(()=>{this.close()})}get size(){return this.context.size}get header(){return this.context.header}get slideInTop(){return this.fullscreen||this.isMobile?this.fullscreenAnimation:this.animation}get fullscreen(){return!this.isMobile&&(this.size==="fullscreen"||this.size==="page")}close(){this.context.required?this.context.$implicit.error(bL):this.context.$implicit.complete()}}return e.\u0275fac=function(n){return new(n||e)(y(Zp),y(Lp),y(qs),y(qe,2),y(rb),y(DL),y(pl),y(hl))},e.\u0275cmp=st({type:e,selectors:[["tui-dialog"]],hostVars:6,hostBindings:function(n,r){n&2&&(at("data-appearance",r.context.appearance)("data-size",r.size),Ns("@tuiSlideInTop",r.slideInTop)("@tuiFadeIn",r.slideInTop),Xe("_centered",r.header))},features:[ze([qe,rb])],decls:7,vars:6,consts:[["class","t-header",4,"ngIf"],[1,"t-content"],[1,"t-heading",3,"id","textContent"],[4,"polymorpheusOutlet","polymorpheusOutletContext"],[1,"t-filler"],["class","t-wrapper",4,"ngIf"],[1,"t-header"],[3,"innerHTML"],[1,"t-buttons"],["size","m","tuiAutoFocus","","tuiButton","","type","button",3,"click"],[1,"t-wrapper"],["automation-id","tui-dialog__close","shape","rounded","size","s","tuiIconButton","","type","button",1,"t-close",3,"appearance","icon","title","click","mousedown.prevent.silent"]],template:function(n,r){n&1&&(Ce(0,gL,2,2,"header",0),ge(1,"div",1),Le(2,"h2",2),ge(3,"section"),Ce(4,vL,5,2,"ng-container",3),pe()(),Le(5,"div",4),Ce(6,yL,3,5,"div",5)),n&2&&(U("ngIf",r.header),re(2),U("id",r.context.id)("textContent",r.context.label),re(2),U("polymorpheusOutlet",r.context.content)("polymorpheusOutletContext",r.context),re(2),U("ngIf",r.context.closeable))},dependencies:[Sa,Pt,Lr,WE,zn],styles:['[_nghost-%COMP%]{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1rem;border:2.5rem solid transparent}[_nghost-%COMP%]:after{position:absolute;top:0;left:0;width:100%;height:100%;content:"";border-radius:inherit;pointer-events:none;box-shadow:var(--tui-shadow-modal)}[data-size=auto][_nghost-%COMP%]{width:auto}[data-size=s][_nghost-%COMP%]{width:30rem}[data-size=s][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:1.5rem}[data-size=s][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%]{margin-bottom:.5rem;font:var(--tui-font-heading-5)}[data-size=m][_nghost-%COMP%]{width:42.5rem}[data-size=m][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%]{margin-bottom:.75rem;font:var(--tui-font-heading-4)}[data-size=l][_nghost-%COMP%]{width:55rem}[data-size=l][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%]{margin-bottom:1rem}[data-size=fullscreen][_nghost-%COMP%], [data-size=page][_nghost-%COMP%]{min-width:100vw;min-height:100%;border-radius:0;border:none;background:var(--tui-elevation-01);box-shadow:0 4rem var(--tui-elevation-01)}[data-size=fullscreen][_nghost-%COMP%] .t-content[_ngcontent-%COMP%], [data-size=page][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:3rem calc(50vw - (45rem / 2))}[data-size=fullscreen][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%], [data-size=page][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%]{margin-bottom:1rem}[data-size=page][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0}._centered[_nghost-%COMP%]{text-align:center}[_nghost-%COMP%] tui-root._mobile[data-size][_nghost-%COMP%], tui-root._mobile [data-size][_nghost-%COMP%]{min-width:100%;width:100%;max-width:100%;border-radius:0;border:none;margin:auto 0 0}[_nghost-%COMP%] tui-root._mobile[data-size][_nghost-%COMP%] .t-content[_ngcontent-%COMP%], tui-root._mobile [data-size][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:1.5rem}[_nghost-%COMP%] tui-root._mobile[data-size][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%], tui-root._mobile [data-size][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%]{margin-bottom:.5rem;font:var(--tui-font-heading-5)}.t-heading[_ngcontent-%COMP%]{margin:0;word-wrap:break-word;font:var(--tui-font-heading-3)}.t-heading[_ngcontent-%COMP%]:empty{display:none}.t-header[_ngcontent-%COMP%]{display:flex;border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden}[data-size=fullscreen][_nghost-%COMP%] tui-root._mobile[_nghost-%COMP%] .t-header[_ngcontent-%COMP%], tui-root._mobile [_nghost-%COMP%] .t-header[_ngcontent-%COMP%]{flex:1}.t-content[_ngcontent-%COMP%]{border-radius:inherit;padding:2rem;background:var(--tui-elevation-01)}.t-content[_ngcontent-%COMP%]:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-wrapper[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0;z-index:1;order:-1}.t-filler[_ngcontent-%COMP%]{flex-grow:1}.t-close[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:fixed;top:1.5rem;right:1.5rem;display:none;color:var(--tui-base-01)}.t-dialog:last-of-type[_nghost-%COMP%] .t-close[_ngcontent-%COMP%], .t-dialog:last-of-type [_nghost-%COMP%] .t-close[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%]:not([data-size="fullscreen"]):not([data-size="page"]) .t-close[_ngcontent-%COMP%]{animation:tuiFadeIn var(--tui-duration);background:rgba(104,104,104,.96)}[_nghost-%COMP%]:not([data-size="fullscreen"]):not([data-size="page"]) .t-close[_ngcontent-%COMP%]:hover{background:rgba(159,159,159,.86)}[_nghost-%COMP%]:not([data-size="fullscreen"]).ng-animating .t-close[_ngcontent-%COMP%]{display:none}tui-root._mobile[_nghost-%COMP%] .t-close[_ngcontent-%COMP%], tui-root._mobile [_nghost-%COMP%] .t-close[_ngcontent-%COMP%]{position:absolute;top:0;right:0;background:transparent!important;color:var(--tui-text-01);opacity:.5}.t-buttons[_ngcontent-%COMP%]{margin-top:1.25rem;text-align:right}'],data:{animation:[Kw,Fl]}}),e})(),IL=new Ci(CL),SL=(()=>{class e extends al{constructor(){super(...arguments),this.component=IL,this.defaultOptions=Object.assign(Object.assign({},v(EL)),{data:void 0})}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var UZ=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({providers:[LE(SL)],imports:[[kr,jl,Rt,qE]]}),e})();var ob=(()=>{class e{constructor(n){this.service=n}transform(n){return this.service.format(n.valueOf())}}return e.\u0275fac=function(n){return new(n||e)(y(Gw,16))},e.\u0275pipe=pi({name:"tuiFormatDate",type:e,pure:!0}),e})(),sb=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();function ML(e,t){if(e&1){let n=Bn();ge(0,"button",10),rt("click",function(){kn(n);let i=me();return jn(i.close.emit())}),an(1,"async"),pe()}if(e&2){let n=me();U("icon",n.icons.close)("title",cn(1,2,n.closeWord$))}}function TL(e,t){if(e&1&&(Le(0,"span",11),an(1,"async"),an(2,"tuiFormatDate")),e&2){let n=me();U("textContent",n.isString(n.timestamp)?n.timestamp:cn(1,1,cn(2,3,n.timestamp)))}}var AL=[[["img"]],[["tui-svg"]],"*",[["","tuiButton",""]],[["","tuiLink",""]]],OL=["img","tui-svg","*","[tuiButton]","[tuiLink]"];function xL(e,t){if(e&1&&Le(0,"img",7),e&2){let n=me(2);U("src",n.context.image,E_)}}function NL(e,t){if(e&1&&Le(0,"tui-svg",8),e&2){let n=me(2);Eo("color",n.context.iconColor),U("src",n.context.icon)}}function PL(e,t){if(e&1&&Le(0,"div",9),e&2){let n=t.polymorpheusOutlet;U("innerHTML",n,yo)}}function RL(e,t){if(e&1){let n=Bn();ge(0,"button",10),rt("click",function(){kn(n);let i=me(2);return jn(i.context.$implicit.next(i.context.buttons[0]))}),$n(1),pe()}if(e&2){let n=me(2);re(1),sn(" ",n.context.buttons[0]," ")}}function FL(e,t){if(e&1){let n=Bn();ge(0,"button",11),rt("click",function(){kn(n);let i=me(2);return jn(i.context.$implicit.next(i.context.buttons[i.context.buttons.length-1]))}),$n(1),pe()}if(e&2){let n=me(2);re(1),sn(" ",n.context.buttons[n.context.buttons.length-1]," ")}}function LL(e,t){if(e&1){let n=Bn();ge(0,"tui-push",1),rt("close",function(){kn(n);let i=me();return jn(i.context.$implicit.complete())}),Ce(1,xL,1,1,"img",2)(2,NL,1,3,"tui-svg",3)(3,PL,1,1,"div",4)(4,RL,2,1,"button",5)(5,FL,2,1,"button",6),pe()}if(e&2){let n=me();U("heading",n.context.heading)("timestamp",n.context.timestamp)("type",n.context.type),re(1),U("ngIf",n.context.image),re(1),U("ngIf",n.context.icon),re(1),U("polymorpheusOutlet",n.context.content),re(1),U("ngIf",n.context.buttons.length>1),re(1),U("ngIf",n.context.buttons.length)}}var kL=(()=>{class e{constructor(n,r){this.closeWord$=n,this.icons=r,this.heading="",this.type="",this.timestamp="",this.close=new et,this.isString=bn}get closeable(){return K0(this.close)}}return e.\u0275fac=function(n){return new(n||e)(y(pl),y(hl))},e.\u0275cmp=st({type:e,selectors:[["tui-push"]],inputs:{heading:"heading",type:"type",timestamp:"timestamp"},outputs:{close:"close"},ngContentSelectors:OL,decls:17,vars:4,consts:[[1,"t-image"],["appearance","","shape","rounded","size","xs","tuiIconButton","","type","button","class","t-close",3,"icon","title","click",4,"ngIf"],[1,"t-top"],[1,"t-icon"],["class","t-time",3,"textContent",4,"ngIf"],["automation-id","tui-push__heading",1,"t-heading"],[1,"t-content"],[1,"t-actions"],[1,"t-button"],[1,"t-link"],["appearance","","shape","rounded","size","xs","tuiIconButton","","type","button",1,"t-close",3,"icon","title","click"],[1,"t-time",3,"textContent"]],template:function(n,r){n&1&&(Hn(AL),ge(0,"div",0),zt(1),pe(),Ce(2,ML,2,4,"button",1),ge(3,"div",2)(4,"span",3),zt(5,1),pe(),$n(6),Ce(7,TL,3,5,"span",4),pe(),ge(8,"h3",5),$n(9),pe(),ge(10,"div",6),zt(11,2),pe(),ge(12,"div",7)(13,"span",8),zt(14,3),pe(),ge(15,"span",9),zt(16,4),pe()()),n&2&&(re(2),U("ngIf",r.closeable),re(4),sn(" ",r.type," "),re(1),U("ngIf",r.timestamp),re(2),sn(" ",r.heading,"\n"))},dependencies:[Sa,Pt,zn,ob],styles:['[_nghost-%COMP%]{position:relative;display:block;width:22.5rem;max-width:100%;box-sizing:border-box;padding:1.25rem 1.25rem .25rem;overflow:hidden;font:var(--tui-font-text-m);border-radius:var(--tui-radius-xl);background:var(--tui-elevation-02);box-shadow:var(--tui-shadow)}.t-image[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:10.625rem;overflow:hidden;margin:-1.25rem -1.25rem 1.25rem}.t-close[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem;color:#0000008a;background:rgba(242,242,242,.32);-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem)}.t-top[_ngcontent-%COMP%]{display:flex;align-items:center;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-icon[_ngcontent-%COMP%]{height:1.25rem;margin-right:.5rem;transform:scale(.833);transform-origin:top left;color:var(--tui-link)}.t-time[_ngcontent-%COMP%]:before{content:"\\2022";display:inline-block;width:1rem;text-align:center}.t-heading[_ngcontent-%COMP%]{line-height:1.25rem;font-weight:bold;margin:.75rem 0 .25rem}.t-heading[_ngcontent-%COMP%], .t-content[_ngcontent-%COMP%]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;word-break:break-word;overflow:hidden}.t-actions[_ngcontent-%COMP%]{display:flex;align-items:center;font:var(--tui-font-text-s)}.t-button[_ngcontent-%COMP%]:not(:empty){margin:.75rem .75rem .75rem 0}.t-link[_ngcontent-%COMP%]{margin:.75rem 0}.t-link[_ngcontent-%COMP%]:empty{margin:.5rem}'],changeDetection:0}),e})(),jL=(()=>{class e extends Hr{constructor(n){var r;super(),this.modeDirective=n,this.size="s",this.shape=null,this.change$=((r=this.modeDirective)===null||r===void 0?void 0:r.change$)||new Te}get appearance(){var n;return((n=this.modeDirective)===null||n===void 0?void 0:n.mode)==="onDark"?"accent":"secondary"}}return e.\u0275fac=function(n){return new(n||e)(y(Hr,12))},e.\u0275dir=$({type:e,selectors:[["tui-push"]],features:[ze([{provide:Hr,useExisting:e},{provide:jm,useExisting:e}]),$e]}),e})(),VL={heading:"",type:"",timestamp:"",image:"",icon:"",iconColor:"",buttons:[]},UL=Ee(VL);var BL=(()=>{class e extends ap{constructor(n,r,i,o){super(n,r),this.show$=new Te,this.show$.pipe(Z0(()=>o.open(this)),be(i)).subscribe()}set tuiPush(n){this.show$.next(n)}}return e.\u0275fac=function(n){return new(n||e)(y(pt),y(gt),y(qe,2),y(fr(()=>ab)))},e.\u0275dir=$({type:e,selectors:[["","tuiPush",""]],inputs:{tuiPush:"tuiPush"},features:[ze([qe]),$e]}),e})(),HL=(()=>{class e{constructor(n,r){this.animation=n,this.context=r}get isDirective(){return this.context.content instanceof BL}}return e.\u0275fac=function(n){return new(n||e)(y(sw),y(qs))},e.\u0275cmp=st({type:e,selectors:[["tui-push-alert"]],hostAttrs:["role","alert"],hostVars:3,hostBindings:function(n,r){n&2&&Ns("@tuiFadeIn",r.animation)("@tuiSlideInRight",r.animation)("@tuiHeightCollapse",r.animation)},decls:1,vars:2,consts:[[3,"heading","timestamp","type","close",4,"ngIf","ngIfElse"],[3,"heading","timestamp","type","close"],["alt","",3,"src",4,"ngIf"],[3,"src","color",4,"ngIf"],[3,"innerHTML",4,"polymorpheusOutlet"],["tuiButton","","type","button",3,"click",4,"ngIf"],["tuiLink","","type","button",3,"click",4,"ngIf"],["alt","",3,"src"],[3,"src"],[3,"innerHTML"],["tuiButton","","type","button",3,"click"],["tuiLink","","type","button",3,"click"]],template:function(n,r){n&1&&Ce(0,LL,6,8,"tui-push",0),n&2&&U("ngIf",!r.isDirective)("ngIfElse",r.context.content.template)},dependencies:[kL,Go,Sa,tb,Pt,jL,Lr],styles:["[_nghost-%COMP%]{max-width:calc(100% - 2rem);margin:0 1rem 1rem auto}[_nghost-%COMP%]:first-child{margin-top:auto}"],data:{animation:[Fl,Zw,Yw]},changeDetection:0}),e})(),ab=(()=>{class e extends al{constructor(){super(...arguments),this.component=new Ci(HL),this.defaultOptions=v(UL)}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),u9=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({providers:[{provide:RE,useExisting:ab,multi:!0}],imports:[[Rt,kr,jl,nb,Wo,sb]]}),e})();var ub=Hb(cb());var $L=new D("Config for DOMPurify",{factory:()=>({}),providedIn:"root"}),zL=new D("Hooks for DOMPurify",{factory:()=>[],providedIn:"root"}),GL=new D("A function that sanitizes value for a CSS rule",{factory:()=>e=>e,providedIn:"root"}),WL=ub.default,v9=(()=>{class e{constructor(n,r,{defaultView:i},o){this.config=n,this.sanitizeStyle=r,this.domPurify=WL(i),o.forEach(({name:s,hook:a})=>{this.domPurify.addHook(s,a)})}sanitize(n,r,i=this.config){if(n===mt.SCRIPT)throw new Error("DOMPurify does not support SCRIPT context");return n===mt.STYLE?this.sanitizeStyle(String(r)):this.domPurify.sanitize(String(r||""),i)}}return e.\u0275fac=function(n){return new(n||e)(I($L),I(GL),I(de),I(zL))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var y9=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();export{$b as a,Qe as b,N as c,Te as d,We as e,rr as f,Ae as g,Ya as h,Za as i,T as j,w as k,uc as l,On as m,ht as n,xe as o,DC as p,ye as q,bC as r,Kg as s,Ke as t,ns as u,Ue as v,dc as w,Et as x,Cd as y,_e as z,ee as A,be as B,Ne as C,br as D,fr as E,S as F,Z as G,D as H,I,v as J,st as K,K as L,$ as M,pi as N,on as O,kn as P,jn as Q,Cs as R,Fe as S,hr as T,jy as U,pr as V,vo as W,eS as X,bt as Y,Qt as Z,Dz as _,Ez as $,wz as aa,mt as ba,yo as ca,X as da,li as ea,gr as fa,re as ga,y as ha,gt as ia,et as ja,ue as ka,$e as la,at as ma,U as na,Eo as oa,Xe as pa,Nt as qa,Ce as ra,ge as sa,pe as ta,Le as ua,Dn as va,En as wa,xs as xa,Bn as ya,Sh as za,Ns as Aa,rt as Ba,me as Ca,Hn as Da,zt as Ea,dD as Fa,$n as Ga,UA as Ha,sn as Ia,ze as Ja,mD as Ka,Cz as La,Iz as Ma,Sz as Na,an as Oa,cn as Pa,Mz as Qa,Tz as Ra,Az as Sa,pt as Ta,Ah as Ua,_D as Va,rO as Wa,Oh as Xa,bD as Ya,Nr as Za,de as _a,Xz as $a,Jz as ab,Pt as bb,zn as cb,Rt as db,Ls as eb,KD as fb,SG as gb,Wh as hb,MG as ib,cF as jb,o6 as kb,Qh as lb,p0 as mb,wi as nb,GG as ob,Fu as pb,kx as qb,Ux as rb,qG as sb,Ge as tb,E as ub,ae as vb,M0 as wb,ct as xb,Rr as yb,So as zb,g3 as Ab,v3 as Bb,A0 as Cb,y3 as Db,_3 as Eb,D3 as Fb,x0 as Gb,w3 as Hb,C3 as Ib,I3 as Jb,yr as Kb,M3 as Lb,T3 as Mb,A3 as Nb,F0 as Ob,Ee as Pb,ie as Qb,bi as Rb,N3 as Sb,V0 as Tb,ku as Ub,To as Vb,Fr as Wb,L3 as Xb,k3 as Yb,j3 as Zb,V3 as _b,U3 as $b,np as ac,U0 as bc,B0 as cc,z3 as dc,Oo as ec,H0 as fc,xo as gc,z0 as hc,G0 as ic,W0 as jc,iW as kc,J as lc,Z0 as mc,oW as nc,sN as oc,J0 as pc,Wn as qc,qn as rc,qs as sc,Ci as tc,ap as uc,Lr as vc,kr as wc,fe as xc,t3 as yc,n3 as zc,Jh as Ac,zN as Bc,EW as Cc,mp as Dc,oE as Ec,rl as Fc,gE as Gc,vE as Hc,RE as Ic,jP as Jc,ta as Kc,sl as Lc,RW as Mc,na as Nc,Lp as Oc,FW as Pc,ra as Qc,zW as Rc,qe as Sc,f8 as Tc,jp as Uc,zP as Vc,h8 as Wc,p8 as Xc,Up as Yc,ia as Zc,N8 as _c,BE as $c,P8 as ad,R8 as bd,k8 as cd,j8 as dd,n4 as ed,r4 as fd,i4 as gd,ll as hd,w4 as id,b4 as jd,YE as kd,ZE as ld,r5 as md,i5 as nd,dR as od,a5 as pd,c5 as qd,$p as rd,fR as sd,vl as td,Tq as ud,yl as vd,Aq as wd,Oq as xd,xq as yd,Ai as zd,Nq as Ad,Pq as Bd,ca as Cd,Rq as Dd,RR as Ed,Fq as Fd,Fl as Gd,J6 as Hd,h as Id,Ti as Jd,ER as Kd,f5 as Ld,h5 as Md,p5 as Nd,P5 as Od,R5 as Pd,F5 as Qd,L5 as Rd,iw as Sd,aa as Td,Ro as Ud,bR as Vd,CR as Wd,Zp as Xd,sw as Yd,hl as Zd,J5 as _d,eq as $d,TR as ae,rq as be,sq as ce,AR as de,Fo as ee,gl as fe,pq as ge,mq as he,PR as ie,gq as je,vq as ke,yq as le,_q as me,w6 as ne,b6 as oe,C6 as pe,Ww as qe,I6 as re,Go as se,Wo as te,Hr as ue,Ll as ve,bY as we,CY as xe,Qw as ye,Xw as ze,Jw as Ae,eb as Be,Sa as Ce,jl as De,tb as Ee,nb as Fe,SL as Ge,UZ as He,kL as Ie,jL as Je,BL as Ke,u9 as Le,v9 as Me,y9 as Ne}; +//# sourceMappingURL=chunk-PVLOJ2BE.js.map diff --git a/chunk-PVLOJ2BE.js.map b/chunk-PVLOJ2BE.js.map new file mode 100644 index 00000000..d1181f81 --- /dev/null +++ b/chunk-PVLOJ2BE.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["node_modules/dompurify/dist/purify.js","node_modules/@angular/core/fesm2022/primitives/signals.mjs","node_modules/rxjs/dist/esm/internal/util/isFunction.js","node_modules/rxjs/dist/esm/internal/util/createErrorClass.js","node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js","node_modules/rxjs/dist/esm/internal/util/arrRemove.js","node_modules/rxjs/dist/esm/internal/Subscription.js","node_modules/rxjs/dist/esm/internal/config.js","node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js","node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js","node_modules/rxjs/dist/esm/internal/util/noop.js","node_modules/rxjs/dist/esm/internal/NotificationFactories.js","node_modules/rxjs/dist/esm/internal/util/errorContext.js","node_modules/rxjs/dist/esm/internal/Subscriber.js","node_modules/rxjs/dist/esm/internal/symbol/observable.js","node_modules/rxjs/dist/esm/internal/util/identity.js","node_modules/rxjs/dist/esm/internal/util/pipe.js","node_modules/rxjs/dist/esm/internal/Observable.js","node_modules/rxjs/dist/esm/internal/util/lift.js","node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js","node_modules/rxjs/dist/esm/internal/operators/refCount.js","node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js","node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","node_modules/rxjs/dist/esm/internal/Subject.js","node_modules/rxjs/dist/esm/internal/BehaviorSubject.js","node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","node_modules/rxjs/dist/esm/internal/ReplaySubject.js","node_modules/rxjs/dist/esm/internal/scheduler/Action.js","node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","node_modules/rxjs/dist/esm/internal/Scheduler.js","node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","node_modules/rxjs/dist/esm/internal/scheduler/async.js","node_modules/rxjs/dist/esm/internal/observable/empty.js","node_modules/rxjs/dist/esm/internal/util/isScheduler.js","node_modules/rxjs/dist/esm/internal/util/args.js","node_modules/tslib/tslib.es6.mjs","node_modules/rxjs/dist/esm/internal/util/isArrayLike.js","node_modules/rxjs/dist/esm/internal/util/isPromise.js","node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js","node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js","node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js","node_modules/rxjs/dist/esm/internal/symbol/iterator.js","node_modules/rxjs/dist/esm/internal/util/isIterable.js","node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js","node_modules/rxjs/dist/esm/internal/observable/innerFrom.js","node_modules/rxjs/dist/esm/internal/util/executeSchedule.js","node_modules/rxjs/dist/esm/internal/operators/observeOn.js","node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js","node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js","node_modules/rxjs/dist/esm/internal/observable/from.js","node_modules/rxjs/dist/esm/internal/observable/of.js","node_modules/rxjs/dist/esm/internal/observable/throwError.js","node_modules/rxjs/dist/esm/internal/util/isObservable.js","node_modules/rxjs/dist/esm/internal/util/EmptyError.js","node_modules/rxjs/dist/esm/internal/util/isDate.js","node_modules/rxjs/dist/esm/internal/operators/map.js","node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js","node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js","node_modules/rxjs/dist/esm/internal/util/createObject.js","node_modules/rxjs/dist/esm/internal/observable/combineLatest.js","node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","node_modules/rxjs/dist/esm/internal/operators/concatAll.js","node_modules/rxjs/dist/esm/internal/observable/concat.js","node_modules/rxjs/dist/esm/internal/observable/defer.js","node_modules/rxjs/dist/esm/internal/observable/forkJoin.js","node_modules/rxjs/dist/esm/internal/observable/fromEvent.js","node_modules/rxjs/dist/esm/internal/observable/timer.js","node_modules/rxjs/dist/esm/internal/observable/merge.js","node_modules/rxjs/dist/esm/internal/observable/never.js","node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js","node_modules/rxjs/dist/esm/internal/operators/filter.js","node_modules/rxjs/dist/esm/internal/observable/race.js","node_modules/rxjs/dist/esm/internal/operators/catchError.js","node_modules/rxjs/dist/esm/internal/operators/scanInternals.js","node_modules/rxjs/dist/esm/internal/operators/concatMap.js","node_modules/rxjs/dist/esm/internal/operators/debounce.js","node_modules/rxjs/dist/esm/internal/operators/debounceTime.js","node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js","node_modules/rxjs/dist/esm/internal/operators/take.js","node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js","node_modules/rxjs/dist/esm/internal/operators/mapTo.js","node_modules/rxjs/dist/esm/internal/operators/delayWhen.js","node_modules/rxjs/dist/esm/internal/operators/delay.js","node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js","node_modules/rxjs/dist/esm/internal/operators/endWith.js","node_modules/rxjs/dist/esm/internal/operators/finalize.js","node_modules/rxjs/dist/esm/internal/operators/first.js","node_modules/rxjs/dist/esm/internal/operators/takeLast.js","node_modules/rxjs/dist/esm/internal/operators/last.js","node_modules/rxjs/dist/esm/internal/operators/repeat.js","node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js","node_modules/rxjs/dist/esm/internal/operators/scan.js","node_modules/rxjs/dist/esm/internal/operators/share.js","node_modules/rxjs/dist/esm/internal/operators/shareReplay.js","node_modules/rxjs/dist/esm/internal/operators/skip.js","node_modules/rxjs/dist/esm/internal/operators/skipWhile.js","node_modules/rxjs/dist/esm/internal/operators/startWith.js","node_modules/rxjs/dist/esm/internal/operators/switchMap.js","node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","node_modules/rxjs/dist/esm/internal/operators/takeWhile.js","node_modules/rxjs/dist/esm/internal/operators/tap.js","node_modules/rxjs/dist/esm/internal/operators/throttle.js","node_modules/rxjs/dist/esm/internal/operators/throttleTime.js","node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js","node_modules/@angular/core/fesm2022/core.mjs","node_modules/@angular/common/fesm2022/common.mjs","node_modules/@angular/common/fesm2022/http.mjs","node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs","node_modules/@angular/forms/fesm2022/forms.mjs","node_modules/@ng-web-apis/common/fesm2015/ng-web-apis-common.js","node_modules/@angular/animations/fesm2022/animations.mjs","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-constants.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-browser.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-math.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-miscellaneous.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-dom.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-focus.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-format.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-os.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-svg.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-exceptions.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-observables.js","node_modules/@tinkoff/ng-polymorpheus/fesm2015/tinkoff-ng-polymorpheus.js","node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js","node_modules/@angular/animations/fesm2022/browser.mjs","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-tokens.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-services.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-abstract.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-coercion.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-pipes-mapper.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-components-scroll-controls.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-decorators.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-active-zone.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-auto-focus.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-let.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-overscroll.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-components-dropdown-host.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-enums.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-constants.js","node_modules/@taiga-ui/i18n/fesm2015/taiga-ui-i18n-enums.js","node_modules/@taiga-ui/i18n/fesm2015/taiga-ui-i18n-languages-english.js","node_modules/@taiga-ui/i18n/fesm2015/taiga-ui-i18n-tokens.js","node_modules/@taiga-ui/i18n/fesm2015/taiga-ui-i18n-tools.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-utils-dom.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-utils-miscellaneous.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-utils-mobile.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-enums.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-tokens.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-abstract.js","node_modules/@angular/router/fesm2022/router.mjs","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-services.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-svg.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-animations.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-directives-mode.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-providers.js","node_modules/@tinkoff/ng-event-plugins/fesm2015/tinkoff-ng-event-plugins.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-directives-wrapper.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-loader.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-button.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-link.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-dialog.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-pipes-format-date.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-push.js","node_modules/@tinkoff/ng-dompurify/fesm2015/tinkoff-ng-dompurify.js"],"sourcesContent":["/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.DOMPurify = factory());\n})(this, function () {\n 'use strict';\n\n const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n } = Object;\n let {\n freeze,\n seal,\n create\n } = Object; // eslint-disable-line import/no-mutable-exports\n\n let {\n apply,\n construct\n } = typeof Reflect !== 'undefined' && Reflect;\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n if (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n }\n const arrayForEach = unapply(Array.prototype.forEach);\n const arrayPop = unapply(Array.prototype.pop);\n const arrayPush = unapply(Array.prototype.push);\n const stringToLowerCase = unapply(String.prototype.toLowerCase);\n const stringToString = unapply(String.prototype.toString);\n const stringMatch = unapply(String.prototype.match);\n const stringReplace = unapply(String.prototype.replace);\n const stringIndexOf = unapply(String.prototype.indexOf);\n const stringTrim = unapply(String.prototype.trim);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n /**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\n\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return apply(func, thisArg, args);\n };\n }\n /**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\n\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return construct(func, args);\n };\n }\n /**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\n\n function addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n }\n /**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\n\n function clone(object) {\n const newObject = create(null);\n for (const [property, value] of entries(object)) {\n if (getOwnPropertyDescriptor(object, property) !== undefined) {\n newObject[property] = value;\n }\n }\n return newObject;\n }\n /**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\n\n function lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n return fallbackValue;\n }\n const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG\n\n const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n\n const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']); // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n\n const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n const text = freeze(['#text']);\n const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\n const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\n const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\n const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n\n const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n\n const DOCTYPE_NAME = seal(/^html$/i);\n var EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n ERB_EXPR: ERB_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR,\n DATA_ATTR: DATA_ATTR,\n ARIA_ATTR: ARIA_ATTR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n DOCTYPE_NAME: DOCTYPE_NAME\n });\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n\n const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n } // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n function createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n const DOMPurify = root => createDOMPurify(root);\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n\n DOMPurify.version = '3.0.6';\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = {};\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n /* Allowed attribute names */\n\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n let FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n let FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n\n let ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n\n let ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n\n let SAFE_FOR_TEMPLATES = false;\n /* Decide if document with ... should be returned */\n\n let WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n\n let SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n\n let FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n\n let RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n\n let RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n\n let RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n\n let SANITIZE_DOM = true;\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n\n let KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n\n let IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n\n let USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n /* Tags that are safe for data: URIs */\n\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n /* Allowed XHTML+XML namespaces */\n\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n /* Parsing of strict XHTML documents */\n\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n /* Keep a reference to config to pass to hooks */\n\n let CONFIG = null;\n /* Ideally, do not touch anything below this line */\n\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n /* Set configuration parameters */\n\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),\n // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS),\n // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [...text]);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n } // Overwrite existing TrustedTypes policy.\n\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; // Sign local variables required by `sanitize`.\n\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n } // If creating the internal policy succeeded sign internal variables.\n\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n } // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n\n const ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n const ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n } // The only way to switch from MathML to SVG is via`\n // svg if parent is either or MathML\n // text integration points.\n\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n } // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n } // The only way to switch from SVG to MathML is via\n // and HTML integration points\n\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n } // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n } // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n } // For XHTML and XML documents that support custom namespaces\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n } // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n\n return false;\n };\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n node.remove();\n }\n };\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n\n const _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n node.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '' + dirty + '';\n }\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {// Syntax error if dirtyPayload is invalid xml\n }\n }\n const body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null);\n };\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n\n const _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n\n const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n\n const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n arrayForEach(hooks[entryPoint], hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeElements', currentNode, null);\n /* Check if element is clobbered or can clobber */\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Now let's check the element's type and name */\n\n const tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Remove element if anything forbids its presence */\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n /* Keep content except for bad-listed elements */\n\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n for (let i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n /* Check whether element has a valid namespace */\n\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Make sure that older browsers don't get fallback-tag mXSS */\n\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Sanitize element content to be template-safe */\n\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n /* Execute a hook if present */\n\n _executeHook('afterSanitizeElements', currentNode, null);\n return false;\n };\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ;else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ;else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ;else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ;else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ;else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ;else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ;else if (value) {\n return false;\n } else ;\n return true;\n };\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName.indexOf('-') > 0;\n };\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n const {\n attributes\n } = currentNode;\n /* Check if we have attributes; if not we might have a text node */\n\n if (!attributes) {\n return;\n }\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n let l = attributes.length;\n /* Go backwards over all attributes; safely remove bad ones */\n\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n /* Execute a hook if present */\n\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n /* Remove attribute */\n\n _removeAttribute(name, currentNode);\n /* Did the hooks approve of the attribute? */\n\n if (!hookEvent.keepAttr) {\n continue;\n }\n /* Work around a security issue in jQuery 3.0 */\n\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n /* Sanitize attribute content to be template-safe */\n\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n /* Is `value` valid for this attribute? */\n\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value\n\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n /* Handle attributes that require Trusted Types */\n\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ;else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n /* Handle invalid data-* attribute set by try-catching it */\n\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n /* Execute a hook if present */\n\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n /* Sanitize tags and elements */\n\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n /* Deep shadow DOM detected */\n\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n _sanitizeAttributes(shadowNode);\n }\n /* Execute a hook if present */\n\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '';\n }\n /* Stringify, in case dirty is an object */\n\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n /* Return dirty HTML if DOMPurify cannot run */\n\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n /* Assign config vars */\n\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n /* Clean up removed elements */\n\n DOMPurify.removed = [];\n /* Check if dirty is correctly typed for IN_PLACE */\n\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n /* Initialize the document to work on */\n\n body = _initDocument(dirty);\n /* Check we have a DOM node from the data */\n\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n /* Remove first element node (ours) if FORCE_BODY is set */\n\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n /* Get node iterator */\n\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n /* Now start iterating over the created document */\n\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n /* Shadow DOM detected, sanitize it */\n\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n _sanitizeAttributes(currentNode);\n }\n /* If we sanitized `dirty` in-place, return it. */\n\n if (IN_PLACE) {\n return dirty;\n }\n /* Return sanitized string or DOM */\n\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n return returnNode;\n }\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n /* Serialize doctype if allowed */\n\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '\\n' + serializedHTML;\n }\n /* Sanitize final string template-safe */\n\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n return DOMPurify;\n }\n var purify = createDOMPurify();\n return purify;\n});\n","/**\n * @license Angular v17.0.7\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * The default equality function used for `signal` and `computed`, which uses referential equality.\n */\nfunction defaultEquals(a, b) {\n return Object.is(a, b);\n}\n\n/**\n * The currently active consumer `ReactiveNode`, if running code in a reactive context.\n *\n * Change this via `setActiveConsumer`.\n */\nlet activeConsumer = null;\nlet inNotificationPhase = false;\n/**\n * Global epoch counter. Incremented whenever a source signal is set.\n */\nlet epoch = 1;\n/**\n * Symbol used to tell `Signal`s apart from other functions.\n *\n * This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.\n */\nconst SIGNAL = /* @__PURE__ */Symbol('SIGNAL');\nfunction setActiveConsumer(consumer) {\n const prev = activeConsumer;\n activeConsumer = consumer;\n return prev;\n}\nfunction getActiveConsumer() {\n return activeConsumer;\n}\nfunction isInNotificationPhase() {\n return inNotificationPhase;\n}\nfunction isReactive(value) {\n return value[SIGNAL] !== undefined;\n}\nconst REACTIVE_NODE = {\n version: 0,\n lastCleanEpoch: 0,\n dirty: false,\n producerNode: undefined,\n producerLastReadVersion: undefined,\n producerIndexOfThis: undefined,\n nextProducerIndex: 0,\n liveConsumerNode: undefined,\n liveConsumerIndexOfThis: undefined,\n consumerAllowSignalWrites: false,\n consumerIsAlwaysLive: false,\n producerMustRecompute: () => false,\n producerRecomputeValue: () => {},\n consumerMarkedDirty: () => {},\n consumerOnSignalRead: () => {}\n};\n/**\n * Called by implementations when a producer's signal is read.\n */\nfunction producerAccessed(node) {\n if (inNotificationPhase) {\n throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode ? `Assertion error: signal read during notification phase` : '');\n }\n if (activeConsumer === null) {\n // Accessed outside of a reactive context, so nothing to record.\n return;\n }\n activeConsumer.consumerOnSignalRead(node);\n // This producer is the `idx`th dependency of `activeConsumer`.\n const idx = activeConsumer.nextProducerIndex++;\n assertConsumerNode(activeConsumer);\n if (idx < activeConsumer.producerNode.length && activeConsumer.producerNode[idx] !== node) {\n // There's been a change in producers since the last execution of `activeConsumer`.\n // `activeConsumer.producerNode[idx]` holds a stale dependency which will be be removed and\n // replaced with `this`.\n //\n // If `activeConsumer` isn't live, then this is a no-op, since we can replace the producer in\n // `activeConsumer.producerNode` directly. However, if `activeConsumer` is live, then we need\n // to remove it from the stale producer's `liveConsumer`s.\n if (consumerIsLive(activeConsumer)) {\n const staleProducer = activeConsumer.producerNode[idx];\n producerRemoveLiveConsumerAtIndex(staleProducer, activeConsumer.producerIndexOfThis[idx]);\n // At this point, the only record of `staleProducer` is the reference at\n // `activeConsumer.producerNode[idx]` which will be overwritten below.\n }\n }\n\n if (activeConsumer.producerNode[idx] !== node) {\n // We're a new dependency of the consumer (at `idx`).\n activeConsumer.producerNode[idx] = node;\n // If the active consumer is live, then add it as a live consumer. If not, then use 0 as a\n // placeholder value.\n activeConsumer.producerIndexOfThis[idx] = consumerIsLive(activeConsumer) ? producerAddLiveConsumer(node, activeConsumer, idx) : 0;\n }\n activeConsumer.producerLastReadVersion[idx] = node.version;\n}\n/**\n * Increment the global epoch counter.\n *\n * Called by source producers (that is, not computeds) whenever their values change.\n */\nfunction producerIncrementEpoch() {\n epoch++;\n}\n/**\n * Ensure this producer's `version` is up-to-date.\n */\nfunction producerUpdateValueVersion(node) {\n if (consumerIsLive(node) && !node.dirty) {\n // A live consumer will be marked dirty by producers, so a clean state means that its version\n // is guaranteed to be up-to-date.\n return;\n }\n if (!node.dirty && node.lastCleanEpoch === epoch) {\n // Even non-live consumers can skip polling if they previously found themselves to be clean at\n // the current epoch, since their dependencies could not possibly have changed (such a change\n // would've increased the epoch).\n return;\n }\n if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) {\n // None of our producers report a change since the last time they were read, so no\n // recomputation of our value is necessary, and we can consider ourselves clean.\n node.dirty = false;\n node.lastCleanEpoch = epoch;\n return;\n }\n node.producerRecomputeValue(node);\n // After recomputing the value, we're no longer dirty.\n node.dirty = false;\n node.lastCleanEpoch = epoch;\n}\n/**\n * Propagate a dirty notification to live consumers of this producer.\n */\nfunction producerNotifyConsumers(node) {\n if (node.liveConsumerNode === undefined) {\n return;\n }\n // Prevent signal reads when we're updating the graph\n const prev = inNotificationPhase;\n inNotificationPhase = true;\n try {\n for (const consumer of node.liveConsumerNode) {\n if (!consumer.dirty) {\n consumerMarkDirty(consumer);\n }\n }\n } finally {\n inNotificationPhase = prev;\n }\n}\n/**\n * Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates,\n * based on the current consumer context.\n */\nfunction producerUpdatesAllowed() {\n return activeConsumer?.consumerAllowSignalWrites !== false;\n}\nfunction consumerMarkDirty(node) {\n node.dirty = true;\n producerNotifyConsumers(node);\n node.consumerMarkedDirty?.(node);\n}\n/**\n * Prepare this consumer to run a computation in its reactive context.\n *\n * Must be called by subclasses which represent reactive computations, before those computations\n * begin.\n */\nfunction consumerBeforeComputation(node) {\n node && (node.nextProducerIndex = 0);\n return setActiveConsumer(node);\n}\n/**\n * Finalize this consumer's state after a reactive computation has run.\n *\n * Must be called by subclasses which represent reactive computations, after those computations\n * have finished.\n */\nfunction consumerAfterComputation(node, prevConsumer) {\n setActiveConsumer(prevConsumer);\n if (!node || node.producerNode === undefined || node.producerIndexOfThis === undefined || node.producerLastReadVersion === undefined) {\n return;\n }\n if (consumerIsLive(node)) {\n // For live consumers, we need to remove the producer -> consumer edge for any stale producers\n // which weren't dependencies after the recomputation.\n for (let i = node.nextProducerIndex; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n // Truncate the producer tracking arrays.\n // Perf note: this is essentially truncating the length to `node.nextProducerIndex`, but\n // benchmarking has shown that individual pop operations are faster.\n while (node.producerNode.length > node.nextProducerIndex) {\n node.producerNode.pop();\n node.producerLastReadVersion.pop();\n node.producerIndexOfThis.pop();\n }\n}\n/**\n * Determine whether this consumer has any dependencies which have changed since the last time\n * they were read.\n */\nfunction consumerPollProducersForChange(node) {\n assertConsumerNode(node);\n // Poll producers for change.\n for (let i = 0; i < node.producerNode.length; i++) {\n const producer = node.producerNode[i];\n const seenVersion = node.producerLastReadVersion[i];\n // First check the versions. A mismatch means that the producer's value is known to have\n // changed since the last time we read it.\n if (seenVersion !== producer.version) {\n return true;\n }\n // The producer's version is the same as the last time we read it, but it might itself be\n // stale. Force the producer to recompute its version (calculating a new value if necessary).\n producerUpdateValueVersion(producer);\n // Now when we do this check, `producer.version` is guaranteed to be up to date, so if the\n // versions still match then it has not changed since the last time we read it.\n if (seenVersion !== producer.version) {\n return true;\n }\n }\n return false;\n}\n/**\n * Disconnect this consumer from the graph.\n */\nfunction consumerDestroy(node) {\n assertConsumerNode(node);\n if (consumerIsLive(node)) {\n // Drop all connections from the graph to this node.\n for (let i = 0; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n // Truncate all the arrays to drop all connection from this node to the graph.\n node.producerNode.length = node.producerLastReadVersion.length = node.producerIndexOfThis.length = 0;\n if (node.liveConsumerNode) {\n node.liveConsumerNode.length = node.liveConsumerIndexOfThis.length = 0;\n }\n}\n/**\n * Add `consumer` as a live consumer of this node.\n *\n * Note that this operation is potentially transitive. If this node becomes live, then it becomes\n * a live consumer of all of its current producers.\n */\nfunction producerAddLiveConsumer(node, consumer, indexOfThis) {\n assertProducerNode(node);\n assertConsumerNode(node);\n if (node.liveConsumerNode.length === 0) {\n // When going from 0 to 1 live consumers, we become a live consumer to our producers.\n for (let i = 0; i < node.producerNode.length; i++) {\n node.producerIndexOfThis[i] = producerAddLiveConsumer(node.producerNode[i], node, i);\n }\n }\n node.liveConsumerIndexOfThis.push(indexOfThis);\n return node.liveConsumerNode.push(consumer) - 1;\n}\n/**\n * Remove the live consumer at `idx`.\n */\nfunction producerRemoveLiveConsumerAtIndex(node, idx) {\n assertProducerNode(node);\n assertConsumerNode(node);\n if (typeof ngDevMode !== 'undefined' && ngDevMode && idx >= node.liveConsumerNode.length) {\n throw new Error(`Assertion error: active consumer index ${idx} is out of bounds of ${node.liveConsumerNode.length} consumers)`);\n }\n if (node.liveConsumerNode.length === 1) {\n // When removing the last live consumer, we will no longer be live. We need to remove\n // ourselves from our producers' tracking (which may cause consumer-producers to lose\n // liveness as well).\n for (let i = 0; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n // Move the last value of `liveConsumers` into `idx`. Note that if there's only a single\n // live consumer, this is a no-op.\n const lastIdx = node.liveConsumerNode.length - 1;\n node.liveConsumerNode[idx] = node.liveConsumerNode[lastIdx];\n node.liveConsumerIndexOfThis[idx] = node.liveConsumerIndexOfThis[lastIdx];\n // Truncate the array.\n node.liveConsumerNode.length--;\n node.liveConsumerIndexOfThis.length--;\n // If the index is still valid, then we need to fix the index pointer from the producer to this\n // consumer, and update it from `lastIdx` to `idx` (accounting for the move above).\n if (idx < node.liveConsumerNode.length) {\n const idxProducer = node.liveConsumerIndexOfThis[idx];\n const consumer = node.liveConsumerNode[idx];\n assertConsumerNode(consumer);\n consumer.producerIndexOfThis[idxProducer] = idx;\n }\n}\nfunction consumerIsLive(node) {\n return node.consumerIsAlwaysLive || (node?.liveConsumerNode?.length ?? 0) > 0;\n}\nfunction assertConsumerNode(node) {\n node.producerNode ??= [];\n node.producerIndexOfThis ??= [];\n node.producerLastReadVersion ??= [];\n}\nfunction assertProducerNode(node) {\n node.liveConsumerNode ??= [];\n node.liveConsumerIndexOfThis ??= [];\n}\n\n/**\n * Create a computed signal which derives a reactive value from an expression.\n */\nfunction createComputed(computation) {\n const node = Object.create(COMPUTED_NODE);\n node.computation = computation;\n const computed = () => {\n // Check if the value needs updating before returning it.\n producerUpdateValueVersion(node);\n // Record that someone looked at this signal.\n producerAccessed(node);\n if (node.value === ERRORED) {\n throw node.error;\n }\n return node.value;\n };\n computed[SIGNAL] = node;\n return computed;\n}\n/**\n * A dedicated symbol used before a computed value has been calculated for the first time.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst UNSET = /* @__PURE__ */Symbol('UNSET');\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * is in progress. Used to detect cycles in computation chains.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst COMPUTING = /* @__PURE__ */Symbol('COMPUTING');\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * failed. The thrown error is cached until the computation gets dirty again.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst ERRORED = /* @__PURE__ */Symbol('ERRORED');\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst COMPUTED_NODE = /* @__PURE__ */(() => {\n return {\n ...REACTIVE_NODE,\n value: UNSET,\n dirty: true,\n error: null,\n equal: defaultEquals,\n producerMustRecompute(node) {\n // Force a recomputation if there's no current value, or if the current value is in the\n // process of being calculated (which should throw an error).\n return node.value === UNSET || node.value === COMPUTING;\n },\n producerRecomputeValue(node) {\n if (node.value === COMPUTING) {\n // Our computation somehow led to a cyclic read of itself.\n throw new Error('Detected cycle in computations.');\n }\n const oldValue = node.value;\n node.value = COMPUTING;\n const prevConsumer = consumerBeforeComputation(node);\n let newValue;\n try {\n newValue = node.computation();\n } catch (err) {\n newValue = ERRORED;\n node.error = err;\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n if (oldValue !== UNSET && oldValue !== ERRORED && newValue !== ERRORED && node.equal(oldValue, newValue)) {\n // No change to `valueVersion` - old and new values are\n // semantically equivalent.\n node.value = oldValue;\n return;\n }\n node.value = newValue;\n node.version++;\n }\n };\n})();\nfunction defaultThrowError() {\n throw new Error();\n}\nlet throwInvalidWriteToSignalErrorFn = defaultThrowError;\nfunction throwInvalidWriteToSignalError() {\n throwInvalidWriteToSignalErrorFn();\n}\nfunction setThrowInvalidWriteToSignalError(fn) {\n throwInvalidWriteToSignalErrorFn = fn;\n}\n\n/**\n * If set, called after `WritableSignal`s are updated.\n *\n * This hook can be used to achieve various effects, such as running effects synchronously as part\n * of setting a signal.\n */\nlet postSignalSetFn = null;\n/**\n * Create a `Signal` that can be set or updated directly.\n */\nfunction createSignal(initialValue) {\n const node = Object.create(SIGNAL_NODE);\n node.value = initialValue;\n const getter = () => {\n producerAccessed(node);\n return node.value;\n };\n getter[SIGNAL] = node;\n return getter;\n}\nfunction setPostSignalSetFn(fn) {\n const prev = postSignalSetFn;\n postSignalSetFn = fn;\n return prev;\n}\nfunction signalGetFn() {\n producerAccessed(this);\n return this.value;\n}\nfunction signalSetFn(node, newValue) {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError();\n }\n if (!node.equal(node.value, newValue)) {\n node.value = newValue;\n signalValueChanged(node);\n }\n}\nfunction signalUpdateFn(node, updater) {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError();\n }\n signalSetFn(node, updater(node.value));\n}\nfunction signalMutateFn(node, mutator) {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError();\n }\n // Mutate bypasses equality checks as it's by definition changing the value.\n mutator(node.value);\n signalValueChanged(node);\n}\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst SIGNAL_NODE = /* @__PURE__ */(() => {\n return {\n ...REACTIVE_NODE,\n equal: defaultEquals,\n value: undefined\n };\n})();\nfunction signalValueChanged(node) {\n node.version++;\n producerIncrementEpoch();\n producerNotifyConsumers(node);\n postSignalSetFn?.();\n}\nfunction createWatch(fn, schedule, allowSignalWrites) {\n const node = Object.create(WATCH_NODE);\n if (allowSignalWrites) {\n node.consumerAllowSignalWrites = true;\n }\n node.fn = fn;\n node.schedule = schedule;\n const registerOnCleanup = cleanupFn => {\n node.cleanupFn = cleanupFn;\n };\n function isWatchNodeDestroyed(node) {\n return node.fn === null && node.schedule === null;\n }\n function destroyWatchNode(node) {\n if (!isWatchNodeDestroyed(node)) {\n consumerDestroy(node); // disconnect watcher from the reactive graph\n node.cleanupFn();\n // nullify references to the integration functions to mark node as destroyed\n node.fn = null;\n node.schedule = null;\n node.cleanupFn = NOOP_CLEANUP_FN;\n }\n }\n const run = () => {\n if (node.fn === null) {\n // trying to run a destroyed watch is noop\n return;\n }\n if (isInNotificationPhase()) {\n throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);\n }\n node.dirty = false;\n if (node.hasRun && !consumerPollProducersForChange(node)) {\n return;\n }\n node.hasRun = true;\n const prevConsumer = consumerBeforeComputation(node);\n try {\n node.cleanupFn();\n node.cleanupFn = NOOP_CLEANUP_FN;\n node.fn(registerOnCleanup);\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n };\n node.ref = {\n notify: () => consumerMarkDirty(node),\n run,\n cleanup: () => node.cleanupFn(),\n destroy: () => destroyWatchNode(node),\n [SIGNAL]: node\n };\n return node.ref;\n}\nconst NOOP_CLEANUP_FN = () => {};\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst WATCH_NODE = /* @__PURE__ */(() => {\n return {\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n consumerAllowSignalWrites: false,\n consumerMarkedDirty: node => {\n if (node.schedule !== null) {\n node.schedule(node.ref);\n }\n },\n hasRun: false,\n cleanupFn: NOOP_CLEANUP_FN\n };\n})();\nfunction setAlternateWeakRefImpl(impl) {\n // TODO: remove this function\n}\nexport { REACTIVE_NODE, SIGNAL, consumerAfterComputation, consumerBeforeComputation, consumerDestroy, consumerPollProducersForChange, createComputed, createSignal, createWatch, defaultEquals, getActiveConsumer, isInNotificationPhase, isReactive, producerAccessed, producerNotifyConsumers, producerUpdateValueVersion, producerUpdatesAllowed, setActiveConsumer, setAlternateWeakRefImpl, setPostSignalSetFn, setThrowInvalidWriteToSignalError, signalMutateFn, signalSetFn, signalUpdateFn };\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n","export function createErrorClass(createImpl) {\n const _super = instance => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n","import { createErrorClass } from './createErrorClass';\nexport const UnsubscriptionError = createErrorClass(_super => function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}` : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n});\n","export function arrRemove(arr, item) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n","import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nexport class Subscription {\n constructor(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n unsubscribe() {\n let errors;\n if (!this.closed) {\n this.closed = true;\n const {\n _parentage\n } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n } else {\n _parentage.remove(this);\n }\n }\n const {\n initialTeardown: initialFinalizer\n } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n } catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n const {\n _finalizers\n } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n } catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n } else {\n errors.push(err);\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n add(teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n } else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n }\n _hasParent(parent) {\n const {\n _parentage\n } = this;\n return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent);\n }\n _addParent(parent) {\n const {\n _parentage\n } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n _removeParent(parent) {\n const {\n _parentage\n } = this;\n if (_parentage === parent) {\n this._parentage = null;\n } else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n remove(teardown) {\n const {\n _finalizers\n } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\nSubscription.EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n})();\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return value instanceof Subscription || value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe);\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n } else {\n finalizer.unsubscribe();\n }\n}\n","export const config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false\n};\n","export const timeoutProvider = {\n setTimeout(handler, timeout, ...args) {\n const {\n delegate\n } = timeoutProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const {\n delegate\n } = timeoutProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined\n};\n","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(() => {\n const {\n onUnhandledError\n } = config;\n if (onUnhandledError) {\n onUnhandledError(err);\n } else {\n throw err;\n }\n });\n}\n","export function noop() {}\n","export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind,\n value,\n error\n };\n}\n","import { config } from '../config';\nlet context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = {\n errorThrown: false,\n error: null\n };\n }\n cb();\n if (isRoot) {\n const {\n errorThrown,\n error\n } = context;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n } else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n","import { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nexport class Subscriber extends Subscription {\n constructor(destination) {\n super();\n this.isStopped = false;\n if (destination) {\n this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(this);\n }\n } else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n static create(next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n }\n next(value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n } else {\n this._next(value);\n }\n }\n error(err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n } else {\n this.isStopped = true;\n this._error(err);\n }\n }\n complete() {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n } else {\n this.isStopped = true;\n this._complete();\n }\n }\n unsubscribe() {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null;\n }\n }\n _next(value) {\n this.destination.next(value);\n }\n _error(err) {\n try {\n this.destination.error(err);\n } finally {\n this.unsubscribe();\n }\n }\n _complete() {\n try {\n this.destination.complete();\n } finally {\n this.unsubscribe();\n }\n }\n}\nconst _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nclass ConsumerObserver {\n constructor(partialObserver) {\n this.partialObserver = partialObserver;\n }\n next(value) {\n const {\n partialObserver\n } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n error(err) {\n const {\n partialObserver\n } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n } catch (error) {\n handleUnhandledError(error);\n }\n } else {\n handleUnhandledError(err);\n }\n }\n complete() {\n const {\n partialObserver\n } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\nexport class SafeSubscriber extends Subscriber {\n constructor(observerOrNext, error, complete) {\n super();\n let partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined,\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined\n };\n } else {\n let context;\n if (this && config.useDeprecatedNextContext) {\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context)\n };\n } else {\n partialObserver = observerOrNext;\n }\n }\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n } else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n const {\n onStoppedNotification\n } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\nexport const EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop\n};\n","export const observable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')();\n","export function identity(x) {\n return x;\n}\n","import { identity } from './identity';\nexport function pipe(...fns) {\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce((prev, fn) => fn(prev), input);\n };\n}\n","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nexport let Observable = /*#__PURE__*/(() => {\n class Observable {\n constructor(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n lift(operator) {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n subscribe(observerOrNext, error, complete) {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(() => {\n const {\n operator,\n source\n } = this;\n subscriber.add(operator ? operator.call(subscriber, source) : source ? this._subscribe(subscriber) : this._trySubscribe(subscriber));\n });\n return subscriber;\n }\n _trySubscribe(sink) {\n try {\n return this._subscribe(sink);\n } catch (err) {\n sink.error(err);\n }\n }\n forEach(next, promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: value => {\n try {\n next(value);\n } catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve\n });\n this.subscribe(subscriber);\n });\n }\n _subscribe(subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n }\n [Symbol_observable]() {\n return this;\n }\n pipe(...operations) {\n return pipeFromArray(operations)(this);\n }\n toPromise(promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n let value;\n this.subscribe(x => value = x, err => reject(err), () => resolve(value));\n });\n }\n }\n Observable.create = subscribe => {\n return new Observable(subscribe);\n };\n return Observable;\n})();\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return value && value instanceof Subscriber || isObserver(value) && isSubscription(value);\n}\n","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return source => {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n } catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n","import { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nexport class OperatorSubscriber extends Subscriber {\n constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n super(destination);\n this.onFinalize = onFinalize;\n this.shouldUnsubscribe = shouldUnsubscribe;\n this._next = onNext ? function (value) {\n try {\n onNext(value);\n } catch (err) {\n destination.error(err);\n }\n } : super._next;\n this._error = onError ? function (err) {\n try {\n onError(err);\n } catch (err) {\n destination.error(err);\n } finally {\n this.unsubscribe();\n }\n } : super._error;\n this._complete = onComplete ? function () {\n try {\n onComplete();\n } catch (err) {\n destination.error(err);\n } finally {\n this.unsubscribe();\n }\n } : super._complete;\n }\n unsubscribe() {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const {\n closed\n } = this;\n super.unsubscribe();\n !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n }\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function refCount() {\n return operate((source, subscriber) => {\n let connection = null;\n source._refCount++;\n const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => {\n if (!source || source._refCount <= 0 || 0 < --source._refCount) {\n connection = null;\n return;\n }\n const sharedConnection = source._connection;\n const conn = connection;\n connection = null;\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n subscriber.unsubscribe();\n });\n source.subscribe(refCounter);\n if (!refCounter.closed) {\n connection = source.connect();\n }\n });\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\nexport class ConnectableObservable extends Observable {\n constructor(source, subjectFactory) {\n super();\n this.source = source;\n this.subjectFactory = subjectFactory;\n this._subject = null;\n this._refCount = 0;\n this._connection = null;\n if (hasLift(source)) {\n this.lift = source.lift;\n }\n }\n _subscribe(subscriber) {\n return this.getSubject().subscribe(subscriber);\n }\n getSubject() {\n const subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n }\n _teardown() {\n this._refCount = 0;\n const {\n _connection\n } = this;\n this._subject = this._connection = null;\n _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();\n }\n connect() {\n let connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n const subject = this.getSubject();\n connection.add(this.source.subscribe(createOperatorSubscriber(subject, undefined, () => {\n this._teardown();\n subject.complete();\n }, err => {\n this._teardown();\n subject.error(err);\n }, () => this._teardown())));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n }\n refCount() {\n return higherOrderRefCount()(this);\n }\n}\n","import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass(_super => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport let Subject = /*#__PURE__*/(() => {\n class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const {\n observers\n } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const {\n observers\n } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const {\n hasError,\n isStopped,\n observers\n } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const {\n hasError,\n thrownError,\n isStopped\n } = this;\n if (hasError) {\n subscriber.error(thrownError);\n } else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n }\n Subject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n})();\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n","import { Subject } from './Subject';\nexport class BehaviorSubject extends Subject {\n constructor(_value) {\n super();\n this._value = _value;\n }\n get value() {\n return this.getValue();\n }\n _subscribe(subscriber) {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n getValue() {\n const {\n hasError,\n thrownError,\n _value\n } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n next(value) {\n super.next(this._value = value);\n }\n}\n","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined\n};\n","import { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class ReplaySubject extends Subject {\n constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {\n super();\n this._bufferSize = _bufferSize;\n this._windowTime = _windowTime;\n this._timestampProvider = _timestampProvider;\n this._buffer = [];\n this._infiniteTimeWindow = true;\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n next(value) {\n const {\n isStopped,\n _buffer,\n _infiniteTimeWindow,\n _timestampProvider,\n _windowTime\n } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n const subscription = this._innerSubscribe(subscriber);\n const {\n _infiniteTimeWindow,\n _buffer\n } = this;\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n }\n _trimBuffer() {\n const {\n _bufferSize,\n _timestampProvider,\n _buffer,\n _infiniteTimeWindow\n } = this;\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n constructor(scheduler, work) {\n super();\n }\n schedule(state, delay = 0) {\n return this;\n }\n}\n","export const intervalProvider = {\n setInterval(handler, timeout, ...args) {\n const {\n delegate\n } = intervalProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const {\n delegate\n } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined\n};\n","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n schedule(state, delay = 0) {\n var _a;\n if (this.closed) {\n return this;\n }\n this.state = state;\n const id = this.id;\n const scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n requestAsyncId(scheduler, _id, delay = 0) {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n recycleAsyncId(_scheduler, id, delay = 0) {\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n }\n execute(state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n } else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n _execute(state, _delay) {\n let errored = false;\n let errorValue;\n try {\n this.work(state);\n } catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const {\n id,\n scheduler\n } = this;\n const {\n actions\n } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n }\n flush(action) {\n const {\n actions\n } = this;\n if (this._active) {\n actions.push(action);\n return;\n }\n let error;\n this._active = true;\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (action = actions.shift());\n this._active = false;\n if (error) {\n while (action = actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n","import { Observable } from '../Observable';\nexport const EMPTY = new Observable(subscriber => subscriber.complete());\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable(subscriber => scheduler.schedule(() => subscriber.complete()));\n}\n","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n return value && isFunction(value.schedule);\n}\n","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n};\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nexport var __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) {\n if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\");\n return f;\n }\n var kind = contextIn.kind,\n key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _,\n done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) {\n if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f || null));\n };\n var result = (0, decorators[i])(kind === \"accessor\" ? {\n get: descriptor.get,\n set: descriptor.set\n } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n } else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n}\n;\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n}\n;\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n}\n;\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", {\n configurable: true,\n value: prefix ? \"\".concat(prefix, \" \", name) : name\n });\n}\n;\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport var __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = {\n enumerable: true,\n get: function () {\n return m[k];\n }\n };\n }\n Object.defineProperty(o, k2, desc);\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n}\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: false\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\") throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({\n value: value,\n dispose: dispose,\n async: async\n });\n } else if (async) {\n env.stack.push({\n async: true\n });\n }\n return value;\n}\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function (e) {\n fail(e);\n return next();\n });\n } catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources\n};","export const isArrayLike = x => x && typeof x.length === 'number' && typeof x !== 'function';\n","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n","export function createInvalidObservableTypeError(input) {\n return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`);\n}\n","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport const iterator = getSymbolIterator();\n","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n","import { __asyncGenerator, __await } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const {\n value,\n done\n } = yield __await(reader.read());\n if (done) {\n return yield __await(void 0);\n }\n yield yield __await(value);\n }\n } finally {\n reader.releaseLock();\n }\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n","import { __asyncValues, __awaiter } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable(subscriber => {\n const obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable(subscriber => {\n for (let i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable(subscriber => {\n promise.then(value => {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, err => subscriber.error(err)).then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable(subscriber => {\n for (const value of iterable) {\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable(subscriber => {\n process(asyncIterable, subscriber).catch(err => subscriber.error(err));\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_1, _a;\n return __awaiter(this, void 0, void 0, function* () {\n try {\n for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) {\n const value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n subscriber.complete();\n });\n}\n","export function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) {\n const scheduleSubscription = scheduler.schedule(function () {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n } else {\n this.unsubscribe();\n }\n }, delay);\n parentSubscription.add(scheduleSubscription);\n if (!repeat) {\n return scheduleSubscription;\n }\n}\n","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay = 0) {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, value => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), err => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay)));\n });\n}\n","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay = 0) {\n return operate((source, subscriber) => {\n subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay));\n });\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n return new Observable(subscriber => {\n let i = 0;\n return scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n } else {\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n return new Observable(subscriber => {\n let iterator;\n executeSchedule(subscriber, scheduler, () => {\n iterator = input[Symbol_iterator]();\n executeSchedule(subscriber, scheduler, () => {\n let value;\n let done;\n try {\n ({\n value,\n done\n } = iterator.next());\n } catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n } else {\n subscriber.next(value);\n }\n }, 0, true);\n });\n return () => isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return();\n });\n}\n","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(subscriber => {\n executeSchedule(subscriber, scheduler, () => {\n const iterator = input[Symbol.asyncIterator]();\n executeSchedule(subscriber, scheduler, () => {\n iterator.next().then(result => {\n if (result.done) {\n subscriber.complete();\n } else {\n subscriber.next(result.value);\n }\n });\n }, 0, true);\n });\n });\n}\n","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of(...args) {\n const scheduler = popScheduler(args);\n return from(args, scheduler);\n}\n","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;\n const init = subscriber => subscriber.error(errorFactory());\n return new Observable(scheduler ? subscriber => scheduler.schedule(init, 0, subscriber) : init);\n}\n","import { Observable } from '../Observable';\nimport { isFunction } from './isFunction';\nexport function isObservable(obj) {\n return !!obj && (obj instanceof Observable || isFunction(obj.lift) && isFunction(obj.subscribe));\n}\n","import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass(_super => function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n});\n","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n","import { map } from \"../operators/map\";\nconst {\n isArray\n} = Array;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(args => callOrApply(fn, args));\n}\n","const {\n isArray\n} = Array;\nconst {\n getPrototypeOf,\n prototype: objectProto,\n keys: getKeys\n} = Object;\nexport function argsArgArrayOrObject(args) {\n if (args.length === 1) {\n const first = args[0];\n if (isArray(first)) {\n return {\n args: first,\n keys: null\n };\n }\n if (isPOJO(first)) {\n const keys = getKeys(first);\n return {\n args: keys.map(key => first[key]),\n keys\n };\n }\n }\n return {\n args: args,\n keys: null\n };\n}\nfunction isPOJO(obj) {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n","export function createObject(keys, values) {\n return keys.reduce((result, key, i) => (result[key] = values[i], result), {});\n}\n","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest(...args) {\n const scheduler = popScheduler(args);\n const resultSelector = popResultSelector(args);\n const {\n args: observables,\n keys\n } = argsArgArrayOrObject(args);\n if (observables.length === 0) {\n return from([], scheduler);\n }\n const result = new Observable(combineLatestInit(observables, scheduler, keys ? values => createObject(keys, values) : identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform = identity) {\n return subscriber => {\n maybeSchedule(scheduler, () => {\n const {\n length\n } = observables;\n const values = new Array(length);\n let active = length;\n let remainingFirstValues = length;\n for (let i = 0; i < length; i++) {\n maybeSchedule(scheduler, () => {\n const source = from(observables[i], scheduler);\n let hasFirstValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, () => {\n if (! --active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n } else {\n execute();\n }\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n const buffer = [];\n let active = 0;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n const outerNext = value => active < concurrent ? doInnerSub(value) : buffer.push(value);\n const doInnerSub = value => {\n expand && subscriber.next(value);\n active++;\n let innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, innerValue => {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n } else {\n subscriber.next(innerValue);\n }\n }, () => {\n innerComplete = true;\n }, undefined, () => {\n if (innerComplete) {\n try {\n active--;\n while (buffer.length && active < concurrent) {\n const bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n } else {\n doInnerSub(bufferedValue);\n }\n }\n checkComplete();\n } catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {\n isComplete = true;\n checkComplete();\n }));\n return () => {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n if (isFunction(resultSelector)) {\n return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n } else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n return mergeMap(identity, concurrent);\n}\n","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n return concatAll()(from(args, popScheduler(args)));\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n return new Observable(subscriber => {\n innerFrom(observableFactory()).subscribe(subscriber);\n });\n}\n","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nexport function forkJoin(...args) {\n const resultSelector = popResultSelector(args);\n const {\n args: sources,\n keys\n } = argsArgArrayOrObject(args);\n const result = new Observable(subscriber => {\n const {\n length\n } = sources;\n if (!length) {\n subscriber.complete();\n return;\n }\n const values = new Array(length);\n let remainingCompletions = length;\n let remainingEmissions = length;\n for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n let hasValue = false;\n innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, value => {\n if (!hasValue) {\n hasValue = true;\n remainingEmissions--;\n }\n values[sourceIndex] = value;\n }, () => remainingCompletions--, undefined, () => {\n if (!remainingCompletions || !hasValue) {\n if (!remainingEmissions) {\n subscriber.next(keys ? createObject(keys, values) : values);\n }\n subscriber.complete();\n }\n }));\n }\n });\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n const [add, remove] = isEventTarget(target) ? eventTargetMethods.map(methodName => handler => target[methodName](eventName, handler, options)) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap(subTarget => fromEvent(subTarget, eventName, options))(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable(subscriber => {\n const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n add(handler);\n return () => remove(handler);\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return methodName => handler => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {\n let intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n } else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable(subscriber => {\n let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n let n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n } else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge(...args) {\n const scheduler = popScheduler(args);\n const concurrent = popNumber(args, Infinity);\n const sources = args;\n return !sources.length ? EMPTY : sources.length === 1 ? innerFrom(sources[0]) : mergeAll(concurrent)(from(sources, scheduler));\n}\n","import { Observable } from '../Observable';\nimport { noop } from '../util/noop';\nexport const NEVER = new Observable(noop);\nexport function never() {\n return NEVER;\n}\n","const {\n isArray\n} = Array;\nexport function argsOrArgArray(args) {\n return args.length === 1 && isArray(args[0]) ? args[0] : args;\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n });\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nexport function race(...sources) {\n sources = argsOrArgArray(sources);\n return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources));\n}\nexport function raceInit(sources) {\n return subscriber => {\n let subscriptions = [];\n for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) {\n subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, value => {\n if (subscriptions) {\n for (let s = 0; s < subscriptions.length; s++) {\n s !== i && subscriptions[s].unsubscribe();\n }\n subscriptions = null;\n }\n subscriber.next(value);\n })));\n }\n };\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate((source, subscriber) => {\n let innerSub = null;\n let syncUnsub = false;\n let handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, err => {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n } else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return (source, subscriber) => {\n let hasState = hasSeed;\n let state = seed;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n const i = index++;\n state = hasState ? accumulator(state, value, i) : (hasState = true, value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete && (() => {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function debounce(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n const emit = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n hasValue = true;\n lastValue = value;\n durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);\n innerFrom(durationSelector(value)).subscribe(durationSubscriber);\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = durationSubscriber = null;\n }));\n });\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler = asyncScheduler) {\n return operate((source, subscriber) => {\n let activeTask = null;\n let lastValue = null;\n let lastTime = null;\n const emit = () => {\n if (activeTask) {\n activeTask.unsubscribe();\n activeTask = null;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle() {\n const targetTime = lastTime + dueTime;\n const now = scheduler.now();\n if (now < targetTime) {\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n emit();\n }\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n lastValue = value;\n lastTime = scheduler.now();\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = activeTask = null;\n }));\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n hasValue = true;\n subscriber.next(value);\n }, () => {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0 ? () => EMPTY : operate((source, subscriber) => {\n let seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n","import { map } from './map';\nexport function mapTo(value) {\n return map(() => value);\n}\n","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return source => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n }\n return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler = asyncScheduler) {\n const duration = timer(due, scheduler);\n return delayWhen(() => duration);\n}\n","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate((source, subscriber) => {\n let previousKey;\n let first = true;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n const currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n hasValue = true;\n subscriber.next(value);\n }, () => hasValue ? subscriber.complete() : subscriber.error(errorFactory())));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n","import { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nexport function endWith(...values) {\n return source => concat(source, of(...values));\n}\n","import { operate } from '../util/lift';\nexport function finalize(callback) {\n return operate((source, subscriber) => {\n try {\n source.subscribe(subscriber);\n } finally {\n subscriber.add(callback);\n }\n });\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return source => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeLast(count) {\n return count <= 0 ? () => EMPTY : operate((source, subscriber) => {\n let buffer = [];\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n buffer.push(value);\n count < buffer.length && buffer.shift();\n }, () => {\n for (const value of buffer) {\n subscriber.next(value);\n }\n subscriber.complete();\n }, undefined, () => {\n buffer = null;\n }));\n });\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return source => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { timer } from '../observable/timer';\nexport function repeat(countOrConfig) {\n let count = Infinity;\n let delay;\n if (countOrConfig != null) {\n if (typeof countOrConfig === 'object') {\n ({\n count = Infinity,\n delay\n } = countOrConfig);\n } else {\n count = countOrConfig;\n }\n }\n return count <= 0 ? () => EMPTY : operate((source, subscriber) => {\n let soFar = 0;\n let sourceSub;\n const resubscribe = () => {\n sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe();\n sourceSub = null;\n if (delay != null) {\n const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar));\n const notifierSubscriber = createOperatorSubscriber(subscriber, () => {\n notifierSubscriber.unsubscribe();\n subscribeToSource();\n });\n notifier.subscribe(notifierSubscriber);\n } else {\n subscribeToSource();\n }\n };\n const subscribeToSource = () => {\n let syncUnsub = false;\n sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, () => {\n if (++soFar < count) {\n if (sourceSub) {\n resubscribe();\n } else {\n syncUnsub = true;\n }\n } else {\n subscriber.complete();\n }\n }));\n if (syncUnsub) {\n resubscribe();\n }\n };\n subscribeToSource();\n });\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function repeatWhen(notifier) {\n return operate((source, subscriber) => {\n let innerSub;\n let syncResub = false;\n let completions$;\n let isNotifierComplete = false;\n let isMainComplete = false;\n const checkComplete = () => isMainComplete && isNotifierComplete && (subscriber.complete(), true);\n const getCompletionSubject = () => {\n if (!completions$) {\n completions$ = new Subject();\n innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, () => {\n if (innerSub) {\n subscribeForRepeatWhen();\n } else {\n syncResub = true;\n }\n }, () => {\n isNotifierComplete = true;\n checkComplete();\n }));\n }\n return completions$;\n };\n const subscribeForRepeatWhen = () => {\n isMainComplete = false;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, () => {\n isMainComplete = true;\n !checkComplete() && getCompletionSubject().next();\n }));\n if (syncResub) {\n innerSub.unsubscribe();\n innerSub = null;\n syncResub = false;\n subscribeForRepeatWhen();\n }\n };\n subscribeForRepeatWhen();\n });\n}\n","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options = {}) {\n const {\n connector = () => new Subject(),\n resetOnError = true,\n resetOnComplete = true,\n resetOnRefCountZero = true\n } = options;\n return wrapperSource => {\n let connection;\n let resetConnection;\n let subject;\n let refCount = 0;\n let hasCompleted = false;\n let hasErrored = false;\n const cancelReset = () => {\n resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n resetConnection = undefined;\n };\n const reset = () => {\n cancelReset();\n connection = subject = undefined;\n hasCompleted = hasErrored = false;\n };\n const resetAndUnsubscribe = () => {\n const conn = connection;\n reset();\n conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n };\n return operate((source, subscriber) => {\n refCount++;\n if (!hasErrored && !hasCompleted) {\n cancelReset();\n }\n const dest = subject = subject !== null && subject !== void 0 ? subject : connector();\n subscriber.add(() => {\n refCount--;\n if (refCount === 0 && !hasErrored && !hasCompleted) {\n resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n }\n });\n dest.subscribe(subscriber);\n if (!connection && refCount > 0) {\n connection = new SafeSubscriber({\n next: value => dest.next(value),\n error: err => {\n hasErrored = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnError, err);\n dest.error(err);\n },\n complete: () => {\n hasCompleted = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnComplete);\n dest.complete();\n }\n });\n innerFrom(source).subscribe(connection);\n }\n })(wrapperSource);\n };\n}\nfunction handleReset(reset, on, ...args) {\n if (on === true) {\n reset();\n return;\n }\n if (on === false) {\n return;\n }\n const onSubscriber = new SafeSubscriber({\n next: () => {\n onSubscriber.unsubscribe();\n reset();\n }\n });\n return innerFrom(on(...args)).subscribe(onSubscriber);\n}\n","import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n let bufferSize;\n let refCount = false;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n ({\n bufferSize = Infinity,\n windowTime = Infinity,\n refCount = false,\n scheduler\n } = configOrBufferSize);\n } else {\n bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity;\n }\n return share({\n connector: () => new ReplaySubject(bufferSize, windowTime, scheduler),\n resetOnError: true,\n resetOnComplete: false,\n resetOnRefCountZero: refCount\n });\n}\n","import { filter } from './filter';\nexport function skip(count) {\n return filter((_, index) => count <= index);\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function skipWhile(predicate) {\n return operate((source, subscriber) => {\n let taking = false;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => (taking || (taking = !predicate(value, index++))) && subscriber.next(value)));\n });\n}\n","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate((source, subscriber) => {\n let innerSubscriber = null;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n let innerIndex = 0;\n const outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = createOperatorSubscriber(subscriber, innerValue => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n innerSubscriber = null;\n checkComplete();\n }));\n }, () => {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n const result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n const tapObserver = isFunction(observerOrNext) || error || complete ? {\n next: observerOrNext,\n error,\n complete\n } : observerOrNext;\n return tapObserver ? operate((source, subscriber) => {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n let isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, () => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, err => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, () => {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n }) : identity;\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function throttle(durationSelector, config) {\n return operate((source, subscriber) => {\n const {\n leading = true,\n trailing = false\n } = config !== null && config !== void 0 ? config : {};\n let hasValue = false;\n let sendValue = null;\n let throttled = null;\n let isComplete = false;\n const endThrottling = () => {\n throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe();\n throttled = null;\n if (trailing) {\n send();\n isComplete && subscriber.complete();\n }\n };\n const cleanupThrottling = () => {\n throttled = null;\n isComplete && subscriber.complete();\n };\n const startThrottle = value => throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling));\n const send = () => {\n if (hasValue) {\n hasValue = false;\n const value = sendValue;\n sendValue = null;\n subscriber.next(value);\n !isComplete && startThrottle(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n hasValue = true;\n sendValue = value;\n !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value));\n }, () => {\n isComplete = true;\n !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete();\n }));\n });\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { throttle } from './throttle';\nimport { timer } from '../observable/timer';\nexport function throttleTime(duration, scheduler = asyncScheduler, config) {\n const duration$ = timer(duration, scheduler);\n return throttle(() => duration$, config);\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { identity } from '../util/identity';\nimport { noop } from '../util/noop';\nimport { popResultSelector } from '../util/args';\nexport function withLatestFrom(...inputs) {\n const project = popResultSelector(inputs);\n return operate((source, subscriber) => {\n const len = inputs.length;\n const otherValues = new Array(len);\n let hasValue = inputs.map(() => false);\n let ready = false;\n for (let i = 0; i < len; i++) {\n innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, value => {\n otherValues[i] = value;\n if (!ready && !hasValue[i]) {\n hasValue[i] = true;\n (ready = hasValue.every(identity)) && (hasValue = null);\n }\n }, noop));\n }\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n if (ready) {\n const values = [value, ...otherValues];\n subscriber.next(project ? project(...values) : values);\n }\n }));\n });\n}\n","/**\n * @license Angular v17.0.7\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { setActiveConsumer as setActiveConsumer$1, consumerDestroy as consumerDestroy$1, SIGNAL as SIGNAL$1, createComputed as createComputed$1, createSignal as createSignal$1, signalSetFn as signalSetFn$1, signalUpdateFn as signalUpdateFn$1, REACTIVE_NODE as REACTIVE_NODE$1, consumerBeforeComputation as consumerBeforeComputation$1, consumerAfterComputation as consumerAfterComputation$1, consumerPollProducersForChange as consumerPollProducersForChange$1, getActiveConsumer as getActiveConsumer$1, createWatch as createWatch$1, setThrowInvalidWriteToSignalError as setThrowInvalidWriteToSignalError$1 } from '@angular/core/primitives/signals';\nimport { Subject, Subscription, Observable, merge as merge$1, BehaviorSubject, of } from 'rxjs';\nimport { share, switchMap, distinctUntilChanged, first } from 'rxjs/operators';\nfunction getClosureSafeProperty(objWithPropertyToExtract) {\n for (let key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === getClosureSafeProperty) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nfunction fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (Array.isArray(token)) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n if (token == null) {\n return '' + token;\n }\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n if (token.name) {\n return `${token.name}`;\n }\n const res = token.toString();\n if (res == null) {\n return '' + res;\n }\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n/**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nfunction concatStringsWithSpace(before, after) {\n return before == null || before === '' ? after === null ? '' : after : after == null || after === '' ? before : before + ' ' + after;\n}\n/**\n * Ellipses the string in the middle when longer than the max length\n *\n * @param string\n * @param maxLength of the output string\n * @returns elispsed string with ... in the middle\n */\nfunction truncateMiddle(str, maxLength = 100) {\n if (!str || maxLength < 1 || str.length <= maxLength) return str;\n if (maxLength == 1) return str.substring(0, 1) + '...';\n const halfLimit = Math.round(maxLength / 2);\n return str.substring(0, halfLimit) + '...' + str.substring(str.length - halfLimit);\n}\nconst __forward_ref__ = /*#__PURE__*/getClosureSafeProperty({\n __forward_ref__: getClosureSafeProperty\n});\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * `forwardRef` is also used to break circularities in standalone components imports.\n *\n * @usageNotes\n * ### Circular dependency example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n *\n * ### Circular standalone reference import example\n * ```ts\n * @Component({\n * standalone: true,\n * imports: [ChildComponent],\n * selector: 'app-parent',\n * template: ``,\n * })\n * export class ParentComponent {\n * @Input() hideParent: boolean;\n * }\n *\n *\n * @Component({\n * standalone: true,\n * imports: [CommonModule, forwardRef(() => ParentComponent)],\n * selector: 'app-child',\n * template: ``,\n * })\n * export class ChildComponent {\n * @Input() hideParent: boolean;\n * }\n * ```\n *\n * @publicApi\n */\nfunction forwardRef(forwardRefFn) {\n forwardRefFn.__forward_ref__ = forwardRef;\n forwardRefFn.toString = function () {\n return stringify(this());\n };\n return forwardRefFn;\n}\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see {@link forwardRef}\n * @publicApi\n */\nfunction resolveForwardRef(type) {\n return isForwardRef(type) ? type() : type;\n}\n/** Checks whether a function is wrapped by a `forwardRef`. */\nfunction isForwardRef(fn) {\n return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef;\n}\nfunction isEnvironmentProviders(value) {\n return value && !!value.ɵproviders;\n}\n\n/**\n * Base URL for the error details page.\n *\n * Keep this constant in sync across:\n * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n * - packages/core/src/error_details_base_url.ts\n */\nconst ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\n/**\n * URL for the XSS security documentation.\n */\nconst XSS_SECURITY_URL = 'https://g.co/ng/security#xss';\n\n/**\n * Class that represents a runtime error.\n * Formats and outputs the error message in a consistent way.\n *\n * Example:\n * ```\n * throw new RuntimeError(\n * RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n * ngDevMode && 'Injector has already been destroyed.');\n * ```\n *\n * Note: the `message` argument contains a descriptive error message as a string in development\n * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the\n * `message` argument becomes `false`, thus we account for it in the typings and the runtime\n * logic.\n */\nclass RuntimeError extends Error {\n constructor(code, message) {\n super(formatRuntimeError(code, message));\n this.code = code;\n }\n}\n/**\n * Called to format a runtime error.\n * See additional info on the `message` argument type in the `RuntimeError` class description.\n */\nfunction formatRuntimeError(code, message) {\n // Error code might be a negative number, which is a special marker that instructs the logic to\n // generate a link to the error details page on angular.io.\n // We also prepend `0` to non-compile-time errors.\n const fullCode = `NG0${Math.abs(code)}`;\n let errorMessage = `${fullCode}${message ? ': ' + message : ''}`;\n if (ngDevMode && code < 0) {\n const addPeriodSeparator = !errorMessage.match(/[.,;!?\\n]$/);\n const separator = addPeriodSeparator ? '.' : '';\n errorMessage = `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\n }\n return errorMessage;\n}\nconst NG_COMP_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵcmp: getClosureSafeProperty\n});\nconst NG_DIR_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵdir: getClosureSafeProperty\n});\nconst NG_PIPE_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵpipe: getClosureSafeProperty\n});\nconst NG_MOD_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵmod: getClosureSafeProperty\n});\nconst NG_FACTORY_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵfac: getClosureSafeProperty\n});\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nconst NG_ELEMENT_ID = /*#__PURE__*/getClosureSafeProperty({\n __NG_ELEMENT_ID__: getClosureSafeProperty\n});\n/**\n * The `NG_ENV_ID` field on a DI token indicates special processing in the `EnvironmentInjector`:\n * getting such tokens from the `EnvironmentInjector` will bypass the standard DI resolution\n * strategy and instead will return implementation produced by the `NG_ENV_ID` factory function.\n *\n * This particular retrieval of DI tokens is mostly done to eliminate circular dependencies and\n * improve tree-shaking.\n */\nconst NG_ENV_ID = /*#__PURE__*/getClosureSafeProperty({\n __NG_ENV_ID__: getClosureSafeProperty\n});\n\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nfunction renderStringify(value) {\n if (typeof value === 'string') return value;\n if (value == null) return '';\n // Use `String` so that it invokes the `toString` method of the value. Note that this\n // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n return String(value);\n}\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n *\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nfunction stringifyForError(value) {\n if (typeof value === 'function') return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n return renderStringify(value);\n}\n/**\n * Used to stringify a `Type` and including the file path and line number in which it is defined, if\n * possible, for better debugging experience.\n *\n * Important! This function contains a megamorphic read and should only be used for error messages.\n */\nfunction debugStringifyTypeForError(type) {\n // TODO(pmvald): Do some refactoring so that we can use getComponentDef here without creating\n // circular deps.\n let componentDef = type[NG_COMP_DEF] || null;\n if (componentDef !== null && componentDef.debugInfo) {\n return stringifyTypeFromDebugInfo(componentDef.debugInfo);\n }\n return stringifyForError(type);\n}\n// TODO(pmvald): Do some refactoring so that we can use the type ClassDebugInfo for the param\n// debugInfo here without creating circular deps.\nfunction stringifyTypeFromDebugInfo(debugInfo) {\n if (!debugInfo.filePath || !debugInfo.lineNumber) {\n return debugInfo.className;\n } else {\n return `${debugInfo.className} (at ${debugInfo.filePath}:${debugInfo.lineNumber})`;\n }\n}\n\n/** Called when directives inject each other (creating a circular dependency) */\nfunction throwCyclicDependencyError(token, path) {\n const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n throw new RuntimeError(-200 /* RuntimeErrorCode.CYCLIC_DI_DEPENDENCY */, `Circular dependency in DI detected for ${token}${depPath}`);\n}\nfunction throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\nfunction throwInvalidProviderError(ngModuleType, providers, provider) {\n if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`);\n } else if (isEnvironmentProviders(provider)) {\n if (provider.ɵfromNgModule) {\n throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`);\n } else {\n throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`);\n }\n } else {\n throw new Error('Invalid provider');\n }\n}\n/** Throws an error when a token is not found in DI. */\nfunction throwProviderNotFoundError(token, injectorName) {\n const injectorDetails = injectorName ? ` in ${injectorName}` : '';\n throw new RuntimeError(-201 /* RuntimeErrorCode.PROVIDER_NOT_FOUND */, ngDevMode && `No provider for ${stringifyForError(token)} found${injectorDetails}`);\n}\n\n// The functions in this file verify that the assumptions we are making\nfunction assertNumber(actual, msg) {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\nfunction assertNumberInRange(actual, minInclusive, maxInclusive) {\n assertNumber(actual, 'Expected a number');\n assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\nfunction assertString(actual, msg) {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\nfunction assertFunction(actual, msg) {\n if (!(typeof actual === 'function')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n }\n}\nfunction assertEqual(actual, expected, msg) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n}\nfunction assertNotEqual(actual, expected, msg) {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n}\nfunction assertSame(actual, expected, msg) {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n}\nfunction assertNotSame(actual, expected, msg) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n}\nfunction assertLessThan(actual, expected, msg) {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n}\nfunction assertLessThanOrEqual(actual, expected, msg) {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n}\nfunction assertGreaterThanOrEqual(actual, expected, msg) {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n}\nfunction assertNotDefined(actual, msg) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n}\nfunction assertDefined(actual, msg) {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n}\nfunction throwError(msg, actual, expected, comparison) {\n throw new Error(`ASSERTION ERROR: ${msg}` + (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\nfunction assertDomNode(node) {\n if (!(node instanceof Node)) {\n throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n }\n}\nfunction assertElement(node) {\n if (!(node instanceof Element)) {\n throwError(`The provided value must be an element but got ${stringify(node)}`);\n }\n}\nfunction assertIndexInRange(arr, index) {\n assertDefined(arr, 'Array must be defined.');\n const maxLen = arr.length;\n if (index < 0 || index >= maxLen) {\n throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n }\n}\nfunction assertOneOf(value, ...validValues) {\n if (validValues.indexOf(value) !== -1) return true;\n throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`);\n}\n\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call [`inject`](api/core/inject) to access the `Injector` and request injection\n * of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nfunction ɵɵdefineInjectable(opts) {\n return {\n token: opts.token,\n providedIn: opts.providedIn || null,\n factory: opts.factory,\n value: undefined\n };\n}\n/**\n * @deprecated in v8, delete after v10. This API should be used only by generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nconst defineInjectable = ɵɵdefineInjectable;\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n * either have a factory or point to a type which has a `ɵprov` static property (the\n * type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n * whose providers will also be added to the injector. Locally provided types will override\n * providers from imports.\n *\n * @codeGenApi\n */\nfunction ɵɵdefineInjector(options) {\n return {\n providers: options.providers || [],\n imports: options.imports || []\n };\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nfunction getInjectableDef(type) {\n return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\nfunction isInjectable(type) {\n return getInjectableDef(type) !== null;\n}\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition(type, field) {\n return type.hasOwnProperty(field) ? type[field] : null;\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n * scenario if we find the `ɵprov` on an ancestor only.\n */\nfunction getInheritedInjectableDef(type) {\n const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n if (def) {\n ngDevMode && console.warn(`DEPRECATED: DI is instantiating a token \"${type.name}\" that inherits its @Injectable decorator but does not provide one itself.\\n` + `This will become an error in a future version of Angular. Please add @Injectable() to the \"${type.name}\" class.`);\n return def;\n } else {\n return null;\n }\n}\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nfunction getInjectorDef(type) {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ? type[NG_INJ_DEF] : null;\n}\nconst NG_PROV_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵprov: getClosureSafeProperty\n});\nconst NG_INJ_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵinj: getClosureSafeProperty\n});\n// We need to keep these around so we can read off old defs if new defs are unavailable\nconst NG_INJECTABLE_DEF = /*#__PURE__*/getClosureSafeProperty({\n ngInjectableDef: getClosureSafeProperty\n});\nconst NG_INJECTOR_DEF = /*#__PURE__*/getClosureSafeProperty({\n ngInjectorDef: getClosureSafeProperty\n});\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n * @deprecated use an options object for [`inject`](api/core/inject) instead.\n */\nvar InjectFlags = /*#__PURE__*/function (InjectFlags) {\n // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n // writes exports of it into ngfactory files.\n /** Check self and check parent injector if needed */\n InjectFlags[InjectFlags[\"Default\"] = 0] = \"Default\";\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n InjectFlags[InjectFlags[\"Host\"] = 1] = \"Host\";\n /** Don't ascend to ancestors of the node requesting injection. */\n InjectFlags[InjectFlags[\"Self\"] = 2] = \"Self\";\n /** Skip the node that is requesting injection. */\n InjectFlags[InjectFlags[\"SkipSelf\"] = 4] = \"SkipSelf\";\n /** Inject `defaultValue` instead if token not found. */\n InjectFlags[InjectFlags[\"Optional\"] = 8] = \"Optional\";\n return InjectFlags;\n}(InjectFlags || {});\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n * 1. `Injector` should not depend on ivy logic.\n * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation;\nfunction getInjectImplementation() {\n return _injectImplementation;\n}\n/**\n * Sets the current inject implementation.\n */\nfunction setInjectImplementation(impl) {\n const previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * injectable definition.\n */\nfunction injectRootLimpMode(token, notFoundValue, flags) {\n const injectableDef = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : injectableDef.value;\n }\n if (flags & InjectFlags.Optional) return null;\n if (notFoundValue !== undefined) return notFoundValue;\n throwProviderNotFoundError(stringify(token), 'Injector');\n}\n/**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\nfunction assertInjectImplementationNotEqual(fn) {\n ngDevMode && assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\n}\nconst _global = globalThis;\nfunction ngDevModeResetPerfCounters() {\n const locationString = typeof location !== 'undefined' ? location.toString() : '';\n const newCounters = {\n namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n firstCreatePass: 0,\n tNode: 0,\n tView: 0,\n rendererCreateTextNode: 0,\n rendererSetText: 0,\n rendererCreateElement: 0,\n rendererAddEventListener: 0,\n rendererSetAttribute: 0,\n rendererRemoveAttribute: 0,\n rendererSetProperty: 0,\n rendererSetClassName: 0,\n rendererAddClass: 0,\n rendererRemoveClass: 0,\n rendererSetStyle: 0,\n rendererRemoveStyle: 0,\n rendererDestroy: 0,\n rendererDestroyNode: 0,\n rendererMoveNode: 0,\n rendererRemoveNode: 0,\n rendererAppendChild: 0,\n rendererInsertBefore: 0,\n rendererCreateComment: 0,\n hydratedNodes: 0,\n hydratedComponents: 0,\n dehydratedViewsRemoved: 0,\n dehydratedViewsCleanupRuns: 0,\n componentsSkippedHydration: 0\n };\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n _global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n return newCounters;\n}\n/**\n * This function checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nfunction initNgDevMode() {\n // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n // reset the counters.\n // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n // yet.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (typeof ngDevMode !== 'object') {\n ngDevModeResetPerfCounters();\n }\n return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n }\n return false;\n}\n\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides an additional level of type safety.\n *\n *
\n *\n * **Important Note**: Ensure that you use the same instance of the `InjectionToken` in both the\n * provider and the injection call. Creating a new instance of `InjectionToken` in different places,\n * even with the same description, will be treated as different tokens by Angular's DI system,\n * leading to a `NullInjectorError`.\n *\n *
\n *\n * \n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the [`inject`](api/core/inject) function.\n * As you can see in the Tree-shakable InjectionToken example below.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule` (note:\n * this option is now deprecated). As mentioned above, `'root'` is the default value for\n * `providedIn`.\n *\n * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.\n *\n * @usageNotes\n * ### Basic Examples\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\nclass InjectionToken {\n /**\n * @param _desc Description for the token,\n * used only for debugging purposes,\n * it should but does not need to be unique\n * @param options Options for the token's usage, as described above\n */\n constructor(_desc, options) {\n this._desc = _desc;\n /** @internal */\n this.ngMetadataName = 'InjectionToken';\n this.ɵprov = undefined;\n if (typeof options == 'number') {\n (typeof ngDevMode === 'undefined' || ngDevMode) && assertLessThan(options, 0, 'Only negative numbers are supported here');\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // See `InjectorMarkers`\n this.__NG_ELEMENT_ID__ = options;\n } else if (options !== undefined) {\n this.ɵprov = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory\n });\n }\n }\n /**\n * @internal\n */\n get multi() {\n return this;\n }\n toString() {\n return `InjectionToken ${this._desc}`;\n }\n}\nlet _injectorProfilerContext;\nfunction getInjectorProfilerContext() {\n !ngDevMode && throwError('getInjectorProfilerContext should never be called in production mode');\n return _injectorProfilerContext;\n}\nfunction setInjectorProfilerContext(context) {\n !ngDevMode && throwError('setInjectorProfilerContext should never be called in production mode');\n const previous = _injectorProfilerContext;\n _injectorProfilerContext = context;\n return previous;\n}\nlet injectorProfilerCallback = null;\n/**\n * Sets the callback function which will be invoked during certain DI events within the\n * runtime (for example: injecting services, creating injectable instances, configuring providers)\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nconst setInjectorProfiler = injectorProfiler => {\n !ngDevMode && throwError('setInjectorProfiler should never be called in production mode');\n injectorProfilerCallback = injectorProfiler;\n};\n/**\n * Injector profiler function which emits on DI events executed by the runtime.\n *\n * @param event InjectorProfilerEvent corresponding to the DI event being emitted\n */\nfunction injectorProfiler(event) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n if (injectorProfilerCallback != null /* both `null` and `undefined` */) {\n injectorProfilerCallback(event);\n }\n}\n/**\n * Emits an InjectorProfilerEventType.ProviderConfigured to the injector profiler. The data in the\n * emitted event includes the raw provider, as well as the token that provider is providing.\n *\n * @param eventProvider A provider object\n */\nfunction emitProviderConfiguredEvent(eventProvider, isViewProvider = false) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n let token;\n // if the provider is a TypeProvider (typeof provider is function) then the token is the\n // provider itself\n if (typeof eventProvider === 'function') {\n token = eventProvider;\n }\n // if the provider is an injection token, then the token is the injection token.\n else if (eventProvider instanceof InjectionToken) {\n token = eventProvider;\n }\n // in all other cases we can access the token via the `provide` property of the provider\n else {\n token = resolveForwardRef(eventProvider.provide);\n }\n let provider = eventProvider;\n // Injection tokens may define their own default provider which gets attached to the token itself\n // as `ɵprov`. In this case, we want to emit the provider that is attached to the token, not the\n // token itself.\n if (eventProvider instanceof InjectionToken) {\n provider = eventProvider.ɵprov || eventProvider;\n }\n injectorProfiler({\n type: 2 /* InjectorProfilerEventType.ProviderConfigured */,\n context: getInjectorProfilerContext(),\n providerRecord: {\n token,\n provider,\n isViewProvider\n }\n });\n}\n/**\n * Emits an event to the injector profiler with the instance that was created. Note that\n * the injector associated with this emission can be accessed by using getDebugInjectContext()\n *\n * @param instance an object created by an injector\n */\nfunction emitInstanceCreatedByInjectorEvent(instance) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n injectorProfiler({\n type: 1 /* InjectorProfilerEventType.InstanceCreatedByInjector */,\n context: getInjectorProfilerContext(),\n instance: {\n value: instance\n }\n });\n}\n/**\n * @param token DI token associated with injected service\n * @param value the instance of the injected service (i.e the result of `inject(token)`)\n * @param flags the flags that the token was injected with\n */\nfunction emitInjectEvent(token, value, flags) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n injectorProfiler({\n type: 0 /* InjectorProfilerEventType.Inject */,\n context: getInjectorProfilerContext(),\n service: {\n token,\n value,\n flags\n }\n });\n}\nfunction runInInjectorProfilerContext(injector, token, callback) {\n !ngDevMode && throwError('runInInjectorProfilerContext should never be called in production mode');\n const prevInjectContext = setInjectorProfilerContext({\n injector,\n token\n });\n try {\n callback();\n } finally {\n setInjectorProfilerContext(prevInjectContext);\n }\n}\nconst _THROW_IF_NOT_FOUND = {};\nconst THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\nconst NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nconst SOURCE = '__source';\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector = undefined;\nfunction getCurrentInjector() {\n return _currentInjector;\n}\nfunction setCurrentInjector(injector) {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\nfunction injectInjectorOnly(token, flags = InjectFlags.Default) {\n if (_currentInjector === undefined) {\n throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode && `inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \\`runInInjectionContext\\`.`);\n } else if (_currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n } else {\n const value = _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n ngDevMode && emitInjectEvent(token, value, flags);\n return value;\n }\n}\nfunction ɵɵinject(token, flags = InjectFlags.Default) {\n return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactoryDep(index) {\n throw new RuntimeError(202 /* RuntimeErrorCode.INVALID_FACTORY_DEPENDENCY */, ngDevMode && `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.`);\n}\n/**\n * Injects a token from the currently active injector.\n * `inject` is only supported in an [injection context](/guide/dependency-injection-context). It can\n * be used during:\n * - Construction (via the `constructor`) of a class being instantiated by the DI system, such\n * as an `@Injectable` or `@Component`.\n * - In the initializer for fields of such classes.\n * - In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`.\n * - In the `factory` function specified for an `InjectionToken`.\n * - In a stackframe of a function call in a DI context\n *\n * @param token A token that represents a dependency that should be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @usageNotes\n * In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a\n * field initializer:\n *\n * ```typescript\n * @Injectable({providedIn: 'root'})\n * export class Car {\n * radio: Radio|undefined;\n * // OK: field initializer\n * spareTyre = inject(Tyre);\n *\n * constructor() {\n * // OK: constructor body\n * this.radio = inject(Radio);\n * }\n * }\n * ```\n *\n * It is also legal to call `inject` from a provider's factory:\n *\n * ```typescript\n * providers: [\n * {provide: Car, useFactory: () => {\n * // OK: a class factory\n * const engine = inject(Engine);\n * return new Car(engine);\n * }}\n * ]\n * ```\n *\n * Calls to the `inject()` function outside of the class creation context will result in error. Most\n * notably, calls to `inject()` are disallowed after a class instance was created, in methods\n * (including lifecycle hooks):\n *\n * ```typescript\n * @Component({ ... })\n * export class CarComponent {\n * ngOnInit() {\n * // ERROR: too late, the component instance was already created\n * const engine = inject(Engine);\n * engine.start();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction inject(token, flags = InjectFlags.Default) {\n return ɵɵinject(token, convertToBitFlags(flags));\n}\n// Converts object-based DI flags (`InjectOptions`) to bit flags (`InjectFlags`).\nfunction convertToBitFlags(flags) {\n if (typeof flags === 'undefined' || typeof flags === 'number') {\n return flags;\n }\n // While TypeScript doesn't accept it without a cast, bitwise OR with false-y values in\n // JavaScript is a no-op. We can use that for a very codesize-efficient conversion from\n // `InjectOptions` to `InjectFlags`.\n return 0 /* InternalInjectFlags.Default */ | (\n // comment to force a line break in the formatter\n flags.optional && 8 /* InternalInjectFlags.Optional */) | (flags.host && 1 /* InternalInjectFlags.Host */) | (flags.self && 2 /* InternalInjectFlags.Self */) | (flags.skipSelf && 4 /* InternalInjectFlags.SkipSelf */);\n}\n\nfunction injectArgs(types) {\n const args = [];\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode && 'Arguments array must have arguments.');\n }\n let type = undefined;\n let flags = InjectFlags.Default;\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n const flag = getInjectFlag(meta);\n if (typeof flag === 'number') {\n // Special case when we handle @Inject decorator.\n if (flag === -1 /* DecoratorFlags.Inject */) {\n type = meta.token;\n } else {\n flags |= flag;\n }\n } else {\n type = meta;\n }\n }\n args.push(ɵɵinject(type, flags));\n } else {\n args.push(ɵɵinject(arg));\n }\n }\n return args;\n}\n/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nfunction attachInjectFlag(decorator, flag) {\n decorator[DI_DECORATOR_FLAG] = flag;\n decorator.prototype[DI_DECORATOR_FLAG] = flag;\n return decorator;\n}\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nfunction getInjectFlag(token) {\n return token[DI_DECORATOR_FLAG];\n}\nfunction catchInjectorError(e, token, injectorErrorName, source) {\n const tokenPath = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n}\nfunction formatError(text, obj, injectorErrorName, source = null) {\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;\n let context = stringify(obj);\n if (Array.isArray(obj)) {\n context = obj.map(stringify).join(' -> ');\n } else if (typeof obj === 'object') {\n let parts = [];\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n let value = obj[key];\n parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = `{${parts.join(', ')}}`;\n }\n return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\\n ')}`;\n}\n\n/**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nfunction noSideEffects(fn) {\n return {\n toString: fn\n }.toString();\n}\n\n/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nvar ChangeDetectionStrategy = /*#__PURE__*/function (ChangeDetectionStrategy) {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explicitly invoked.\n * This strategy applies to all child directives and cannot be overridden.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n return ChangeDetectionStrategy;\n}(ChangeDetectionStrategy || {});\n/**\n * Defines the CSS styles encapsulation policies for the {@link Component} decorator's\n * `encapsulation` option.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nvar ViewEncapsulation$1 = /*#__PURE__*/function (ViewEncapsulation) {\n // TODO: consider making `ViewEncapsulation` a `const enum` instead. See\n // https://github.com/angular/angular/issues/44119 for additional information.\n /**\n * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the\n * component's host element and applying the same attribute to all the CSS selectors provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.\n *\n * This is the default option.\n */\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n /**\n * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable\n * to any HTML element of the application regardless of their host Component.\n */\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n /**\n * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates\n * a ShadowRoot for the component's host element which is then used to encapsulate\n * all the Component's styling.\n */\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n return ViewEncapsulation;\n}(ViewEncapsulation$1 || {});\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\nconst EMPTY_OBJ = {};\nconst EMPTY_ARRAY = [];\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && /*#__PURE__*/initNgDevMode()) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n /*#__PURE__*/Object.freeze(EMPTY_OBJ);\n // tslint:disable-next-line:no-toplevel-property-access\n /*#__PURE__*/Object.freeze(EMPTY_ARRAY);\n}\n\n/**\n * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nfunction classIndexOf(className, classToSearch, startingIndex) {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n let end = className.length;\n while (true) {\n const foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1) return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* CharCode.SPACE */) {\n // Ensure that it has leading whitespace\n const length = classToSearch.length;\n if (foundIndex + length === end || className.charCodeAt(foundIndex + length) <= 32 /* CharCode.SPACE */) {\n // Ensure that it has trailing whitespace\n return foundIndex;\n }\n }\n // False positive, keep searching from where we left off.\n startingIndex = foundIndex + 1;\n }\n}\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n * attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n * @param renderer The renderer to be used\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nfunction setUpAttributes(renderer, native, attrs) {\n let i = 0;\n while (i < attrs.length) {\n const value = attrs[i];\n if (typeof value === 'number') {\n // only namespaces are supported. Other value types (such as style/class\n // entries) are not supported in this function.\n if (value !== 0 /* AttributeMarker.NamespaceURI */) {\n break;\n }\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n const namespaceURI = attrs[i++];\n const attrName = attrs[i++];\n const attrVal = attrs[i++];\n ngDevMode && ngDevMode.rendererSetAttribute++;\n renderer.setAttribute(native, attrName, attrVal, namespaceURI);\n } else {\n // attrName is string;\n const attrName = value;\n const attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n renderer.setProperty(native, attrName, attrVal);\n } else {\n renderer.setAttribute(native, attrName, attrVal);\n }\n i++;\n }\n }\n // another piece of code may iterate over the same attributes array. Therefore\n // it may be helpful to return the exact spot where the attributes array exited\n // whether by running into an unsupported marker or if all the static values were\n // iterated over.\n return i;\n}\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nfunction isNameOnlyAttributeMarker(marker) {\n return marker === 3 /* AttributeMarker.Bindings */ || marker === 4 /* AttributeMarker.Template */ || marker === 6 /* AttributeMarker.I18n */;\n}\n\nfunction isAnimationProp(name) {\n // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n // charCodeAt doesn't allocate memory to return a substring.\n return name.charCodeAt(0) === 64 /* CharCode.AT_SIGN */;\n}\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nfunction mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {\n // do nothing\n } else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n } else {\n let srcMarker = -1 /* AttributeMarker.ImplicitAttributes */;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === 0 /* AttributeMarker.NamespaceURI */) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n } else if (srcMarker === -1 /* AttributeMarker.ImplicitAttributes */ || srcMarker === 2 /* AttributeMarker.Styles */) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n } else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n return dst;\n}\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nfunction mergeHostAttribute(dst, marker, key1, key2, value) {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === -1 /* AttributeMarker.ImplicitAttributes */) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n // search until you find place of insertion\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n } else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n }\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n}\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n * addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {\n // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.\n // It is strange to me that sometimes the class information comes in form of `class` attribute\n // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine\n // if that is the right behavior.\n ngDevMode && assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n let i = 0;\n // Indicates whether we are processing value from the implicit\n // attribute section (i.e. before the first marker in the array).\n let isImplicitAttrsSection = true;\n while (i < attrs.length) {\n let item = attrs[i++];\n if (typeof item === 'string' && isImplicitAttrsSection) {\n const value = attrs[i++];\n if (isProjectionMode && item === 'class') {\n // We found a `class` attribute in the implicit attribute section,\n // check if it matches the value of the `cssClassToMatch` argument.\n if (classIndexOf(value.toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\n }\n } else if (item === 1 /* AttributeMarker.Classes */) {\n // We found the classes section. Start searching for the class.\n while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n // while we have strings\n if (item.toLowerCase() === cssClassToMatch) return true;\n }\n return false;\n } else if (typeof item === 'number') {\n // We've came across a first marker, which indicates\n // that the implicit attribute section is over.\n isImplicitAttrsSection = false;\n }\n }\n return false;\n}\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nfunction isInlineTemplate(tNode) {\n return tNode.type === 4 /* TNodeType.Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n const tagNameToCompare = tNode.type === 4 /* TNodeType.Container */ && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n return currentSelector === tagNameToCompare;\n}\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nfunction isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode = 4 /* SelectorFlags.ELEMENT */;\n const nodeAttrs = tNode.attrs || [];\n // Find the index of first attribute that has no value, only a name.\n const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n let skipToNextSelector = false;\n for (let i = 0; i < selector.length; i++) {\n const current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current)) continue;\n skipToNextSelector = false;\n mode = current | mode & 1 /* SelectorFlags.NOT */;\n continue;\n }\n if (skipToNextSelector) continue;\n if (mode & 4 /* SelectorFlags.ELEMENT */) {\n mode = 2 /* SelectorFlags.ATTRIBUTE */ | mode & 1 /* SelectorFlags.NOT */;\n if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) || current === '' && selector.length === 1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else {\n const selectorAttrValue = mode & 8 /* SelectorFlags.CLASS */ ? current : selector[++i];\n // special case for matching against classes when a tNode has been instantiated with\n // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n if (mode & 8 /* SelectorFlags.CLASS */ && tNode.attrs !== null) {\n if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n continue;\n }\n const attrName = mode & 8 /* SelectorFlags.CLASS */ ? 'class' : current;\n const attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);\n if (attrIndexInNode === -1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n continue;\n }\n if (selectorAttrValue !== '') {\n let nodeAttrValue;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n } else {\n ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* AttributeMarker.NamespaceURI */, 'We do not match directives on namespaced attributes');\n // we lowercase the attribute value to be able to match\n // selectors without case-sensitivity\n // (selectors are already in lowercase when generated)\n nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();\n }\n const compareAgainstClassName = mode & 8 /* SelectorFlags.CLASS */ ? nodeAttrValue : null;\n if (compareAgainstClassName && classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 || mode & 2 /* SelectorFlags.ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n return isPositive(mode) || skipToNextSelector;\n}\nfunction isPositive(mode) {\n return (mode & 1 /* SelectorFlags.NOT */) === 0;\n}\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g ``).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n if (attrs === null) return -1;\n let i = 0;\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n } else if (maybeAttrName === 3 /* AttributeMarker.Bindings */ || maybeAttrName === 6 /* AttributeMarker.I18n */) {\n bindingsMode = true;\n } else if (maybeAttrName === 1 /* AttributeMarker.Classes */ || maybeAttrName === 2 /* AttributeMarker.Styles */) {\n let value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n } else if (maybeAttrName === 4 /* AttributeMarker.Template */) {\n // We do not care about Template attributes in this scenario.\n break;\n } else if (maybeAttrName === 0 /* AttributeMarker.NamespaceURI */) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n } else {\n return matchTemplateAttribute(attrs, name);\n }\n}\nfunction isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* AttributeMarker.ProjectAs */);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1];\n }\n }\n return null;\n}\nfunction getNameOnlyMarkerIndex(nodeAttrs) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\nfunction matchTemplateAttribute(attrs, name) {\n let i = attrs.indexOf(4 /* AttributeMarker.Template */);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n const attr = attrs[i];\n // Return in case we checked all template attrs and are switching to the next section in the\n // attrs array (that starts with a number that represents an attribute marker).\n if (typeof attr === 'number') return -1;\n if (attr === name) return i;\n i++;\n }\n }\n return -1;\n}\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nfunction isSelectorInSelectorList(selector, list) {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n}\nfunction maybeWrapInNotSelector(isNegativeMode, chunk) {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\nfunction stringifyCSSSelector(selector) {\n let result = selector[0];\n let i = 1;\n let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n let currentChunk = '';\n let isNegativeMode = false;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & 2 /* SelectorFlags.ATTRIBUTE */) {\n const attrValue = selector[++i];\n currentChunk += '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n } else if (mode & 8 /* SelectorFlags.CLASS */) {\n currentChunk += '.' + valueOrMarker;\n } else if (mode & 4 /* SelectorFlags.ELEMENT */) {\n currentChunk += ' ' + valueOrMarker;\n }\n } else {\n //\n // Append current chunk to the final result in case we come across SelectorFlag, which\n // indicates that the previous section of a selector is over. We need to accumulate content\n // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n // ```\n // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n // ```\n // should be transformed to `.classA :not(.classB .classC)`.\n //\n // Note: for negative selector part, we accumulate content between flags until we find the\n // next negative flag. This is needed to support a case where `:not()` rule contains more than\n // one chunk, e.g. the following selector:\n // ```\n // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n // ```\n // should be stringified to `:not(p.foo) :not(.bar)`\n //\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector.\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n}\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nfunction stringifyCSSSelectorList(selectorList) {\n return selectorList.map(stringifyCSSSelector).join(',');\n}\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nfunction extractAttrsAndClassesFromSelector(selector) {\n const attrs = [];\n const classes = [];\n let i = 1;\n let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === 2 /* SelectorFlags.ATTRIBUTE */) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i]);\n }\n } else if (mode === 8 /* SelectorFlags.CLASS */) {\n classes.push(valueOrMarker);\n }\n } else {\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n // extracted only for \"positive\" part of the selector, we can stop here.\n if (!isPositive(mode)) break;\n mode = valueOrMarker;\n }\n i++;\n }\n return {\n attrs,\n classes\n };\n}\n\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyComponent {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵcmp = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\nfunction ɵɵdefineComponent(componentDefinition) {\n return noSideEffects(() => {\n // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n const baseDef = getNgDirectiveDef(componentDefinition);\n const def = {\n ...baseDef,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n template: componentDefinition.template,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null,\n pipeDefs: null,\n dependencies: baseDef.standalone && componentDefinition.dependencies || null,\n getStandaloneInjector: null,\n signals: componentDefinition.signals ?? false,\n data: componentDefinition.data || {},\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation$1.Emulated,\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n id: ''\n };\n initFeatures(def);\n const dependencies = componentDefinition.dependencies;\n def.directiveDefs = extractDefListOrFactory(dependencies, /* pipeDef */false);\n def.pipeDefs = extractDefListOrFactory(dependencies, /* pipeDef */true);\n def.id = getComponentId(def);\n return def;\n });\n}\nfunction extractDirectiveDef(type) {\n return getComponentDef(type) || getDirectiveDef(type);\n}\nfunction nonNull(value) {\n return value !== null;\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵdefineNgModule(def) {\n return noSideEffects(() => {\n const res = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null\n };\n return res;\n });\n}\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject(obj, secondary) {\n if (obj == null) return EMPTY_OBJ;\n const newLookup = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n let publicName = obj[minifiedKey];\n let declaredName = publicName;\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n newLookup[publicName] = minifiedKey;\n if (secondary) {\n secondary[publicName] = declaredName;\n }\n }\n }\n return newLookup;\n}\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵdir = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵdefineDirective(directiveDefinition) {\n return noSideEffects(() => {\n const def = getNgDirectiveDef(directiveDefinition);\n initFeatures(def);\n return def;\n });\n}\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ɵpipe = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nfunction ɵɵdefinePipe(pipeDef) {\n return {\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\n standalone: pipeDef.standalone === true,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n };\n}\n/**\n * The following getter methods retrieve the definition from the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\nfunction getComponentDef(type) {\n return type[NG_COMP_DEF] || null;\n}\nfunction getDirectiveDef(type) {\n return type[NG_DIR_DEF] || null;\n}\nfunction getPipeDef$1(type) {\n return type[NG_PIPE_DEF] || null;\n}\n/**\n * Checks whether a given Component, Directive or Pipe is marked as standalone.\n * This will return false if passed anything other than a Component, Directive, or Pipe class\n * See [this guide](/guide/standalone-components) for additional information:\n *\n * @param type A reference to a Component, Directive or Pipe.\n * @publicApi\n */\nfunction isStandalone(type) {\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n return def !== null ? def.standalone : false;\n}\nfunction getNgModuleDef(type, throwNotFound) {\n const ngModuleDef = type[NG_MOD_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n }\n return ngModuleDef;\n}\nfunction getNgDirectiveDef(directiveDefinition) {\n const declaredInputs = {};\n return {\n type: directiveDefinition.type,\n providersResolver: null,\n factory: null,\n hostBindings: directiveDefinition.hostBindings || null,\n hostVars: directiveDefinition.hostVars || 0,\n hostAttrs: directiveDefinition.hostAttrs || null,\n contentQueries: directiveDefinition.contentQueries || null,\n declaredInputs,\n inputTransforms: null,\n inputConfig: directiveDefinition.inputs || EMPTY_OBJ,\n exportAs: directiveDefinition.exportAs || null,\n standalone: directiveDefinition.standalone === true,\n signals: directiveDefinition.signals === true,\n selectors: directiveDefinition.selectors || EMPTY_ARRAY,\n viewQuery: directiveDefinition.viewQuery || null,\n features: directiveDefinition.features || null,\n setInput: null,\n findHostDirectiveDefs: null,\n hostDirectives: null,\n inputs: invertObject(directiveDefinition.inputs, declaredInputs),\n outputs: invertObject(directiveDefinition.outputs),\n debugInfo: null\n };\n}\nfunction initFeatures(definition) {\n definition.features?.forEach(fn => fn(definition));\n}\nfunction extractDefListOrFactory(dependencies, pipeDef) {\n if (!dependencies) {\n return null;\n }\n const defExtractor = pipeDef ? getPipeDef$1 : extractDirectiveDef;\n return () => (typeof dependencies === 'function' ? dependencies() : dependencies).map(dep => defExtractor(dep)).filter(nonNull);\n}\n/**\n * A map that contains the generated component IDs and type.\n */\nconst GENERATED_COMP_IDS = /*#__PURE__*/new Map();\n/**\n * A method can returns a component ID from the component definition using a variant of DJB2 hash\n * algorithm.\n */\nfunction getComponentId(componentDef) {\n let hash = 0;\n // We cannot rely solely on the component selector as the same selector can be used in different\n // modules.\n //\n // `componentDef.style` is not used, due to it causing inconsistencies. Ex: when server\n // component styles has no sourcemaps and browsers do.\n //\n // Example:\n // https://github.com/angular/components/blob/d9f82c8f95309e77a6d82fd574c65871e91354c2/src/material/core/option/option.ts#L248\n // https://github.com/angular/components/blob/285f46dc2b4c5b127d356cb7c4714b221f03ce50/src/material/legacy-core/option/option.ts#L32\n const hashSelectors = [componentDef.selectors, componentDef.ngContentSelectors, componentDef.hostVars, componentDef.hostAttrs, componentDef.consts, componentDef.vars, componentDef.decls, componentDef.encapsulation, componentDef.standalone, componentDef.signals, componentDef.exportAs, JSON.stringify(componentDef.inputs), JSON.stringify(componentDef.outputs),\n // We cannot use 'componentDef.type.name' as the name of the symbol will change and will not\n // match in the server and browser bundles.\n Object.getOwnPropertyNames(componentDef.type.prototype), !!componentDef.contentQueries, !!componentDef.viewQuery].join('|');\n for (const char of hashSelectors) {\n hash = Math.imul(31, hash) + char.charCodeAt(0) << 0;\n }\n // Force positive number hash.\n // 2147483647 = equivalent of Integer.MAX_VALUE.\n hash += 2147483647 + 1;\n const compId = 'c' + hash;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (GENERATED_COMP_IDS.has(compId)) {\n const previousCompDefType = GENERATED_COMP_IDS.get(compId);\n if (previousCompDefType !== componentDef.type) {\n console.warn(formatRuntimeError(-912 /* RuntimeErrorCode.COMPONENT_ID_COLLISION */, `Component ID generation collision detected. Components '${previousCompDefType.name}' and '${componentDef.type.name}' with selector '${stringifyCSSSelectorList(componentDef.selectors)}' generated the same component ID. To fix this, you can change the selector of one of those components or add an extra host attribute to force a different ID.`));\n }\n } else {\n GENERATED_COMP_IDS.set(compId, componentDef.type);\n }\n }\n return compId;\n}\n\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nconst HOST = 0;\nconst TVIEW = 1;\n// Shared with LContainer\nconst FLAGS = 2;\nconst PARENT = 3;\nconst NEXT = 4;\nconst T_HOST = 5;\n// End shared with LContainer\nconst HYDRATION = 6;\nconst CLEANUP = 7;\nconst CONTEXT = 8;\nconst INJECTOR$1 = 9;\nconst ENVIRONMENT = 10;\nconst RENDERER = 11;\nconst CHILD_HEAD = 12;\nconst CHILD_TAIL = 13;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nconst DECLARATION_VIEW = 14;\nconst DECLARATION_COMPONENT_VIEW = 15;\nconst DECLARATION_LCONTAINER = 16;\nconst PREORDER_HOOK_FLAGS = 17;\nconst QUERIES = 18;\nconst ID = 19;\nconst EMBEDDED_VIEW_INJECTOR = 20;\nconst ON_DESTROY_HOOKS = 21;\nconst EFFECTS_TO_SCHEDULE = 22;\nconst REACTIVE_TEMPLATE_CONSUMER = 23;\n/**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\nconst HEADER_OFFSET = 25;\n\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nconst TYPE = 1;\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n// FLAGS, PARENT, NEXT, and T_HOST are indices 2, 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\nconst DEHYDRATED_VIEWS = 6;\nconst NATIVE = 7;\nconst VIEW_REFS = 8;\nconst MOVED_VIEWS = 9;\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nconst CONTAINER_HEADER_OFFSET = 10;\n/** Flags associated with an LContainer (saved in LContainer[FLAGS]) */\nvar LContainerFlags = /*#__PURE__*/function (LContainerFlags) {\n LContainerFlags[LContainerFlags[\"None\"] = 0] = \"None\";\n /**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`.\n */\n LContainerFlags[LContainerFlags[\"HasTransplantedViews\"] = 2] = \"HasTransplantedViews\";\n /**\n * Indicates that this LContainer has a view underneath it that needs to be refreshed during\n * change detection.\n */\n LContainerFlags[LContainerFlags[\"HasChildViewsToRefresh\"] = 4] = \"HasChildViewsToRefresh\";\n return LContainerFlags;\n}(LContainerFlags || {});\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLView(value) {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLContainer(value) {\n return Array.isArray(value) && value[TYPE] === true;\n}\nfunction isContentQueryHost(tNode) {\n return (tNode.flags & 4 /* TNodeFlags.hasContentQuery */) !== 0;\n}\nfunction isComponentHost(tNode) {\n return tNode.componentOffset > -1;\n}\nfunction isDirectiveHost(tNode) {\n return (tNode.flags & 1 /* TNodeFlags.isDirectiveHost */) === 1 /* TNodeFlags.isDirectiveHost */;\n}\n\nfunction isComponentDef(def) {\n return !!def.template;\n}\nfunction isRootView(target) {\n return (target[FLAGS] & 512 /* LViewFlags.IsRoot */) !== 0;\n}\nfunction isProjectionTNode(tNode) {\n return (tNode.type & 16 /* TNodeType.Projection */) === 16 /* TNodeType.Projection */;\n}\n\nfunction hasI18n(lView) {\n return (lView[FLAGS] & 32 /* LViewFlags.HasI18n */) === 32 /* LViewFlags.HasI18n */;\n}\n\nfunction isDestroyed(lView) {\n return (lView[FLAGS] & 256 /* LViewFlags.Destroyed */) === 256 /* LViewFlags.Destroyed */;\n}\n\n// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\nfunction assertTNodeForLView(tNode, lView) {\n assertTNodeForTView(tNode, lView[TVIEW]);\n}\nfunction assertTNodeForTView(tNode, tView) {\n assertTNode(tNode);\n const tData = tView.data;\n for (let i = HEADER_OFFSET; i < tData.length; i++) {\n if (tData[i] === tNode) {\n return;\n }\n }\n throwError('This TNode does not belong to this TView.');\n}\nfunction assertTNode(tNode) {\n assertDefined(tNode, 'TNode must be defined');\n if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n throwError('Not of type TNode, got: ' + tNode);\n }\n}\nfunction assertTIcu(tIcu) {\n assertDefined(tIcu, 'Expected TIcu to be defined');\n if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n throwError('Object is not of TIcu type.');\n }\n}\nfunction assertComponentType(actual, msg = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.') {\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n}\nfunction assertNgModuleType(actual, msg = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.') {\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\nfunction assertCurrentTNodeIsParent(isParent) {\n assertEqual(isParent, true, 'currentTNode should be a parent');\n}\nfunction assertHasParent(tNode) {\n assertDefined(tNode, 'currentTNode should exist!');\n assertDefined(tNode.parent, 'currentTNode should have a parent');\n}\nfunction assertLContainer(value) {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\nfunction assertLViewOrUndefined(value) {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\nfunction assertLView(value) {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\nfunction assertFirstCreatePass(tView, errMessage) {\n assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\nfunction assertFirstUpdatePass(tView, errMessage) {\n assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\n}\n/**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\nfunction assertDirectiveDef(obj) {\n if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n throwError(`Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`);\n }\n}\nfunction assertIndexInDeclRange(tView, index) {\n assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\nfunction assertIndexInExpandoRange(lView, index) {\n const tView = lView[1];\n assertBetween(tView.expandoStartIndex, lView.length, index);\n}\nfunction assertBetween(lower, upper, index) {\n if (!(lower <= index && index < upper)) {\n throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n }\n}\nfunction assertProjectionSlots(lView, errMessage) {\n assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage || 'Components with projection nodes () must have projection slots defined.');\n}\nfunction assertParentView(lView, errMessage) {\n assertDefined(lView, errMessage || 'Component views should always have a parent view (component\\'s host view)');\n}\nfunction assertNoDuplicateDirectives(directives) {\n // The array needs at least two elements in order to have duplicates.\n if (directives.length < 2) {\n return;\n }\n const seenDirectives = new Set();\n for (const current of directives) {\n if (seenDirectives.has(current)) {\n throw new RuntimeError(309 /* RuntimeErrorCode.DUPLICATE_DIRECTIVE */, `Directive ${current.type.name} matches multiple times on the same element. ` + `Directives can only match an element once.`);\n }\n seenDirectives.add(current);\n }\n}\n/**\n * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a\n * NodeInjector data structure.\n *\n * @param lView `LView` which should be checked.\n * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.\n */\nfunction assertNodeInjector(lView, injectorIndex) {\n assertIndexInExpandoRange(lView, injectorIndex);\n assertIndexInExpandoRange(lView, injectorIndex + 8 /* NodeInjectorOffset.PARENT */);\n assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */], 'injectorIndex should point to parent injector');\n}\nfunction getFactoryDef(type, throwNotFound) {\n const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\n\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see {@link OnChanges}\n *\n * @publicApi\n */\nclass SimpleChange {\n constructor(previousValue, currentValue, firstChange) {\n this.previousValue = previousValue;\n this.currentValue = currentValue;\n this.firstChange = firstChange;\n }\n /**\n * Check whether the new value is the first value assigned.\n */\n isFirstChange() {\n return this.firstChange;\n }\n}\n\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ɵcmp = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵNgOnChangesFeature() {\n return NgOnChangesFeatureImpl;\n}\nfunction NgOnChangesFeatureImpl(definition) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n }\n return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n// This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\nɵɵNgOnChangesFeature.ngInherit = true;\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n * it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook() {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore?.current;\n if (current) {\n const previous = simpleChangesStore.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore.previous = current;\n } else {\n // New changes are copied to the previous store, so that we don't lose history for inputs\n // which were not changed this time\n for (let key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore.current = null;\n this.ngOnChanges(current);\n }\n}\nfunction ngOnChangesSetInput(instance, value, publicName, privateName) {\n const declaredName = this.declaredInputs[publicName];\n ngDevMode && assertString(declaredName, 'Name of input in ngOnChanges has to be a string');\n const simpleChangesStore = getSimpleChangesStore(instance) || setSimpleChangesStore(instance, {\n previous: EMPTY_OBJ,\n current: null\n });\n const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n const previous = simpleChangesStore.previous;\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n instance[privateName] = value;\n}\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\nfunction getSimpleChangesStore(instance) {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\nfunction setSimpleChangesStore(instance, store) {\n return instance[SIMPLE_CHANGES_STORE] = store;\n}\nlet profilerCallback = null;\n/**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nconst setProfiler = profiler => {\n profilerCallback = profiler;\n};\n/**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n * execution context\n * @returns\n */\nconst profiler = function (event, instance, hookOrListener) {\n if (profilerCallback != null /* both `null` and `undefined` */) {\n profilerCallback(event, instance, hookOrListener);\n }\n};\nconst SVG_NAMESPACE = 'svg';\nconst MATH_ML_NAMESPACE = 'math';\n\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n * - `typeof value[TYPE] === 'object'` => `LView`\n * - This happens when we have a component at a given location\n * - `typeof value[TYPE] === true` => `LContainer`\n * - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapRNode(value) {\n while (Array.isArray(value)) {\n value = value[HOST];\n }\n return value;\n}\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapLView(value) {\n while (Array.isArray(value)) {\n // This check is same as `isLView()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'object') return value;\n value = value[HOST];\n }\n return null;\n}\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nfunction getNativeByIndex(index, lView) {\n ngDevMode && assertIndexInRange(lView, index);\n ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n return unwrapRNode(lView[index]);\n}\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNode(tNode, lView) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n const node = unwrapRNode(lView[tNode.index]);\n return node;\n}\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNodeOrNull(tNode, lView) {\n const index = tNode === null ? -1 : tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const node = unwrapRNode(lView[index]);\n return node;\n }\n return null;\n}\n// fixme(misko): The return Type should be `TNode|null`\nfunction getTNode(tView, index) {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n const tNode = tView.data[index];\n ngDevMode && tNode !== null && assertTNode(tNode);\n return tNode;\n}\n/** Retrieves a value from any `LView` or `TData`. */\nfunction load(view, index) {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n}\nfunction getComponentLViewByIndex(nodeIndex, hostView) {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n ngDevMode && assertIndexInRange(hostView, nodeIndex);\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\n/** Checks whether a given view is in creation mode */\nfunction isCreationMode(view) {\n return (view[FLAGS] & 4 /* LViewFlags.CreationMode */) === 4 /* LViewFlags.CreationMode */;\n}\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nfunction viewAttachedToChangeDetector(view) {\n return (view[FLAGS] & 128 /* LViewFlags.Attached */) === 128 /* LViewFlags.Attached */;\n}\n/** Returns a boolean for whether the view is attached to a container. */\nfunction viewAttachedToContainer(view) {\n return isLContainer(view[PARENT]);\n}\nfunction getConstant(consts, index) {\n if (index === null || index === undefined) return null;\n ngDevMode && assertIndexInRange(consts, index);\n return consts[index];\n}\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nfunction resetPreOrderHookFlags(lView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\n}\n/**\n * Adds the `RefreshView` flag from the lView and updates HAS_CHILD_VIEWS_TO_REFRESH flag of\n * parents.\n */\nfunction markViewForRefresh(lView) {\n if (lView[FLAGS] & 1024 /* LViewFlags.RefreshView */) {\n return;\n }\n lView[FLAGS] |= 1024 /* LViewFlags.RefreshView */;\n if (viewAttachedToChangeDetector(lView)) {\n markAncestorsForTraversal(lView);\n }\n}\n/**\n * Walks up the LView hierarchy.\n * @param nestingLevel Number of times to walk up in hierarchy.\n * @param currentView View from which to start the lookup.\n */\nfunction walkUpViews(nestingLevel, currentView) {\n while (nestingLevel > 0) {\n ngDevMode && assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');\n currentView = currentView[DECLARATION_VIEW];\n nestingLevel--;\n }\n return currentView;\n}\nfunction requiresRefreshOrTraversal(lView) {\n return lView[FLAGS] & (1024 /* LViewFlags.RefreshView */ | 8192 /* LViewFlags.HasChildViewsToRefresh */) || lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty;\n}\n/**\n * Updates the `HasChildViewsToRefresh` flag on the parents of the `LView` as well as the\n * parents above.\n */\nfunction updateAncestorTraversalFlagsOnAttach(lView) {\n if (!requiresRefreshOrTraversal(lView)) {\n return;\n }\n markAncestorsForTraversal(lView);\n}\n/**\n * Ensures views above the given `lView` are traversed during change detection even when they are\n * not dirty.\n *\n * This is done by setting the `HAS_CHILD_VIEWS_TO_REFRESH` flag up to the root, stopping when the\n * flag is already `true` or the `lView` is detached.\n */\nfunction markAncestorsForTraversal(lView) {\n let parent = lView[PARENT];\n while (parent !== null) {\n // We stop adding markers to the ancestors once we reach one that already has the marker. This\n // is to avoid needlessly traversing all the way to the root when the marker already exists.\n if (isLContainer(parent) && parent[FLAGS] & LContainerFlags.HasChildViewsToRefresh || isLView(parent) && parent[FLAGS] & 8192 /* LViewFlags.HasChildViewsToRefresh */) {\n break;\n }\n if (isLContainer(parent)) {\n parent[FLAGS] |= LContainerFlags.HasChildViewsToRefresh;\n } else {\n parent[FLAGS] |= 8192 /* LViewFlags.HasChildViewsToRefresh */;\n if (!viewAttachedToChangeDetector(parent)) {\n break;\n }\n }\n parent = parent[PARENT];\n }\n}\n/**\n * Stores a LView-specific destroy callback.\n */\nfunction storeLViewOnDestroy(lView, onDestroyCallback) {\n if ((lView[FLAGS] & 256 /* LViewFlags.Destroyed */) === 256 /* LViewFlags.Destroyed */) {\n throw new RuntimeError(911 /* RuntimeErrorCode.VIEW_ALREADY_DESTROYED */, ngDevMode && 'View has already been destroyed.');\n }\n if (lView[ON_DESTROY_HOOKS] === null) {\n lView[ON_DESTROY_HOOKS] = [];\n }\n lView[ON_DESTROY_HOOKS].push(onDestroyCallback);\n}\n/**\n * Removes previously registered LView-specific destroy callback.\n */\nfunction removeLViewOnDestroy(lView, onDestroyCallback) {\n if (lView[ON_DESTROY_HOOKS] === null) return;\n const destroyCBIdx = lView[ON_DESTROY_HOOKS].indexOf(onDestroyCallback);\n if (destroyCBIdx !== -1) {\n lView[ON_DESTROY_HOOKS].splice(destroyCBIdx, 1);\n }\n}\nconst instructionState = {\n lFrame: /*#__PURE__*/createLFrame(null),\n bindingsEnabled: true,\n skipHydrationRootTNode: null\n};\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * The `checkNoChanges` function is invoked only in ngDevMode=true and verifies that no unintended\n * changes exist in the change detector or its children.\n */\nlet _isInCheckNoChangesMode = false;\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nfunction specOnlyIsInstructionStateEmpty() {\n return instructionState.lFrame.parent === null;\n}\nfunction getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\nfunction increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\nfunction decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\nfunction getBindingsEnabled() {\n return instructionState.bindingsEnabled;\n}\n/**\n * Returns true if currently inside a skip hydration block.\n * @returns boolean\n */\nfunction isInSkipHydrationBlock$1() {\n return instructionState.skipHydrationRootTNode !== null;\n}\n/**\n * Returns true if this is the root TNode of the skip hydration block.\n * @param tNode the current TNode\n * @returns boolean\n */\nfunction isSkipHydrationRootTNode(tNode) {\n return instructionState.skipHydrationRootTNode === tNode;\n}\n/**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * \n * Should match component / directive.\n * \n *
\n * \n * \n * Should not match component / directive because we are in ngNonBindable.\n * \n * \n *
\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵenableBindings() {\n instructionState.bindingsEnabled = true;\n}\n/**\n * Sets a flag to specify that the TNode is in a skip hydration block.\n * @param tNode the current TNode\n */\nfunction enterSkipHydrationBlock(tNode) {\n instructionState.skipHydrationRootTNode = tNode;\n}\n/**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * \n * Should match component / directive.\n * \n *
\n * \n * \n * Should not match component / directive because we are in ngNonBindable.\n * \n * \n *
\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵdisableBindings() {\n instructionState.bindingsEnabled = false;\n}\n/**\n * Clears the root skip hydration node when leaving a skip hydration block.\n */\nfunction leaveSkipHydrationBlock() {\n instructionState.skipHydrationRootTNode = null;\n}\n/**\n * Return the current `LView`.\n */\nfunction getLView() {\n return instructionState.lFrame.lView;\n}\n/**\n * Return the current `TView`.\n */\nfunction getTView() {\n return instructionState.lFrame.tView;\n}\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nfunction ɵɵrestoreView(viewToRestore) {\n instructionState.lFrame.contextLView = viewToRestore;\n return viewToRestore[CONTEXT];\n}\n/**\n * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in\n * value so that it can be used as a return value of an instruction.\n *\n * @codeGenApi\n */\nfunction ɵɵresetView(value) {\n instructionState.lFrame.contextLView = null;\n return value;\n}\nfunction getCurrentTNode() {\n let currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === 64 /* TNodeType.Placeholder */) {\n currentTNode = currentTNode.parent;\n }\n return currentTNode;\n}\nfunction getCurrentTNodePlaceholderOk() {\n return instructionState.lFrame.currentTNode;\n}\nfunction getCurrentParentTNode() {\n const lFrame = instructionState.lFrame;\n const currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode.parent;\n}\nfunction setCurrentTNode(tNode, isParent) {\n ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n const lFrame = instructionState.lFrame;\n lFrame.currentTNode = tNode;\n lFrame.isParent = isParent;\n}\nfunction isCurrentTNodeParent() {\n return instructionState.lFrame.isParent;\n}\nfunction setCurrentTNodeAsNotParent() {\n instructionState.lFrame.isParent = false;\n}\nfunction getContextLView() {\n const contextLView = instructionState.lFrame.contextLView;\n ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');\n return contextLView;\n}\nfunction isInCheckNoChangesMode() {\n !ngDevMode && throwError('Must never be called in production mode');\n return _isInCheckNoChangesMode;\n}\nfunction setIsInCheckNoChangesMode(mode) {\n !ngDevMode && throwError('Must never be called in production mode');\n _isInCheckNoChangesMode = mode;\n}\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nfunction getBindingRoot() {\n const lFrame = instructionState.lFrame;\n let index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n}\nfunction getBindingIndex() {\n return instructionState.lFrame.bindingIndex;\n}\nfunction setBindingIndex(value) {\n return instructionState.lFrame.bindingIndex = value;\n}\nfunction nextBindingIndex() {\n return instructionState.lFrame.bindingIndex++;\n}\nfunction incrementBindingIndex(count) {\n const lFrame = instructionState.lFrame;\n const index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\nfunction isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n}\nfunction setInI18nBlock(isInI18nBlock) {\n instructionState.lFrame.inI18n = isInI18nBlock;\n}\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n * whose `hostBindings` are being processed.\n */\nfunction setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {\n const lFrame = instructionState.lFrame;\n lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nfunction getCurrentDirectiveIndex() {\n return instructionState.lFrame.currentDirectiveIndex;\n}\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nfunction setCurrentDirectiveIndex(currentDirectiveIndex) {\n instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nfunction getCurrentDirectiveDef(tData) {\n const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n}\nfunction getCurrentQueryIndex() {\n return instructionState.lFrame.currentQueryIndex;\n}\nfunction setCurrentQueryIndex(value) {\n instructionState.lFrame.currentQueryIndex = value;\n}\n/**\n * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\nfunction getDeclarationTNode(lView) {\n const tView = lView[TVIEW];\n // Return the declaration parent for embedded views\n if (tView.type === 2 /* TViewType.Embedded */) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n // Falling back to `T_HOST` in case we cross component boundary.\n if (tView.type === 1 /* TViewType.Component */) {\n return lView[T_HOST];\n }\n // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n return null;\n}\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n * tree from `tNode` until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated\n * `NodeInjector` can be found and we should instead use `ModuleInjector`.\n * - If `true` than this call must be fallowed by `leaveDI`\n * - If `false` than this call failed and we should NOT call `leaveDI`\n */\nfunction enterDI(lView, tNode, flags) {\n ngDevMode && assertLViewOrUndefined(lView);\n if (flags & InjectFlags.SkipSelf) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n let parentTNode = tNode;\n let parentLView = lView;\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode.parent;\n if (parentTNode === null && !(flags & InjectFlags.Host)) {\n parentTNode = getDeclarationTNode(parentLView);\n if (parentTNode === null) break;\n // In this case, a parent exists and is definitely an element. So it will definitely\n // have an existing lView as the declaration view, which is why we can assume it's defined.\n ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n parentLView = parentLView[DECLARATION_VIEW];\n // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n // We want to skip those and look only at Elements and ElementContainers to ensure\n // we're looking at true parent nodes, and not content or other types.\n if (parentTNode.type & (2 /* TNodeType.Element */ | 8 /* TNodeType.ElementContainer */)) {\n break;\n }\n } else {\n break;\n }\n }\n if (parentTNode === null) {\n // If we failed to find a parent TNode this means that we should use module injector.\n return false;\n } else {\n tNode = parentTNode;\n lView = parentLView;\n }\n }\n ngDevMode && assertTNodeForLView(tNode, lView);\n const lFrame = instructionState.lFrame = allocLFrame();\n lFrame.currentTNode = tNode;\n lFrame.lView = lView;\n return true;\n}\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @returns the previously active lView;\n */\nfunction enterView(newView) {\n ngDevMode && assertNotEqual(newView[0], newView[1], '????');\n ngDevMode && assertLViewOrUndefined(newView);\n const newLFrame = allocLFrame();\n if (ngDevMode) {\n assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n }\n const tView = newView[TVIEW];\n instructionState.lFrame = newLFrame;\n ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n newLFrame.currentTNode = tView.firstChild;\n newLFrame.lView = newView;\n newLFrame.tView = tView;\n newLFrame.contextLView = newView;\n newLFrame.bindingIndex = tView.bindingStartIndex;\n newLFrame.inI18n = false;\n}\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n const currentLFrame = instructionState.lFrame;\n const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n}\nfunction createLFrame(parent) {\n const lFrame = {\n currentTNode: null,\n isParent: true,\n lView: null,\n tView: null,\n selectedIndex: -1,\n contextLView: null,\n elementDepthCount: 0,\n currentNamespace: null,\n currentDirectiveIndex: -1,\n bindingRootIndex: -1,\n bindingIndex: -1,\n currentQueryIndex: 0,\n parent: parent,\n child: null,\n inI18n: false\n };\n parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n return lFrame;\n}\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `currentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight() {\n const oldLFrame = instructionState.lFrame;\n instructionState.lFrame = oldLFrame.parent;\n oldLFrame.currentTNode = null;\n oldLFrame.lView = null;\n return oldLFrame;\n}\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nconst leaveDI = leaveViewLight;\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nfunction leaveView() {\n const oldLFrame = leaveViewLight();\n oldLFrame.isParent = true;\n oldLFrame.tView = null;\n oldLFrame.selectedIndex = -1;\n oldLFrame.contextLView = null;\n oldLFrame.elementDepthCount = 0;\n oldLFrame.currentDirectiveIndex = -1;\n oldLFrame.currentNamespace = null;\n oldLFrame.bindingRootIndex = -1;\n oldLFrame.bindingIndex = -1;\n oldLFrame.currentQueryIndex = 0;\n}\nfunction nextContextImpl(level) {\n const contextLView = instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView);\n return contextLView[CONTEXT];\n}\n/**\n * Gets the currently selected element index.\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nfunction getSelectedIndex() {\n return instructionState.lFrame.selectedIndex;\n}\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nfunction setSelectedIndex(index) {\n ngDevMode && index !== -1 && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n ngDevMode && assertLessThan(index, instructionState.lFrame.lView.length, 'Can\\'t set index passed end of LView');\n instructionState.lFrame.selectedIndex = index;\n}\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nfunction getSelectedTNode() {\n const lFrame = instructionState.lFrame;\n return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceMathML() {\n instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceHTML() {\n namespaceHTMLInternal();\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nfunction namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\nfunction getNamespace$1() {\n return instructionState.lFrame.currentNamespace;\n}\nlet _wasLastNodeCreated = true;\n/**\n * Retrieves a global flag that indicates whether the most recent DOM node\n * was created or hydrated.\n */\nfunction wasLastNodeCreated() {\n return _wasLastNodeCreated;\n}\n/**\n * Sets a global flag to indicate whether the most recent DOM node\n * was created or hydrated.\n */\nfunction lastNodeWasCreated(flag) {\n _wasLastNodeCreated = flag;\n}\n\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n */\nfunction registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n ngDevMode && assertFirstCreatePass(tView);\n const {\n ngOnChanges,\n ngOnInit,\n ngDoCheck\n } = directiveDef.type.prototype;\n if (ngOnChanges) {\n const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n (tView.preOrderHooks ??= []).push(directiveIndex, wrappedOnChanges);\n (tView.preOrderCheckHooks ??= []).push(directiveIndex, wrappedOnChanges);\n }\n if (ngOnInit) {\n (tView.preOrderHooks ??= []).push(0 - directiveIndex, ngOnInit);\n }\n if (ngDoCheck) {\n (tView.preOrderHooks ??= []).push(directiveIndex, ngDoCheck);\n (tView.preOrderCheckHooks ??= []).push(directiveIndex, ngDoCheck);\n }\n}\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nfunction registerPostOrderHooks(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i];\n ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n const lifecycleHooks = directiveDef.type.prototype;\n const {\n ngAfterContentInit,\n ngAfterContentChecked,\n ngAfterViewInit,\n ngAfterViewChecked,\n ngOnDestroy\n } = lifecycleHooks;\n if (ngAfterContentInit) {\n (tView.contentHooks ??= []).push(-i, ngAfterContentInit);\n }\n if (ngAfterContentChecked) {\n (tView.contentHooks ??= []).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks ??= []).push(i, ngAfterContentChecked);\n }\n if (ngAfterViewInit) {\n (tView.viewHooks ??= []).push(-i, ngAfterViewInit);\n }\n if (ngAfterViewChecked) {\n (tView.viewHooks ??= []).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks ??= []).push(i, ngAfterViewChecked);\n }\n if (ngOnDestroy != null) {\n (tView.destroyHooks ??= []).push(i, ngOnDestroy);\n }\n }\n}\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n callHooks(lView, hooks, 3 /* InitPhaseState.InitPhaseCompleted */, nodeIndex);\n}\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n ngDevMode && assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n ngDevMode && assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n let flags = lView[FLAGS];\n if ((flags & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n flags &= 16383 /* LViewFlags.IndexWithinInitPhaseReset */;\n flags += 1 /* LViewFlags.InitPhaseStateIncrementer */;\n lView[FLAGS] = flags;\n }\n}\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(currentView, arr, initPhase, currentNodeIndex) {\n ngDevMode && assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');\n const startIndex = currentNodeIndex !== undefined ? currentView[PREORDER_HOOK_FLAGS] & 65535 /* PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask */ : 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < max; i++) {\n const hook = arr[i + 1];\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i];\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n } else {\n const isInitHook = arr[i] < 0;\n if (isInitHook) {\n currentView[PREORDER_HOOK_FLAGS] += 65536 /* PreOrderHookFlags.NumberOfInitHooksCalledIncrementer */;\n }\n\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] = (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* PreOrderHookFlags.NumberOfInitHooksCalledMask */) + i + 2;\n }\n i++;\n }\n }\n}\n/**\n * Executes a single lifecycle hook, making sure that:\n * - it is called in the non-reactive context;\n * - profiling data are registered.\n */\nfunction callHookInternal(directive, hook) {\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n const prevConsumer = setActiveConsumer$1(null);\n try {\n hook.call(directive);\n } finally {\n setActiveConsumer$1(prevConsumer);\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, directive, hook);\n }\n}\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView, initPhase, arr, i) {\n const isInitHook = arr[i] < 0;\n const hook = arr[i + 1];\n const directiveIndex = isInitHook ? -arr[i] : arr[i];\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> 14 /* LViewFlags.IndexWithinInitPhaseShift */;\n // The init phase state must be always checked here as it may have been recursively updated.\n if (indexWithintInitPhase < currentView[PREORDER_HOOK_FLAGS] >> 16 /* PreOrderHookFlags.NumberOfInitHooksCalledShift */ && (currentView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n currentView[FLAGS] += 16384 /* LViewFlags.IndexWithinInitPhaseIncrementer */;\n callHookInternal(directive, hook);\n }\n } else {\n callHookInternal(directive, hook);\n }\n}\nconst NO_PARENT_INJECTOR = -1;\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array {\n *\n * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Cumulative bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Cumulative bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Cumulative bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Cumulative bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Cumulative bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Cumulative bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Cumulative bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // We need to store a reference to the injector's parent so DI can keep looking up\n * // the injector tree until it finds the dependency it's looking for.\n * [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array {\n *\n * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Shared node bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Shared node bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Shared node bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Shared node bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Shared node bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Shared node bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Shared node bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // Necessary to find directive indices for a particular node.\n * [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n * }\n */\n/**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\nclass NodeInjectorFactory {\n constructor(\n /**\n * Factory to invoke in order to create a new instance.\n */\n factory,\n /**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\n isViewProvider, injectImplementation) {\n this.factory = factory;\n /**\n * Marker set to true during factory invocation to see if we get into recursive loop.\n * Recursive loop causes an error to be displayed.\n */\n this.resolving = false;\n ngDevMode && assertDefined(factory, 'Factory not specified');\n ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n}\nfunction isFactory(obj) {\n return obj instanceof NodeInjectorFactory;\n}\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nfunction toTNodeTypeAsString(tNodeType) {\n let text = '';\n tNodeType & 1 /* TNodeType.Text */ && (text += '|Text');\n tNodeType & 2 /* TNodeType.Element */ && (text += '|Element');\n tNodeType & 4 /* TNodeType.Container */ && (text += '|Container');\n tNodeType & 8 /* TNodeType.ElementContainer */ && (text += '|ElementContainer');\n tNodeType & 16 /* TNodeType.Projection */ && (text += '|Projection');\n tNodeType & 32 /* TNodeType.Icu */ && (text += '|IcuContainer');\n tNodeType & 64 /* TNodeType.Placeholder */ && (text += '|Placeholder');\n return text.length > 0 ? text.substring(1) : text;\n}\n/**\n * Helper function to detect if a given value matches a `TNode` shape.\n *\n * The logic uses the `insertBeforeIndex` and its possible values as\n * a way to differentiate a TNode shape from other types of objects\n * within the `TView.data`. This is not a perfect check, but it can\n * be a reasonable differentiator, since we control the shapes of objects\n * within `TView.data`.\n */\nfunction isTNodeShape(value) {\n return value != null && typeof value === 'object' && (value.insertBeforeIndex === null || typeof value.insertBeforeIndex === 'number' || Array.isArray(value.insertBeforeIndex));\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n *
\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasClassInput(tNode) {\n return (tNode.flags & 8 /* TNodeFlags.hasClassInput */) !== 0;\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n *
\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasStyleInput(tNode) {\n return (tNode.flags & 16 /* TNodeFlags.hasStyleInput */) !== 0;\n}\nfunction assertTNodeType(tNode, expectedTypes, message) {\n assertDefined(tNode, 'should be called with a TNode');\n if ((tNode.type & expectedTypes) === 0) {\n throwError(message || `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`);\n }\n}\nfunction assertPureTNodeType(type) {\n if (!(type === 2 /* TNodeType.Element */ ||\n //\n type === 1 /* TNodeType.Text */ ||\n //\n type === 4 /* TNodeType.Container */ ||\n //\n type === 8 /* TNodeType.ElementContainer */ ||\n //\n type === 32 /* TNodeType.Icu */ ||\n //\n type === 16 /* TNodeType.Projection */ ||\n //\n type === 64 /* TNodeType.Placeholder */)) {\n throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`);\n }\n}\n\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nfunction hasParentInjector(parentLocation) {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\nfunction getParentInjectorIndex(parentLocation) {\n ngDevMode && assertNumber(parentLocation, 'Number expected');\n ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.');\n const parentInjectorIndex = parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n ngDevMode && assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n return parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n}\n\nfunction getParentInjectorViewOffset(parentLocation) {\n return parentLocation >> 16 /* RelativeInjectorLocationFlags.ViewOffsetShift */;\n}\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nfunction getParentInjectorView(location, startView) {\n let viewOffset = getParentInjectorViewOffset(location);\n let parentView = startView;\n // For most cases, the parent injector can be found on the host node (e.g. for component\n // or container), but we must keep the loop here to support the rarer case of deeply nested\n // tags or inline views, where the parent injector might live many views\n // above the child injector.\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW];\n viewOffset--;\n }\n return parentView;\n}\n\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n * constructor(public value: String) {}\n * }\n *\n * @Component({\n * providers: [\n * MyService,\n * {provide: String, value: 'providers' }\n * ]\n * viewProviders: [\n * {provide: String, value: 'viewProviders'}\n * ]\n * })\n * class MyComponent {\n * constructor(myService: MyService, value: String) {\n * // We expect that Component can see into `viewProviders`.\n * expect(value).toEqual('viewProviders');\n * // `MyService` was not declared in `viewProviders` hence it can't see it.\n * expect(myService.value).toEqual('providers');\n * }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\nfunction setIncludeViewProviders(v) {\n const oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n}\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n/**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\nconst BLOOM_BUCKET_BITS = 5;\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n/** Value used when something wasn't found by an injector. */\nconst NOT_FOUND = {};\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nfunction bloomAdd(injectorIndex, tView, type) {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n let id;\n if (typeof type === 'string') {\n id = type.charCodeAt(0) || 0;\n } else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n id = type[NG_ELEMENT_ID];\n }\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n if (id == null) {\n id = type[NG_ELEMENT_ID] = nextNgElementId++;\n }\n // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n const bloomHash = id & BLOOM_MASK;\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n // should be written to.\n tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\n}\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param lView View where the node is stored\n * @returns Node injector\n */\nfunction getOrCreateNodeInjectorForNode(tNode, lView) {\n const existingInjectorIndex = getInjectorIndex(tNode, lView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n const tView = lView[TVIEW];\n if (tView.firstCreatePass) {\n tNode.injectorIndex = lView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(lView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n }\n const parentLoc = getParentInjectorLocation(tNode, lView);\n const injectorIndex = tNode.injectorIndex;\n // If a parent injector can't be found, its location is set to -1.\n // In that case, we don't need to set up a cumulative bloom\n if (hasParentInjector(parentLoc)) {\n const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, lView);\n const parentData = parentLView[TVIEW].data;\n // Creates a cumulative bloom filter that merges the parent's bloom filter\n // and its own cumulative bloom (which contains tokens for all ancestors)\n for (let i = 0; i < 8 /* NodeInjectorOffset.BLOOM_SIZE */; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */] = parentLoc;\n return injectorIndex;\n}\nfunction insertBloom(arr, footer) {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\nfunction getInjectorIndex(tNode, lView) {\n if (tNode.injectorIndex === -1 ||\n // If the injector index is the same as its parent's injector index, then the index has been\n // copied down from the parent node. No injector has been created yet on this node.\n tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex ||\n // After the first template pass, the injector index might exist but the parent values\n // might not have been calculated yet for this instance\n lView[tNode.injectorIndex + 8 /* NodeInjectorOffset.PARENT */] === null) {\n return -1;\n } else {\n ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n return tNode.injectorIndex;\n }\n}\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * @returns Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\nfunction getParentInjectorLocation(tNode, lView) {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n // If we have a parent `TNode` and there is an injector associated with it we are done, because\n // the parent injector is within the current `LView`.\n return tNode.parent.injectorIndex; // ViewOffset is 0\n }\n // When parent injector location is computed it may be outside of the current view. (ie it could\n // be pointing to a declared parent location). This variable stores number of declaration parents\n // we need to walk up in order to find the parent injector location.\n let declarationViewOffset = 0;\n let parentTNode = null;\n let lViewCursor = lView;\n // The parent injector is not in the current `LView`. We will have to walk the declared parent\n // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n // `NodeInjector`.\n while (lViewCursor !== null) {\n parentTNode = getTNodeFromLView(lViewCursor);\n if (parentTNode === null) {\n // If we have no parent, than we are done.\n return NO_PARENT_INJECTOR;\n }\n ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]);\n // Every iteration of the loop requires that we go to the declared parent.\n declarationViewOffset++;\n lViewCursor = lViewCursor[DECLARATION_VIEW];\n if (parentTNode.injectorIndex !== -1) {\n // We found a NodeInjector which points to something.\n return parentTNode.injectorIndex | declarationViewOffset << 16 /* RelativeInjectorLocationFlags.ViewOffsetShift */;\n }\n }\n\n return NO_PARENT_INJECTOR;\n}\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nfunction diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n}\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * \n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ɵcmp = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n ngDevMode && assertTNodeType(tNode, 12 /* TNodeType.AnyContainer */ | 3 /* TNodeType.AnyRNode */);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\n const attrs = tNode.attrs;\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n while (i < attrsLength) {\n const value = attrs[i];\n // If we hit a `Bindings` or `Template` marker then we are done.\n if (isNameOnlyAttributeMarker(value)) break;\n // Skip namespaced attributes\n if (value === 0 /* AttributeMarker.NamespaceURI */) {\n // we skip the next two values\n // as namespaced attributes looks like\n // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n // 'existValue', ...]\n i = i + 2;\n } else if (typeof value === 'number') {\n // Skip to the first value of the marked attribute.\n i++;\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n } else if (value === attrNameToInject) {\n return attrs[i + 1];\n } else {\n i = i + 2;\n }\n }\n }\n return null;\n}\nfunction notFoundValueOrThrow(notFoundValue, token, flags) {\n if (flags & InjectFlags.Optional || notFoundValue !== undefined) {\n return notFoundValue;\n } else {\n throwProviderNotFoundError(token, 'NodeInjector');\n }\n}\n/**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector or throws an exception\n */\nfunction lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {\n if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n const moduleInjector = lView[INJECTOR$1];\n // switch to `injectInjectorOnly` implementation for module injector, since module injector\n // should not have access to Component/Directive DI scope (that may happen through\n // `directiveInject` implementation)\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n } else {\n return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n }\n } finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n return notFoundValueOrThrow(notFoundValue, token, flags);\n}\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {\n if (tNode !== null) {\n // If the view or any of its ancestors have an embedded\n // view injector, we have to look it up there first.\n if (lView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */ &&\n // The token must be present on the current node injector when the `Self`\n // flag is set, so the lookup on embedded view injector(s) can be skipped.\n !(flags & InjectFlags.Self)) {\n const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);\n if (embeddedInjectorValue !== NOT_FOUND) {\n return embeddedInjectorValue;\n }\n }\n // Otherwise try the node injector.\n const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);\n if (value !== NOT_FOUND) {\n return value;\n }\n }\n // Finally, fall back to the module injector.\n return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n}\n/**\n * Returns the value associated to the given token from the node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {\n const bloomHash = bloomHashBitOrFactory(token);\n // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n // so just call the factory function to create it.\n if (typeof bloomHash === 'function') {\n if (!enterDI(lView, tNode, flags)) {\n // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n // flag, the module injector is not searched for that token in Ivy.\n return flags & InjectFlags.Host ? notFoundValueOrThrow(notFoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n }\n try {\n let value;\n if (ngDevMode) {\n runInInjectorProfilerContext(new NodeInjector(getCurrentTNode(), getLView()), token, () => {\n value = bloomHash(flags);\n if (value != null) {\n emitInstanceCreatedByInjectorEvent(value);\n }\n });\n } else {\n value = bloomHash(flags);\n }\n if (value == null && !(flags & InjectFlags.Optional)) {\n throwProviderNotFoundError(token);\n } else {\n return value;\n }\n } finally {\n leaveDI();\n }\n } else if (typeof bloomHash === 'number') {\n // A reference to the previous injector TView that was found while climbing the element\n // injector tree. This is used to know if viewProviders can be accessed on the current\n // injector.\n let previousTView = null;\n let injectorIndex = getInjectorIndex(tNode, lView);\n let parentLocation = NO_PARENT_INJECTOR;\n let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching the parent injector.\n if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];\n if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n } else {\n previousTView = lView[TVIEW];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n // Check the current injector. If it matches, see if it contains token.\n const tView = lView[TVIEW];\n ngDevMode && assertTNodeForLView(tView.data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */], lView);\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n // At this point, we have an injector which *may* contain the token, so we step through\n // the providers and directives associated with the injector's corresponding node to get\n // the instance.\n const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];\n if (parentLocation !== NO_PARENT_INJECTOR && shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */] === hostTElementNode) && bloomHasToken(bloomHash, injectorIndex, lView)) {\n // The def wasn't found anywhere on this node, so it was a false positive.\n // Traverse up the tree and continue searching.\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n } else {\n // If we should not search parent OR If the ancestor bloom filter value does not have the\n // bit corresponding to the directive we can give up on traversing up to find the specific\n // injector.\n injectorIndex = -1;\n }\n }\n }\n return notFoundValue;\n}\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibilities\n const canAccessViewProviders = previousTView == null ?\n // 1) This is the first invocation `previousTView == null` which means that we are at the\n // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n // to look into the ViewProviders is if:\n // - we are on a component\n // - AND the injector set `includeViewProviders` to true (implying that the token can see\n // ViewProviders because it is the Component or a Service which itself was declared in\n // ViewProviders)\n isComponentHost(tNode) && includeViewProviders :\n // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n // In such a case we are only allowed to look into the ViewProviders if:\n // - We just crossed from child View to Parent View `previousTView != currentTView`\n // - AND the parent TNode is an Element.\n // This means that we just came from the Component's View and therefore are allowed to see\n // into the ViewProviders.\n previousTView != currentTView && (tNode.type & 3 /* TNodeType.AnyRNode */) !== 0;\n // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n const isHostSpecialCase = flags & InjectFlags.Host && hostTElementNode === tNode;\n const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n if (injectableIdx !== null) {\n return getNodeInjectable(lView, currentTView, injectableIdx, tNode);\n } else {\n return NOT_FOUND;\n }\n}\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nfunction locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n const injectablesStart = nodeProviderIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount = nodeProviderIndexes >> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */;\n const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i];\n if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart && providerTokenOrDef.type === token) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n const dirDef = tInjectables[directivesStart];\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n}\n/**\n * Retrieve or instantiate the injectable from the `LView` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\nfunction getNodeInjectable(lView, tView, index, tNode) {\n let value = lView[index];\n const tData = tView.data;\n if (isFactory(value)) {\n const factory = value;\n if (factory.resolving) {\n throwCyclicDependencyError(stringifyForError(tData[index]));\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n let prevInjectContext;\n if (ngDevMode) {\n // tData indexes mirror the concrete instances in its corresponding LView.\n // lView[index] here is either the injectable instace itself or a factory,\n // therefore tData[index] is the constructor of that injectable or a\n // definition object that contains the constructor in a `.type` field.\n const token = tData[index].type || tData[index];\n const injector = new NodeInjector(tNode, lView);\n prevInjectContext = setInjectorProfilerContext({\n injector,\n token\n });\n }\n const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n const success = enterDI(lView, tNode, InjectFlags.Default);\n ngDevMode && assertEqual(success, true, 'Because flags do not contain \\`SkipSelf\\' we expect this to always succeed.');\n try {\n value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n ngDevMode && emitInstanceCreatedByInjectorEvent(value);\n // This code path is hit for both directives and providers.\n // For perf reasons, we want to avoid searching for hooks on providers.\n // It does no harm to try (the hooks just won't exist), but the extra\n // checks are unnecessary and this is a hot path. So we check to see\n // if the index of the dependency is in the directive range for this\n // tNode. If it's not, we know it's a provider and skip hook registration.\n if (tView.firstCreatePass && index >= tNode.directiveStart) {\n ngDevMode && assertDirectiveDef(tData[index]);\n registerPreOrderHooks(index, tData[index], tView);\n }\n } finally {\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n previousInjectImplementation !== null && setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n leaveDI();\n }\n }\n return value;\n}\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n * When the returned value is negative then it represents special values such as `Injector`.\n */\nfunction bloomHashBitOrFactory(token) {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n const tokenId =\n // First check with `hasOwnProperty` so we don't get an inherited ID.\n token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined;\n // Negative token IDs are used for special objects such as `Injector`\n if (typeof tokenId === 'number') {\n if (tokenId >= 0) {\n return tokenId & BLOOM_MASK;\n } else {\n ngDevMode && assertEqual(tokenId, -1 /* InjectorMarkers.Injector */, 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n } else {\n return tokenId;\n }\n}\nfunction bloomHasToken(bloomHash, injectorIndex, injectorView) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n // that should be used.\n const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\n // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n return !!(value & mask);\n}\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags, isFirstHostTNode) {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\nfunction getNodeInjectorLView(nodeInjector) {\n return nodeInjector._lView;\n}\nfunction getNodeInjectorTNode(nodeInjector) {\n return nodeInjector._tNode;\n}\nclass NodeInjector {\n constructor(_tNode, _lView) {\n this._tNode = _tNode;\n this._lView = _lView;\n }\n get(token, notFoundValue, flags) {\n return getOrCreateInjectable(this._tNode, this._lView, token, convertToBitFlags(flags), notFoundValue);\n }\n}\n/** Creates a `NodeInjector` for the current node. */\nfunction createNodeInjector() {\n return new NodeInjector(getCurrentTNode(), getLView());\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵgetInheritedFactory(type) {\n return noSideEffects(() => {\n const ownConstructor = type.prototype.constructor;\n const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n const objectPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objectPrototype) {\n const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n // If we hit something that has a factory and the factory isn't the same as the type,\n // we've found the inherited factory. Note the check that the factory isn't the type's\n // own factory is redundant in most cases, but if the user has custom decorators on the\n // class, this lookup will start one level down in the prototype chain, causing us to\n // find the own factory first and potentially triggering an infinite loop downstream.\n if (factory && factory !== ownFactory) {\n return factory;\n }\n parent = Object.getPrototypeOf(parent);\n }\n // There is no factory defined. Either this was improper usage of inheritance\n // (no Angular decorator on the superclass) or there is no constructor at all\n // in the inheritance chain. Since the two cases cannot be distinguished, the\n // latter has to be assumed.\n return t => new t();\n });\n}\nfunction getFactoryOf(type) {\n if (isForwardRef(type)) {\n return () => {\n const factory = getFactoryOf(resolveForwardRef(type));\n return factory && factory();\n };\n }\n return getFactoryDef(type);\n}\n/**\n * Returns a value from the closest embedded or node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {\n let currentTNode = tNode;\n let currentLView = lView;\n // When an LView with an embedded view injector is inserted, it'll likely be interlaced with\n // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).\n // Since the bloom filters for the node injectors have already been constructed and we don't\n // have a way of extracting the records from an injector, the only way to maintain the correct\n // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve\n // the token at each level.\n while (currentTNode !== null && currentLView !== null && currentLView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */ && !(currentLView[FLAGS] & 512 /* LViewFlags.IsRoot */)) {\n ngDevMode && assertTNodeForLView(currentTNode, currentLView);\n // Note that this lookup on the node injector is using the `Self` flag, because\n // we don't want the node injector to look at any parent injectors since we\n // may hit the embedded view injector first.\n const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);\n if (nodeInjectorValue !== NOT_FOUND) {\n return nodeInjectorValue;\n }\n // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191\n let parentTNode = currentTNode.parent;\n // `TNode.parent` includes the parent within the current view only. If it doesn't exist,\n // it means that we've hit the view boundary and we need to go up to the next view.\n if (!parentTNode) {\n // Before we go to the next LView, check if the token exists on the current embedded injector.\n const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];\n if (embeddedViewInjector) {\n const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);\n if (embeddedViewInjectorValue !== NOT_FOUND) {\n return embeddedViewInjectorValue;\n }\n }\n // Otherwise keep going up the tree.\n parentTNode = getTNodeFromLView(currentLView);\n currentLView = currentLView[DECLARATION_VIEW];\n }\n currentTNode = parentTNode;\n }\n return notFoundValue;\n}\n/** Gets the TNode associated with an LView inside of the declaration view. */\nfunction getTNodeFromLView(lView) {\n const tView = lView[TVIEW];\n const tViewType = tView.type;\n // The parent pointer differs based on `TView.type`.\n if (tViewType === 2 /* TViewType.Embedded */) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n } else if (tViewType === 1 /* TViewType.Component */) {\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n return lView[T_HOST];\n }\n return null;\n}\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectAttribute(attrNameToInject) {\n return injectAttributeImpl(getCurrentTNode(), attrNameToInject);\n}\nconst ANNOTATIONS = '__annotations__';\nconst PARAMETERS = '__parameters__';\nconst PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function DecoratorFactory(...args) {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this;\n }\n const annotationInstance = new DecoratorFactory(...args);\n return function TypeDecorator(cls) {\n if (typeFn) typeFn(cls, ...args);\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const annotations = cls.hasOwnProperty(ANNOTATIONS) ? cls[ANNOTATIONS] : Object.defineProperty(cls, ANNOTATIONS, {\n value: []\n })[ANNOTATIONS];\n annotations.push(annotationInstance);\n if (additionalProcessing) additionalProcessing(cls);\n return cls;\n };\n }\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n DecoratorFactory.prototype.ngMetadataName = name;\n DecoratorFactory.annotationCls = DecoratorFactory;\n return DecoratorFactory;\n });\n}\nfunction makeMetadataCtor(props) {\n return function ctor(...args) {\n if (props) {\n const values = props(...args);\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(...args) {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const annotationInstance = new ParamDecoratorFactory(...args);\n ParamDecorator.annotation = annotationInstance;\n return ParamDecorator;\n function ParamDecorator(cls, unusedKey, index) {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const parameters = cls.hasOwnProperty(PARAMETERS) ? cls[PARAMETERS] : Object.defineProperty(cls, PARAMETERS, {\n value: []\n })[PARAMETERS];\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n });\n}\nfunction makePropDecorator(name, props, parentClass, additionalProcessing) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function PropDecoratorFactory(...args) {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const decoratorInstance = new PropDecoratorFactory(...args);\n function PropDecorator(target, name) {\n // target is undefined with standard decorators. This case is not supported and will throw\n // if this decorator is used in JIT mode with standard decorators.\n if (target === undefined) {\n throw new Error('Standard Angular field decorators are not supported in JIT mode.');\n }\n const constructor = target.constructor;\n // Use of Object.defineProperty is important because it creates a non-enumerable property\n // which prevents the property from being copied during subclassing.\n const meta = constructor.hasOwnProperty(PROP_METADATA) ? constructor[PROP_METADATA] : Object.defineProperty(constructor, PROP_METADATA, {\n value: {}\n })[PROP_METADATA];\n meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n if (additionalProcessing) additionalProcessing(target, name, ...args);\n }\n return PropDecorator;\n }\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n PropDecoratorFactory.prototype.ngMetadataName = name;\n PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\n });\n}\n\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Attribute = /*#__PURE__*/makeParamDecorator('Attribute', attributeName => ({\n attributeName,\n __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName)\n}));\n\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nconst emitDistinctChangesOnlyDefaultValue = true;\n/**\n * Base class for query metadata.\n *\n * @see {@link ContentChildren}\n * @see {@link ContentChild}\n * @see {@link ViewChildren}\n * @see {@link ViewChild}\n *\n * @publicApi\n */\nclass Query {}\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nconst ContentChildren = /*#__PURE__*/makePropDecorator('ContentChildren', (selector, data = {}) => ({\n selector,\n first: false,\n isViewQuery: false,\n descendants: false,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n}), Query);\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nconst ContentChild = /*#__PURE__*/makePropDecorator('ContentChild', (selector, data = {}) => ({\n selector,\n first: true,\n isViewQuery: false,\n descendants: true,\n ...data\n}), Query);\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChildren = /*#__PURE__*/makePropDecorator('ViewChildren', (selector, data = {}) => ({\n selector,\n first: false,\n isViewQuery: true,\n descendants: true,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n}), Query);\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChild = /*#__PURE__*/makePropDecorator('ViewChild', (selector, data) => ({\n selector,\n first: true,\n isViewQuery: true,\n descendants: true,\n ...data\n}), Query);\nvar FactoryTarget = /*#__PURE__*/function (FactoryTarget) {\n FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n return FactoryTarget;\n}(FactoryTarget || {});\nvar R3TemplateDependencyKind = /*#__PURE__*/function (R3TemplateDependencyKind) {\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Directive\"] = 0] = \"Directive\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Pipe\"] = 1] = \"Pipe\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"NgModule\"] = 2] = \"NgModule\";\n return R3TemplateDependencyKind;\n}(R3TemplateDependencyKind || {});\nvar ViewEncapsulation = /*#__PURE__*/function (ViewEncapsulation) {\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n return ViewEncapsulation;\n}(ViewEncapsulation || {});\nfunction getCompilerFacade(request) {\n const globalNg = _global['ng'];\n if (globalNg && globalNg.ɵcompilerFacade) {\n return globalNg.ɵcompilerFacade;\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Log the type as an error so that a developer can easily navigate to the type from the\n // console.\n console.error(`JIT compilation failed for ${request.kind}`, request.type);\n let message = `The ${request.kind} '${request.type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n if (request.usage === 1 /* JitCompilerUsage.PartialDeclaration */) {\n message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n message += `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n message += '\\n';\n message += `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n } else {\n message += `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n }\n message += `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n message += `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n throw new Error(message);\n } else {\n throw new Error('JIT compiler unavailable');\n }\n}\n\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nconst Type = Function;\nfunction isType(v) {\n return typeof v === 'function';\n}\n\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n * the array.\n */\nfunction arrayEquals(a, b, identityAccessor) {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n let valueA = a[i];\n let valueB = b[i];\n if (identityAccessor) {\n valueA = identityAccessor(valueA);\n valueB = identityAccessor(valueB);\n }\n if (valueB !== valueA) {\n return false;\n }\n }\n return true;\n}\n/**\n * Flattens an array.\n */\nfunction flatten(list) {\n return list.flat(Number.POSITIVE_INFINITY);\n}\nfunction deepForEach(input, fn) {\n input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\nfunction addToArray(arr, index, value) {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n } else {\n arr.splice(index, 0, value);\n }\n}\nfunction removeFromArray(arr, index) {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n return arr.pop();\n } else {\n return arr.splice(index, 1)[0];\n }\n}\nfunction newArray(size, value) {\n const list = [];\n for (let i = 0; i < size; i++) {\n list.push(value);\n }\n return list;\n}\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nfunction arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nfunction arrayInsert(array, index, value) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n while (end > index) {\n const previousEnd = end - 1;\n array[end] = array[previousEnd];\n end = previousEnd;\n }\n array[index] = value;\n}\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nfunction arrayInsert2(array, index, value1, value2) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n if (end == index) {\n // inserting at the end.\n array.push(value1, value2);\n } else if (end === 1) {\n // corner case when we have less items in array than we have items to insert.\n array.push(value2, array[0]);\n array[0] = value1;\n } else {\n end--;\n array.push(array[end - 1], array[end]);\n while (end > index) {\n const previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\n}\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * located)\n */\nfunction arrayIndexOfSorted(array, value) {\n return _arrayIndexOfSorted(array, value, 0);\n}\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nfunction keyValueArraySet(keyValueArray, key, value) {\n let index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it set it.\n keyValueArray[index | 1] = value;\n } else {\n index = ~index;\n arrayInsert2(keyValueArray, index, key, value);\n }\n return index;\n}\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nfunction keyValueArrayGet(keyValueArray, key) {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it retrieve it.\n return keyValueArray[index | 1];\n }\n return undefined;\n}\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n * - positive (even) index if key found.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been inserted.)\n */\nfunction keyValueArrayIndexOf(keyValueArray, key) {\n return _arrayIndexOfSorted(keyValueArray, key, 1);\n}\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n * - positive (even) index if key found and deleted.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been.)\n */\nfunction keyValueArrayDelete(keyValueArray, key) {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it remove it.\n arraySplice(keyValueArray, index, 2);\n }\n return index;\n}\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n * - `0` means look at every location\n * - `1` means only look at every other (even) location (the odd locations are to be ignored as\n * they are values.)\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array, value, shift) {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n let start = 0;\n let end = array.length >> shift;\n while (end !== start) {\n const middle = start + (end - start >> 1); // find the middle.\n const current = array[middle << shift];\n if (value === current) {\n return middle << shift;\n } else if (current > value) {\n end = middle;\n } else {\n start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n }\n }\n\n return ~(end << shift);\n}\n\n/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n/**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * downleveled to ES5 with `downlevelIteration` for TypeScript < 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * or downleveled to ES5 with `downlevelIteration` for TypeScript >= 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nconst ES5_DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\).*)\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\nconst ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\nconst ES2015_INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\nconst ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{[^}]*super\\(\\.\\.\\.arguments\\)/;\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nfunction isDelegateCtor(typeStr) {\n return ES5_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr);\n}\nclass ReflectionCapabilities {\n constructor(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n factory(t) {\n return (...args) => new t(...args);\n }\n /** @internal */\n _zipTypesAndAnnotations(paramTypes, paramAnnotations) {\n let result;\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n } else {\n result = newArray(paramTypes.length);\n }\n for (let i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n } else if (paramTypes[i] && paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n } else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n }\n _ownParameters(type, parentCtor) {\n const typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (isDelegateCtor(typeStr)) {\n return null;\n }\n // Prefer the direct API.\n if (type.parameters && type.parameters !== parentCtor.parameters) {\n return type.parameters;\n }\n // API of tsickle for lowering decorators to properties on the class.\n const tsickleCtorParams = type.ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n const paramTypes = ctorParameters.map(ctorParam => ctorParam && ctorParam.type);\n const paramAnnotations = ctorParameters.map(ctorParam => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n // API for metadata created by invoking the decorators.\n const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n const paramTypes = this._reflect && this._reflect.getOwnMetadata && this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return newArray(type.length);\n }\n parameters(type) {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n const parentCtor = getParentCtor(type);\n let parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n }\n _ownAnnotations(typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n let annotations = typeOrFunc.annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return typeOrFunc[ANNOTATIONS];\n }\n return null;\n }\n annotations(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return [];\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n }\n _ownPropMetadata(typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.propMetadata && typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n let propMetadata = typeOrFunc.propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.propDecorators && typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n const propDecorators = typeOrFunc.propDecorators;\n const propMetadata = {};\n Object.keys(propDecorators).forEach(prop => {\n propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n });\n return propMetadata;\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return typeOrFunc[PROP_METADATA];\n }\n return null;\n }\n propMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const propMetadata = {};\n if (parentCtor !== Object) {\n const parentPropMetadata = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata).forEach(propName => {\n propMetadata[propName] = parentPropMetadata[propName];\n });\n }\n const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach(propName => {\n const decorators = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push(...propMetadata[propName]);\n }\n decorators.push(...ownPropMetadata[propName]);\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n }\n ownPropMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n }\n hasLifecycleHook(type, lcProperty) {\n return type instanceof Type && lcProperty in type.prototype;\n }\n}\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(decoratorInvocation => {\n const decoratorType = decoratorInvocation.type;\n const annotationCls = decoratorType.annotationCls;\n const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new annotationCls(...annotationArgs);\n });\n}\nfunction getParentCtor(ctor) {\n const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n const parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\n}\n\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Inject = /*#__PURE__*/attachInjectFlag(\n/*#__PURE__*/\n// Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nmakeParamDecorator('Inject', token => ({\n token\n})), -1 /* DecoratorFlags.Inject */);\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Optional =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('Optional'), 8 /* InternalInjectFlags.Optional */);\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Self =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('Self'), 2 /* InternalInjectFlags.Self */);\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst SkipSelf =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('SkipSelf'), 4 /* InternalInjectFlags.SkipSelf */);\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Host =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('Host'), 1 /* InternalInjectFlags.Host */);\n\nlet _reflect = null;\nfunction getReflect() {\n return _reflect = _reflect || new ReflectionCapabilities();\n}\nfunction reflectDependencies(type) {\n return convertDependencies(getReflect().parameters(type));\n}\nfunction convertDependencies(deps) {\n return deps.map(dep => reflectDependency(dep));\n}\nfunction reflectDependency(dep) {\n const meta = {\n token: null,\n attribute: null,\n host: false,\n optional: false,\n self: false,\n skipSelf: false\n };\n if (Array.isArray(dep) && dep.length > 0) {\n for (let j = 0; j < dep.length; j++) {\n const param = dep[j];\n if (param === undefined) {\n // param may be undefined if type of dep is not set by ngtsc\n continue;\n }\n const proto = Object.getPrototypeOf(param);\n if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n meta.optional = true;\n } else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n } else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n meta.self = true;\n } else if (param instanceof Host || proto.ngMetadataName === 'Host') {\n meta.host = true;\n } else if (param instanceof Inject) {\n meta.token = param.token;\n } else if (param instanceof Attribute) {\n if (param.attributeName === undefined) {\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Attribute name must be defined.`);\n }\n meta.attribute = param.attributeName;\n } else {\n meta.token = param;\n }\n }\n } else if (dep === undefined || Array.isArray(dep) && dep.length === 0) {\n meta.token = null;\n } else {\n meta.token = dep;\n }\n return meta;\n}\n\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nfunction resolveComponentResources(resourceResolver) {\n // Store all promises which are fetching the resources.\n const componentResolved = [];\n // Cache so that we don't fetch the same resource more than once.\n const urlMap = new Map();\n function cachedResourceResolve(url) {\n let promise = urlMap.get(url);\n if (!promise) {\n const resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n return promise;\n }\n componentResourceResolutionQueue.forEach((component, type) => {\n const promises = [];\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then(template => {\n component.template = template;\n }));\n }\n const styles = typeof component.styles === 'string' ? [component.styles] : component.styles || [];\n component.styles = styles;\n if (component.styleUrl && component.styleUrls?.length) {\n throw new Error('@Component cannot define both `styleUrl` and `styleUrls`. ' + 'Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple');\n } else if (component.styleUrls?.length) {\n const styleOffset = component.styles.length;\n const styleUrls = component.styleUrls;\n component.styleUrls.forEach((styleUrl, index) => {\n styles.push(''); // pre-allocate array.\n promises.push(cachedResourceResolve(styleUrl).then(style => {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }));\n });\n } else if (component.styleUrl) {\n promises.push(cachedResourceResolve(component.styleUrl).then(style => {\n styles.push(style);\n component.styleUrl = undefined;\n }));\n }\n const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(() => undefined);\n}\nlet componentResourceResolutionQueue = /*#__PURE__*/new Map();\n// Track when existing ɵcmp for a Type is waiting on resources.\nconst componentDefPendingResolution = /*#__PURE__*/new Set();\nfunction maybeQueueResolutionOfComponentResources(type, metadata) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n}\nfunction isComponentDefPendingResolution(type) {\n return componentDefPendingResolution.has(type);\n}\nfunction componentNeedsResolution(component) {\n return !!(component.templateUrl && !component.hasOwnProperty('template') || component.styleUrls && component.styleUrls.length || component.styleUrl);\n}\nfunction clearResolutionOfComponentResourcesQueue() {\n const old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n}\nfunction restoreComponentResolutionQueue(queue) {\n componentDefPendingResolution.clear();\n queue.forEach((_, type) => componentDefPendingResolution.add(type));\n componentResourceResolutionQueue = queue;\n}\nfunction isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n}\nfunction unwrapResponse(response) {\n return typeof response == 'string' ? response : response.text();\n}\nfunction componentDefResolved(type) {\n componentDefPendingResolution.delete(type);\n}\n\n/**\n * A multi-provider token for initialization functions that will run upon construction of an\n * environment injector.\n *\n * @publicApi\n */\nconst ENVIRONMENT_INITIALIZER = /*#__PURE__*/new InjectionToken('ENVIRONMENT_INITIALIZER');\n\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nconst INJECTOR = /*#__PURE__*/new InjectionToken('INJECTOR',\n// Disable tslint because this is const enum which gets inlined not top level prop access.\n// tslint:disable-next-line: no-toplevel-property-access\n-1 /* InjectorMarkers.Injector */);\n\nconst INJECTOR_DEF_TYPES = /*#__PURE__*/new InjectionToken('INJECTOR_DEF_TYPES');\nclass NullInjector {\n get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\n }\n}\n\n/**\n * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally\n * referenced in `@Component` in a component injector.\n */\nfunction makeEnvironmentProviders(providers) {\n return {\n ɵproviders: providers\n };\n}\n/**\n * Collects providers from all NgModules and standalone components, including transitively imported\n * ones.\n *\n * Providers extracted via `importProvidersFrom` are only usable in an application injector or\n * another environment injector (such as a route injector). They should not be used in component\n * providers.\n *\n * More information about standalone components can be found in [this\n * guide](guide/standalone-components).\n *\n * @usageNotes\n * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ]\n * });\n * ```\n *\n * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a\n * standalone component is used:\n *\n * ```typescript\n * export const ROUTES: Route[] = [\n * {\n * path: 'foo',\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ],\n * component: YourStandaloneComponent\n * }\n * ];\n * ```\n *\n * @returns Collected providers from the specified list of types.\n * @publicApi\n */\nfunction importProvidersFrom(...sources) {\n return {\n ɵproviders: internalImportProvidersFrom(true, sources),\n ɵfromNgModule: true\n };\n}\nfunction internalImportProvidersFrom(checkForStandaloneCmp, ...sources) {\n const providersOut = [];\n const dedup = new Set(); // already seen types\n let injectorTypesWithProviders;\n const collectProviders = provider => {\n providersOut.push(provider);\n };\n deepForEach(sources, source => {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && checkForStandaloneCmp) {\n const cmpDef = getComponentDef(source);\n if (cmpDef?.standalone) {\n throw new RuntimeError(800 /* RuntimeErrorCode.IMPORT_PROVIDERS_FROM_STANDALONE */, `Importing providers supports NgModule or ModuleWithProviders but got a standalone component \"${stringifyForError(source)}\"`);\n }\n }\n // Narrow `source` to access the internal type analogue for `ModuleWithProviders`.\n const internalSource = source;\n if (walkProviderTree(internalSource, collectProviders, [], dedup)) {\n injectorTypesWithProviders ||= [];\n injectorTypesWithProviders.push(internalSource);\n }\n });\n // Collect all providers from `ModuleWithProviders` types.\n if (injectorTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(injectorTypesWithProviders, collectProviders);\n }\n return providersOut;\n}\n/**\n * Collects all providers from the list of `ModuleWithProviders` and appends them to the provided\n * array.\n */\nfunction processInjectorTypesWithProviders(typesWithProviders, visitor) {\n for (let i = 0; i < typesWithProviders.length; i++) {\n const {\n ngModule,\n providers\n } = typesWithProviders[i];\n deepForEachProvider(providers, provider => {\n ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n visitor(provider, ngModule);\n });\n }\n}\n/**\n * The logic visits an `InjectorType`, an `InjectorTypeWithProviders`, or a standalone\n * `ComponentType`, and all of its transitive providers and collects providers.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\nfunction walkProviderTree(container, visitor, parents, dedup) {\n container = resolveForwardRef(container);\n if (!container) return false;\n // The actual type which had the definition. Usually `container`, but may be an unwrapped type\n // from `InjectorTypeWithProviders`.\n let defType = null;\n let injDef = getInjectorDef(container);\n const cmpDef = !injDef && getComponentDef(container);\n if (!injDef && !cmpDef) {\n // `container` is not an injector type or a component type. It might be:\n // * An `InjectorTypeWithProviders` that wraps an injector type.\n // * A standalone directive or pipe that got pulled in from a standalone component's\n // dependencies.\n // Try to unwrap it as an `InjectorTypeWithProviders` first.\n const ngModule = container.ngModule;\n injDef = getInjectorDef(ngModule);\n if (injDef) {\n defType = ngModule;\n } else {\n // Not a component or injector type, so ignore it.\n return false;\n }\n } else if (cmpDef && !cmpDef.standalone) {\n return false;\n } else {\n defType = container;\n }\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n const path = parents.map(stringify);\n throwCyclicDependencyError(defName, path);\n }\n // Check for multiple imports of the same module\n const isDuplicate = dedup.has(defType);\n if (cmpDef) {\n if (isDuplicate) {\n // This component definition has already been processed.\n return false;\n }\n dedup.add(defType);\n if (cmpDef.dependencies) {\n const deps = typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;\n for (const dep of deps) {\n walkProviderTree(dep, visitor, parents, dedup);\n }\n }\n } else if (injDef) {\n // First, include providers from any imports.\n if (injDef.imports != null && !isDuplicate) {\n // Before processing defType's imports, add it to the set of parents. This way, if it ends\n // up deeply importing itself, this can be detected.\n ngDevMode && parents.push(defType);\n // Add it to the set of dedups. This way we can detect multiple imports of the same module\n dedup.add(defType);\n let importTypesWithProviders;\n try {\n deepForEach(injDef.imports, imported => {\n if (walkProviderTree(imported, visitor, parents, dedup)) {\n importTypesWithProviders ||= [];\n // If the processed import is an injector type with providers, we store it in the\n // list of import types with providers, so that we can process those afterwards.\n importTypesWithProviders.push(imported);\n }\n });\n } finally {\n // Remove it from the parents set when finished.\n ngDevMode && parents.pop();\n }\n // Imports which are declared with providers (TypeWithProviders) need to be processed\n // after all imported modules are processed. This is similar to how View Engine\n // processes/merges module imports in the metadata resolver. See: FW-1349.\n if (importTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(importTypesWithProviders, visitor);\n }\n }\n if (!isDuplicate) {\n // Track the InjectorType and add a provider for it.\n // It's important that this is done after the def's imports.\n const factory = getFactoryDef(defType) || (() => new defType());\n // Append extra providers to make more info available for consumers (to retrieve an injector\n // type), as well as internally (to calculate an injection scope correctly and eagerly\n // instantiate a `defType` when an injector is created).\n // Provider to create `defType` using its factory.\n visitor({\n provide: defType,\n useFactory: factory,\n deps: EMPTY_ARRAY\n }, defType);\n // Make this `defType` available to an internal logic that calculates injector scope.\n visitor({\n provide: INJECTOR_DEF_TYPES,\n useValue: defType,\n multi: true\n }, defType);\n // Provider to eagerly instantiate `defType` via `INJECTOR_INITIALIZER`.\n visitor({\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => ɵɵinject(defType),\n multi: true\n }, defType);\n }\n // Next, include providers listed on the definition itself.\n const defProviders = injDef.providers;\n if (defProviders != null && !isDuplicate) {\n const injectorType = container;\n deepForEachProvider(defProviders, provider => {\n ngDevMode && validateProvider(provider, defProviders, injectorType);\n visitor(provider, injectorType);\n });\n }\n } else {\n // Should not happen, but just in case.\n return false;\n }\n return defType !== container && container.providers !== undefined;\n}\nfunction validateProvider(provider, providers, containerType) {\n if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) || isExistingProvider(provider)) {\n return;\n }\n // Here we expect the provider to be a `useClass` provider (by elimination).\n const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n if (!classRef) {\n throwInvalidProviderError(containerType, providers, provider);\n }\n}\nfunction deepForEachProvider(providers, fn) {\n for (let provider of providers) {\n if (isEnvironmentProviders(provider)) {\n provider = provider.ɵproviders;\n }\n if (Array.isArray(provider)) {\n deepForEachProvider(provider, fn);\n } else {\n fn(provider);\n }\n }\n}\nconst USE_VALUE$1 = /*#__PURE__*/getClosureSafeProperty({\n provide: String,\n useValue: getClosureSafeProperty\n});\nfunction isValueProvider(value) {\n return value !== null && typeof value == 'object' && USE_VALUE$1 in value;\n}\nfunction isExistingProvider(value) {\n return !!(value && value.useExisting);\n}\nfunction isFactoryProvider(value) {\n return !!(value && value.useFactory);\n}\nfunction isTypeProvider(value) {\n return typeof value === 'function';\n}\nfunction isClassProvider(value) {\n return !!value.useClass;\n}\n\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nconst INJECTOR_SCOPE = /*#__PURE__*/new InjectionToken('Set Injector scope.');\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR = undefined;\nfunction getNullInjector() {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n}\n/**\n * An `Injector` that's part of the environment injector hierarchy, which exists outside of the\n * component tree.\n */\nclass EnvironmentInjector {}\nclass R3Injector extends EnvironmentInjector {\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\n constructor(providers, parent, source, scopes) {\n super();\n this.parent = parent;\n this.source = source;\n this.scopes = scopes;\n /**\n * Map of tokens to records which contain the instances of those tokens.\n * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n * to prevent further searches.\n */\n this.records = new Map();\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n this._ngOnDestroyHooks = new Set();\n this._onDestroyHooks = [];\n this._destroyed = false;\n // Start off by creating Records for every provider.\n forEachSingleProvider(providers, provider => this.processProvider(provider));\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.\n if (scopes.has('environment')) {\n this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n }\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n const record = this.records.get(INJECTOR_SCOPE);\n if (record != null && typeof record.value === 'string') {\n this.scopes.add(record.value);\n }\n this.injectorDefTypes = new Set(this.get(INJECTOR_DEF_TYPES, EMPTY_ARRAY, InjectFlags.Self));\n }\n /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n destroy() {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n for (const service of this._ngOnDestroyHooks) {\n service.ngOnDestroy();\n }\n const onDestroyHooks = this._onDestroyHooks;\n // Reset the _onDestroyHooks array before iterating over it to prevent hooks that unregister\n // themselves from mutating the array during iteration.\n this._onDestroyHooks = [];\n for (const hook of onDestroyHooks) {\n hook();\n }\n } finally {\n // Release all references.\n this.records.clear();\n this._ngOnDestroyHooks.clear();\n this.injectorDefTypes.clear();\n }\n }\n onDestroy(callback) {\n this.assertNotDestroyed();\n this._onDestroyHooks.push(callback);\n return () => this.removeOnDestroy(callback);\n }\n runInContext(fn) {\n this.assertNotDestroyed();\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({\n injector: this,\n token: null\n });\n }\n try {\n return fn();\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n }\n }\n get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) {\n this.assertNotDestroyed();\n if (token.hasOwnProperty(NG_ENV_ID)) {\n return token[NG_ENV_ID](this);\n }\n flags = convertToBitFlags(flags);\n // Set the injection context.\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({\n injector: this,\n token: token\n });\n }\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n let record = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an injectable\n // def with a scope matching this injector.\n const def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n // all along.\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n emitProviderConfiguredEvent(token);\n });\n }\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n } else {\n record = null;\n }\n this.records.set(token, record);\n }\n // If a record was found, get the instance for it and return it.\n if (record != null /* NOT null || undefined */) {\n return this.hydrate(token, record);\n }\n }\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n // is undefined, the value is null, otherwise it's the notFoundValue.\n notFoundValue = flags & InjectFlags.Optional && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue;\n return nextInjector.get(token, notFoundValue);\n } catch (e) {\n if (e.name === 'NullInjectorError') {\n const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(stringify(token));\n if (previousInjector) {\n // We still have a parent injector, keep throwing\n throw e;\n } else {\n // Format & throw the final error message when we don't have any previous injector\n return catchInjectorError(e, token, 'R3InjectorError', this.source);\n }\n } else {\n throw e;\n }\n } finally {\n // Lastly, restore the previous injection context.\n setInjectImplementation(previousInjectImplementation);\n setCurrentInjector(previousInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n }\n }\n /** @internal */\n resolveInjectorInitializers() {\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({\n injector: this,\n token: null\n });\n }\n try {\n const initializers = this.get(ENVIRONMENT_INITIALIZER, EMPTY_ARRAY, InjectFlags.Self);\n if (ngDevMode && !Array.isArray(initializers)) {\n throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' + `(expected an array, but got ${typeof initializers}). ` + 'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' + '`multi: true` provider.');\n }\n for (const initializer of initializers) {\n initializer();\n }\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n }\n }\n toString() {\n const tokens = [];\n const records = this.records;\n for (const token of records.keys()) {\n tokens.push(stringify(token));\n }\n return `R3Injector[${tokens.join(', ')}]`;\n }\n assertNotDestroyed() {\n if (this._destroyed) {\n throw new RuntimeError(205 /* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');\n }\n }\n /**\n * Process a `SingleProvider` and add it.\n */\n processProvider(provider) {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n // Construct a `Record` for the provider.\n const record = providerToRecord(provider);\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n // Emit InjectorProfilerEventType.Create if provider is a value provider because\n // these are the only providers that do not go through the value hydration logic\n // where this event would normally be emitted from.\n if (isValueProvider(provider)) {\n emitInstanceCreatedByInjectorEvent(provider.useValue);\n }\n emitProviderConfiguredEvent(provider);\n });\n }\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n let multiRecord = this.records.get(token);\n if (multiRecord) {\n // It has. Throw a nice error if\n if (ngDevMode && multiRecord.multi === undefined) {\n throwMixedMultiProviderError();\n }\n } else {\n multiRecord = makeRecord(undefined, NOT_YET, true);\n multiRecord.factory = () => injectArgs(multiRecord.multi);\n this.records.set(token, multiRecord);\n }\n token = provider;\n multiRecord.multi.push(provider);\n } else {\n const existing = this.records.get(token);\n if (ngDevMode && existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n this.records.set(token, record);\n }\n hydrate(token, record) {\n if (ngDevMode && record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n } else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n record.value = record.factory();\n emitInstanceCreatedByInjectorEvent(record.value);\n });\n } else {\n record.value = record.factory();\n }\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this._ngOnDestroyHooks.add(record.value);\n }\n return record.value;\n }\n injectableDefInScope(def) {\n if (!def.providedIn) {\n return false;\n }\n const providedIn = resolveForwardRef(def.providedIn);\n if (typeof providedIn === 'string') {\n return providedIn === 'any' || this.scopes.has(providedIn);\n } else {\n return this.injectorDefTypes.has(providedIn);\n }\n }\n removeOnDestroy(callback) {\n const destroyCBIdx = this._onDestroyHooks.indexOf(callback);\n if (destroyCBIdx !== -1) {\n this._onDestroyHooks.splice(destroyCBIdx, 1);\n }\n }\n}\nfunction injectableDefOrInjectorDefFactory(token) {\n // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n const injectableDef = getInjectableDef(token);\n const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n if (factory !== null) {\n return factory;\n }\n // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Token ${stringify(token)} is missing a ɵprov definition.`);\n }\n // Undecorated types can sometimes be created if they have no constructor arguments.\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n // There was no way to resolve a factory for this token.\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && 'unreachable');\n}\nfunction getUndecoratedInjectableFactory(token) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n const paramLength = token.length;\n if (paramLength > 0) {\n const args = newArray(paramLength, '?');\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);\n }\n // The constructor function appears to have no parameters.\n // This might be because it inherits from a super-class. In which case, use an injectable\n // def from an ancestor if there is one.\n // Otherwise this really is a simple class with no dependencies, so return a factory that\n // just instantiates the zero-arg constructor.\n const inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return () => inheritedInjectableDef.factory(token);\n } else {\n return () => new token();\n }\n}\nfunction providerToRecord(provider) {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n } else {\n const factory = providerToFactory(provider);\n return makeRecord(factory, NOT_YET);\n }\n}\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nfunction providerToFactory(provider, ngModuleType, providers) {\n let factory = undefined;\n if (ngDevMode && isEnvironmentProviders(provider)) {\n throwInvalidProviderError(undefined, providers, provider);\n }\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n } else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n } else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n } else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n } else {\n const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new classRef(...injectArgs(provider.deps));\n } else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}\nfunction makeRecord(factory, value, multi = false) {\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined\n };\n}\nfunction hasDeps(value) {\n return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n return value !== null && typeof value === 'object' && typeof value.ngOnDestroy === 'function';\n}\nfunction couldBeInjectableType(value) {\n return typeof value === 'function' || typeof value === 'object' && value instanceof InjectionToken;\n}\nfunction forEachSingleProvider(providers, fn) {\n for (const provider of providers) {\n if (Array.isArray(provider)) {\n forEachSingleProvider(provider, fn);\n } else if (provider && isEnvironmentProviders(provider)) {\n forEachSingleProvider(provider.ɵproviders, fn);\n } else {\n fn(provider);\n }\n }\n}\n\n/**\n * Runs the given function in the [context](guide/dependency-injection-context) of the given\n * `Injector`.\n *\n * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject dependencies\n * from the given `Injector`. Note that `inject` is only usable synchronously, and cannot be used in\n * any asynchronous callbacks or after any `await` points.\n *\n * @param injector the injector which will satisfy calls to [`inject`](api/core/inject) while `fn`\n * is executing\n * @param fn the closure to be run in the context of `injector`\n * @returns the return value of the function, if any\n * @publicApi\n */\nfunction runInInjectionContext(injector, fn) {\n if (injector instanceof R3Injector) {\n injector.assertNotDestroyed();\n }\n let prevInjectorProfilerContext;\n if (ngDevMode) {\n prevInjectorProfilerContext = setInjectorProfilerContext({\n injector,\n token: null\n });\n }\n const prevInjector = setCurrentInjector(injector);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n return fn();\n } finally {\n setCurrentInjector(prevInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectorProfilerContext);\n setInjectImplementation(previousInjectImplementation);\n }\n}\n/**\n * Asserts that the current stack frame is within an [injection\n * context](guide/dependency-injection-context) and has access to `inject`.\n *\n * @param debugFn a reference to the function making the assertion (used for the error message).\n *\n * @publicApi\n */\nfunction assertInInjectionContext(debugFn) {\n // Taking a `Function` instead of a string name here prevents the unminified name of the function\n // from being retained in the bundle regardless of minification.\n if (!getInjectImplementation() && !getCurrentInjector()) {\n throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode && debugFn.name + '() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`');\n }\n}\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nconst angularCoreDiEnv = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'resolveForwardRef': resolveForwardRef\n};\n\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * injectable def (`ɵprov`) onto the injectable type.\n */\nfunction compileInjectable(type, meta) {\n let ngInjectableDef = null;\n let ngFactoryDef = null;\n // if NG_PROV_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_PROV_DEF)) {\n Object.defineProperty(type, NG_PROV_DEF, {\n get: () => {\n if (ngInjectableDef === null) {\n const compiler = getCompilerFacade({\n usage: 0 /* JitCompilerUsage.Decorator */,\n kind: 'injectable',\n type\n });\n ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, meta));\n }\n return ngInjectableDef;\n }\n });\n }\n // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler = getCompilerFacade({\n usage: 0 /* JitCompilerUsage.Decorator */,\n kind: 'injectable',\n type\n });\n ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n name: type.name,\n type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Injectable\n });\n }\n return ngFactoryDef;\n },\n // Leave this configurable so that the factories from directives or pipes can take precedence.\n configurable: true\n });\n }\n}\nconst USE_VALUE = /*#__PURE__*/getClosureSafeProperty({\n provide: String,\n useValue: getClosureSafeProperty\n});\nfunction isUseClassProvider(meta) {\n return meta.useClass !== undefined;\n}\nfunction isUseValueProvider(meta) {\n return USE_VALUE in meta;\n}\nfunction isUseFactoryProvider(meta) {\n return meta.useFactory !== undefined;\n}\nfunction isUseExistingProvider(meta) {\n return meta.useExisting !== undefined;\n}\nfunction getInjectableMetadata(type, srcMeta) {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n const meta = srcMeta || {\n providedIn: null\n };\n const compilerMeta = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.deps = convertDependencies(meta.deps);\n }\n // Check to see if the user explicitly provided a `useXxxx` property.\n if (isUseClassProvider(meta)) {\n compilerMeta.useClass = meta.useClass;\n } else if (isUseValueProvider(meta)) {\n compilerMeta.useValue = meta.useValue;\n } else if (isUseFactoryProvider(meta)) {\n compilerMeta.useFactory = meta.useFactory;\n } else if (isUseExistingProvider(meta)) {\n compilerMeta.useExisting = meta.useExisting;\n }\n return compilerMeta;\n}\n\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Injectable = /*#__PURE__*/makeDecorator('Injectable', undefined, undefined, undefined, (type, meta) => compileInjectable(type, meta));\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType`s.\n */\nfunction createInjector(defType, parent = null, additionalProviders = null, name) {\n const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector.resolveInjectorInitializers();\n return injector;\n}\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nfunction createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name, scopes = new Set()) {\n const providers = [additionalProviders || EMPTY_ARRAY, importProvidersFrom(defType)];\n name = name || (typeof defType === 'object' ? undefined : stringify(defType));\n return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);\n}\n\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/glossary#provider) that associate\n * dependencies of various types with [injection tokens](guide/glossary#di-token).\n *\n * @see [\"DI Providers\"](guide/dependency-injection-providers).\n * @see {@link StaticProvider}\n *\n * @usageNotes\n *\n * The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nlet Injector = /*#__PURE__*/(() => {\n class Injector {\n static {\n this.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n }\n static {\n this.NULL = /* @__PURE__ */new NullInjector();\n }\n static create(options, parent) {\n if (Array.isArray(options)) {\n return createInjector({\n name: ''\n }, parent, options, '');\n } else {\n const name = options.name ?? '';\n return createInjector({\n name\n }, options.parent, options.providers, name);\n }\n }\n /** @nocollapse */\n static {\n this.ɵprov = ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: () => ɵɵinject(INJECTOR)\n });\n }\n /**\n * @internal\n * @nocollapse\n */\n static {\n this.__NG_ELEMENT_ID__ = -1 /* InjectorMarkers.Injector */;\n }\n }\n return Injector;\n})();\n/**\n * @module\n * @description\n * The `di` module provides dependency injection container services.\n */\n/**\n * This file should not be necessary because node resolution should just default to `./di/index`!\n *\n * However it does not seem to work and it breaks:\n * - //packages/animations/browser/test:test_web_chromium-local\n * - //packages/compiler-cli/test:extract_i18n\n * - //packages/compiler-cli/test:ngc\n * - //packages/compiler-cli/test:perform_watch\n * - //packages/compiler-cli/test/diagnostics:check_types\n * - //packages/compiler-cli/test/transformers:test\n * - //packages/compiler/test:test\n * - //tools/public_api_guard:core_api\n *\n * Remove this file once the above is solved or wait until `ngc` is deleted and then it should be\n * safe to delete this file.\n */\nfunction isModuleWithProviders(value) {\n return value.ngModule !== undefined;\n}\nfunction isNgModule(value) {\n return !!getNgModuleDef(value);\n}\nfunction isPipe(value) {\n return !!getPipeDef$1(value);\n}\nfunction isDirective(value) {\n return !!getDirectiveDef(value);\n}\nfunction isComponent(value) {\n return !!getComponentDef(value);\n}\nfunction getDependencyTypeForError(type) {\n if (getComponentDef(type)) return 'component';\n if (getDirectiveDef(type)) return 'directive';\n if (getPipeDef$1(type)) return 'pipe';\n return 'type';\n}\nfunction verifyStandaloneImport(depType, importingType) {\n if (isForwardRef(depType)) {\n depType = resolveForwardRef(depType);\n if (!depType) {\n throw new Error(`Expected forwardRef function, imported from \"${stringifyForError(importingType)}\", to return a standalone entity or NgModule but got \"${stringifyForError(depType) || depType}\".`);\n }\n }\n if (getNgModuleDef(depType) == null) {\n const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef$1(depType);\n if (def != null) {\n // if a component, directive or pipe is imported make sure that it is standalone\n if (!def.standalone) {\n throw new Error(`The \"${stringifyForError(depType)}\" ${getDependencyTypeForError(depType)}, imported from \"${stringifyForError(importingType)}\", is not standalone. Did you forget to add the standalone: true flag?`);\n }\n } else {\n // it can be either a module with provider or an unknown (not annotated) type\n if (isModuleWithProviders(depType)) {\n throw new Error(`A module with providers was imported from \"${stringifyForError(importingType)}\". Modules with providers are not supported in standalone components imports.`);\n } else {\n throw new Error(`The \"${stringifyForError(depType)}\" type, imported from \"${stringifyForError(importingType)}\", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`);\n }\n }\n }\n}\n\n/**\n * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser` and `Server`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet DOCUMENT = undefined;\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nfunction setDocument(document) {\n DOCUMENT = document;\n}\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nfunction getDocument() {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n } else if (typeof document !== 'undefined') {\n return document;\n }\n throw new RuntimeError(210 /* RuntimeErrorCode.MISSING_DOCUMENT */, (typeof ngDevMode === 'undefined' || ngDevMode) && `The document object is not available in this context. Make sure the DOCUMENT injection token is provided.`);\n // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n // the current platform is not a browser. Since this is not a supported scenario at the moment\n // this should not happen in Angular apps.\n // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n // public API.\n}\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") representing a string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated} is being used.\n *\n * The token is needed in cases when multiple applications are bootstrapped on a page\n * (for example, using `bootstrapApplication` calls). In this case, ensure that those applications\n * have different `APP_ID` value setup. For example:\n *\n * ```\n * bootstrapApplication(ComponentA, {\n * providers: [\n * { provide: APP_ID, useValue: 'app-a' },\n * // ... other providers ...\n * ]\n * });\n *\n * bootstrapApplication(ComponentB, {\n * providers: [\n * { provide: APP_ID, useValue: 'app-b' },\n * // ... other providers ...\n * ]\n * });\n * ```\n *\n * By default, when there is only one application bootstrapped, you don't need to provide the\n * `APP_ID` token (the `ng` will be used as an app ID).\n *\n * @publicApi\n */\nconst APP_ID = /*#__PURE__*/new InjectionToken('AppId', {\n providedIn: 'root',\n factory: () => DEFAULT_APP_ID\n});\n/** Default value of the `APP_ID` token. */\nconst DEFAULT_APP_ID = 'ng';\n/**\n * A function that is executed when a platform is initialized.\n * @publicApi\n */\nconst PLATFORM_INITIALIZER = /*#__PURE__*/new InjectionToken('Platform Initializer');\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\nconst PLATFORM_ID = /*#__PURE__*/new InjectionToken('Platform ID', {\n providedIn: 'platform',\n factory: () => 'unknown' // set a default platform name, when none set explicitly\n});\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates the root directory of\n * the application\n * @publicApi\n * @deprecated\n */\nconst PACKAGE_ROOT_URL = /*#__PURE__*/new InjectionToken('Application Packages Root URL');\n// We keep this token here, rather than the animations package, so that modules that only care\n// about which animations module is loaded (e.g. the CDK) can retrieve it without having to\n// include extra dependencies. See #44970 for more context.\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates which animations\n * module has been loaded.\n * @publicApi\n */\nconst ANIMATION_MODULE_TYPE = /*#__PURE__*/new InjectionToken('AnimationModuleType');\n// TODO(crisbeto): link to CSP guide here.\n/**\n * Token used to configure the [Content Security Policy](https://web.dev/strict-csp/) nonce that\n * Angular will apply when inserting inline styles. If not provided, Angular will look up its value\n * from the `ngCspNonce` attribute of the application root node.\n *\n * @publicApi\n */\nconst CSP_NONCE = /*#__PURE__*/new InjectionToken('CSP nonce', {\n providedIn: 'root',\n factory: () => {\n // Ideally we wouldn't have to use `querySelector` here since we know that the nonce will be on\n // the root node, but because the token value is used in renderers, it has to be available\n // *very* early in the bootstrapping process. This should be a fairly shallow search, because\n // the app won't have been added to the DOM yet. Some approaches that were considered:\n // 1. Find the root node through `ApplicationRef.components[i].location` - normally this would\n // be enough for our purposes, but the token is injected very early so the `components` array\n // isn't populated yet.\n // 2. Find the root `LView` through the current `LView` - renderers are a prerequisite to\n // creating the `LView`. This means that no `LView` will have been entered when this factory is\n // invoked for the root component.\n // 3. Have the token factory return `() => string` which is invoked when a nonce is requested -\n // the slightly later execution does allow us to get an `LView` reference, but the fact that\n // it is a function means that it could be executed at *any* time (including immediately) which\n // may lead to weird bugs.\n // 4. Have the `ComponentFactory` read the attribute and provide it to the injector under the\n // hood - has the same problem as #1 and #2 in that the renderer is used to query for the root\n // node and the nonce value needs to be available when the renderer is created.\n return getDocument().body?.querySelector('[ngCspNonce]')?.getAttribute('ngCspNonce') || null;\n }\n});\nconst IMAGE_CONFIG_DEFAULTS = {\n breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n disableImageSizeWarning: false,\n disableImageLazyLoadWarning: false\n};\n/**\n * Injection token that configures the image optimized image functionality.\n * See {@link ImageConfig} for additional information about parameters that\n * can be used.\n *\n * @see {@link NgOptimizedImage}\n * @see {@link ImageConfig}\n * @publicApi\n */\nconst IMAGE_CONFIG = /*#__PURE__*/new InjectionToken('ImageConfig', {\n providedIn: 'root',\n factory: () => IMAGE_CONFIG_DEFAULTS\n});\n\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveWindow(element) {\n return element.ownerDocument.defaultView;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveDocument(element) {\n return element.ownerDocument;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveBody(element) {\n return element.ownerDocument.body;\n}\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nconst INTERPOLATION_DELIMITER = `�`;\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nfunction maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n } else {\n return value;\n }\n}\n/**\n * Detects whether the code is invoked in a browser.\n * Later on, this check should be replaced with a tree-shakable\n * flag (e.g. `!isServer`).\n */\nfunction isPlatformBrowser(injector) {\n return (injector ?? inject(Injector)).get(PLATFORM_ID) === 'browser';\n}\n\n/**\n * Indicates whether to use the runtime dependency tracker for scope calculation in JIT compilation.\n * The value \"false\" means the old code path based on patching scope info into the types will be\n * used.\n *\n * @deprecated For migration purposes only, to be removed soon.\n */\nconst USE_RUNTIME_DEPS_TRACKER_FOR_JIT = true;\n/**\n * An implementation of DepsTrackerApi which will be used for JIT and local compilation.\n */\nclass DepsTracker {\n constructor() {\n this.ownerNgModule = new Map();\n this.ngModulesWithSomeUnresolvedDecls = new Set();\n this.ngModulesScopeCache = new Map();\n this.standaloneComponentsScopeCache = new Map();\n }\n /**\n * Attempts to resolve ng module's forward ref declarations as much as possible and add them to\n * the `ownerNgModule` map. This method normally should be called after the initial parsing when\n * all the forward refs are resolved (e.g., when trying to render a component)\n */\n resolveNgModulesDecls() {\n if (this.ngModulesWithSomeUnresolvedDecls.size === 0) {\n return;\n }\n for (const moduleType of this.ngModulesWithSomeUnresolvedDecls) {\n const def = getNgModuleDef(moduleType);\n if (def?.declarations) {\n for (const decl of maybeUnwrapFn(def.declarations)) {\n if (isComponent(decl)) {\n this.ownerNgModule.set(decl, moduleType);\n }\n }\n }\n }\n this.ngModulesWithSomeUnresolvedDecls.clear();\n }\n /** @override */\n getComponentDependencies(type, rawImports) {\n this.resolveNgModulesDecls();\n const def = getComponentDef(type);\n if (def === null) {\n throw new Error(`Attempting to get component dependencies for a type that is not a component: ${type}`);\n }\n if (def.standalone) {\n const scope = this.getStandaloneComponentScope(type, rawImports);\n if (scope.compilation.isPoisoned) {\n return {\n dependencies: []\n };\n }\n return {\n dependencies: [...scope.compilation.directives, ...scope.compilation.pipes, ...scope.compilation.ngModules]\n };\n } else {\n if (!this.ownerNgModule.has(type)) {\n // This component is orphan! No need to handle the error since the component rendering\n // pipeline (e.g., view_container_ref) will check for this error based on configs.\n return {\n dependencies: []\n };\n }\n const scope = this.getNgModuleScope(this.ownerNgModule.get(type));\n if (scope.compilation.isPoisoned) {\n return {\n dependencies: []\n };\n }\n return {\n dependencies: [...scope.compilation.directives, ...scope.compilation.pipes]\n };\n }\n }\n /**\n * @override\n * This implementation does not make use of param scopeInfo since it assumes the scope info is\n * already added to the type itself through methods like {@link ɵɵsetNgModuleScope}\n */\n registerNgModule(type, scopeInfo) {\n if (!isNgModule(type)) {\n throw new Error(`Attempting to register a Type which is not NgModule as NgModule: ${type}`);\n }\n // Lazily process the NgModules later when needed.\n this.ngModulesWithSomeUnresolvedDecls.add(type);\n }\n /** @override */\n clearScopeCacheFor(type) {\n this.ngModulesScopeCache.delete(type);\n this.standaloneComponentsScopeCache.delete(type);\n }\n /** @override */\n getNgModuleScope(type) {\n if (this.ngModulesScopeCache.has(type)) {\n return this.ngModulesScopeCache.get(type);\n }\n const scope = this.computeNgModuleScope(type);\n this.ngModulesScopeCache.set(type, scope);\n return scope;\n }\n /** Compute NgModule scope afresh. */\n computeNgModuleScope(type) {\n const def = getNgModuleDef(type, true);\n const scope = {\n exported: {\n directives: new Set(),\n pipes: new Set()\n },\n compilation: {\n directives: new Set(),\n pipes: new Set()\n }\n };\n // Analyzing imports\n for (const imported of maybeUnwrapFn(def.imports)) {\n if (isNgModule(imported)) {\n const importedScope = this.getNgModuleScope(imported);\n // When this module imports another, the imported module's exported directives and pipes\n // are added to the compilation scope of this module.\n addSet(importedScope.exported.directives, scope.compilation.directives);\n addSet(importedScope.exported.pipes, scope.compilation.pipes);\n } else if (isStandalone(imported)) {\n if (isDirective(imported) || isComponent(imported)) {\n scope.compilation.directives.add(imported);\n } else if (isPipe(imported)) {\n scope.compilation.pipes.add(imported);\n } else {\n // The standalone thing is neither a component nor a directive nor a pipe ... (what?)\n throw new RuntimeError(1000 /* RuntimeErrorCode.RUNTIME_DEPS_INVALID_IMPORTED_TYPE */, 'The standalone imported type is neither a component nor a directive nor a pipe');\n }\n } else {\n // The import is neither a module nor a module-with-providers nor a standalone thing. This\n // is going to be an error. So we short circuit.\n scope.compilation.isPoisoned = true;\n break;\n }\n }\n // Analyzing declarations\n if (!scope.compilation.isPoisoned) {\n for (const decl of maybeUnwrapFn(def.declarations)) {\n // Cannot declare another NgModule or a standalone thing\n if (isNgModule(decl) || isStandalone(decl)) {\n scope.compilation.isPoisoned = true;\n break;\n }\n if (isPipe(decl)) {\n scope.compilation.pipes.add(decl);\n } else {\n // decl is either a directive or a component. The component may not yet have the ɵcmp due\n // to async compilation.\n scope.compilation.directives.add(decl);\n }\n }\n }\n // Analyzing exports\n for (const exported of maybeUnwrapFn(def.exports)) {\n if (isNgModule(exported)) {\n // When this module exports another, the exported module's exported directives and pipes\n // are added to both the compilation and exported scopes of this module.\n const exportedScope = this.getNgModuleScope(exported);\n // Based on the current logic there is no way to have poisoned exported scope. So no need to\n // check for it.\n addSet(exportedScope.exported.directives, scope.exported.directives);\n addSet(exportedScope.exported.pipes, scope.exported.pipes);\n // Some test toolings which run in JIT mode depend on this behavior that the exported scope\n // should also be present in the compilation scope, even though AoT does not support this\n // and it is also in odds with NgModule metadata definitions. Without this some tests in\n // Google will fail.\n addSet(exportedScope.exported.directives, scope.compilation.directives);\n addSet(exportedScope.exported.pipes, scope.compilation.pipes);\n } else if (isPipe(exported)) {\n scope.exported.pipes.add(exported);\n } else {\n scope.exported.directives.add(exported);\n }\n }\n return scope;\n }\n /** @override */\n getStandaloneComponentScope(type, rawImports) {\n if (this.standaloneComponentsScopeCache.has(type)) {\n return this.standaloneComponentsScopeCache.get(type);\n }\n const ans = this.computeStandaloneComponentScope(type, rawImports);\n this.standaloneComponentsScopeCache.set(type, ans);\n return ans;\n }\n computeStandaloneComponentScope(type, rawImports) {\n const ans = {\n compilation: {\n // Standalone components are always able to self-reference.\n directives: new Set([type]),\n pipes: new Set(),\n ngModules: new Set()\n }\n };\n for (const rawImport of flatten(rawImports ?? [])) {\n const imported = resolveForwardRef(rawImport);\n try {\n verifyStandaloneImport(imported, type);\n } catch (e) {\n // Short-circuit if an import is not valid\n ans.compilation.isPoisoned = true;\n return ans;\n }\n if (isNgModule(imported)) {\n ans.compilation.ngModules.add(imported);\n const importedScope = this.getNgModuleScope(imported);\n // Short-circuit if an imported NgModule has corrupted exported scope.\n if (importedScope.exported.isPoisoned) {\n ans.compilation.isPoisoned = true;\n return ans;\n }\n addSet(importedScope.exported.directives, ans.compilation.directives);\n addSet(importedScope.exported.pipes, ans.compilation.pipes);\n } else if (isPipe(imported)) {\n ans.compilation.pipes.add(imported);\n } else if (isDirective(imported) || isComponent(imported)) {\n ans.compilation.directives.add(imported);\n } else {\n // The imported thing is not module/pipe/directive/component, so we error and short-circuit\n // here\n ans.compilation.isPoisoned = true;\n return ans;\n }\n }\n return ans;\n }\n /** @override */\n isOrphanComponent(cmp) {\n const def = getComponentDef(cmp);\n if (!def || def.standalone) {\n return false;\n }\n this.resolveNgModulesDecls();\n return !this.ownerNgModule.has(cmp);\n }\n}\nfunction addSet(sourceSet, targetSet) {\n for (const m of sourceSet) {\n targetSet.add(m);\n }\n}\n/** The deps tracker to be used in the current Angular app in dev mode. */\nconst depsTracker = /*#__PURE__*/new DepsTracker();\nconst TEST_ONLY = {\n DepsTracker\n};\n\n/**\n * Map of module-id to the corresponding NgModule.\n */\nconst modules = /*#__PURE__*/new Map();\n/**\n * Whether to check for duplicate NgModule registrations.\n *\n * This can be disabled for testing.\n */\nlet checkForDuplicateNgModules = true;\nfunction assertSameOrNotExisting(id, type, incoming) {\n if (type && type !== incoming && checkForDuplicateNgModules) {\n throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n }\n}\n/**\n * Adds the given NgModule type to Angular's NgModule registry.\n *\n * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in\n * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a\n * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be\n * fully resolved when it's registered.\n *\n * @codeGenApi\n */\nfunction registerNgModuleType(ngModuleType, id) {\n const existing = modules.get(id) || null;\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n}\nfunction clearModulesForTest() {\n modules.clear();\n}\nfunction getRegisteredNgModuleType(id) {\n return modules.get(id);\n}\n/**\n * Control whether the NgModule registration system enforces that each NgModule type registered has\n * a unique id.\n *\n * This is useful for testing as the NgModule registry cannot be properly reset between tests with\n * Angular's current API.\n */\nfunction setAllowDuplicateNgModuleIdsForTest(allowDuplicates) {\n checkForDuplicateNgModules = !allowDuplicates;\n}\n\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nconst CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\n/**\n * Defines a schema that allows any property on any element.\n *\n * This schema allows you to ignore the errors related to any unknown elements or properties in a\n * template. The usage of this schema is generally discouraged because it prevents useful validation\n * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.\n *\n * @publicApi\n */\nconst NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\nlet shouldThrowErrorOnUnknownElement = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown elements,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownElementStrictMode(shouldThrow) {\n shouldThrowErrorOnUnknownElement = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownElementStrictMode() {\n return shouldThrowErrorOnUnknownElement;\n}\nlet shouldThrowErrorOnUnknownProperty = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown properties,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownPropertyStrictMode(shouldThrow) {\n shouldThrowErrorOnUnknownProperty = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownPropertyStrictMode() {\n return shouldThrowErrorOnUnknownProperty;\n}\n/**\n * Validates that the element is known at runtime and produces\n * an error if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The element is considered known if either:\n * - it's a known HTML element\n * - it's a known custom element\n * - the element matches any directive\n * - the element is allowed by one of the schemas\n *\n * @param element Element to validate\n * @param lView An `LView` that represents a current component that is being rendered\n * @param tagName Name of the tag to check\n * @param schemas Array of schemas\n * @param hasDirectives Boolean indicating that the element matches any directive\n */\nfunction validateElementIsKnown(element, lView, tagName, schemas, hasDirectives) {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null) return;\n // If the element matches any directive, it's considered as valid.\n if (!hasDirectives && tagName !== null) {\n // The element is unknown if it's an instance of HTMLUnknownElement, or it isn't registered\n // as a custom element. Note that unknown elements with a dash in their name won't be instances\n // of HTMLUnknownElement in browsers that support web components.\n const isUnknown =\n // Note that we can't check for `typeof HTMLUnknownElement === 'function'` because\n // Domino doesn't expose HTMLUnknownElement globally.\n typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement && element instanceof HTMLUnknownElement || typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 && !customElements.get(tagName);\n if (isUnknown && !matchingSchemas(schemas, tagName)) {\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n let message = `'${tagName}' is not a known element${templateLocation}:\\n`;\n message += `1. If '${tagName}' is an Angular component, then verify that it is ${isHostStandalone ? 'included in the \\'@Component.imports\\' of this component' : 'a part of an @NgModule where this component is declared'}.\\n`;\n if (tagName && tagName.indexOf('-') > -1) {\n message += `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas} of this component to suppress this message.`;\n } else {\n message += `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;\n }\n if (shouldThrowErrorOnUnknownElement) {\n throw new RuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message);\n } else {\n console.error(formatRuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message));\n }\n }\n }\n}\n/**\n * Validates that the property of the element is known at runtime and returns\n * false if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The property is considered known if either:\n * - it's a known property of the element\n * - the element is allowed by one of the schemas\n * - the property is used for animations\n *\n * @param element Element to validate\n * @param propName Name of the property to check\n * @param tagName Name of the tag hosting the property\n * @param schemas Array of schemas\n */\nfunction isPropertyValid(element, propName, tagName, schemas) {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null) return true;\n // The property is considered valid if the element matches the schema, it exists on the element,\n // or it is synthetic.\n if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {\n return true;\n }\n // Note: `typeof Node` returns 'function' in most browsers, but is undefined with domino.\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n/**\n * Logs or throws an error that a property is not supported on an element.\n *\n * @param propName Name of the invalid property\n * @param tagName Name of the tag hosting the property\n * @param nodeType Type of the node hosting the property\n * @param lView An `LView` that represents a current component\n */\nfunction handleUnknownPropertyError(propName, tagName, nodeType, lView) {\n // Special-case a situation when a structural directive is applied to\n // an `` element, for example: ``.\n // In this case the compiler generates the `ɵɵtemplate` instruction with\n // the `null` as the tagName. The directive matching logic at runtime relies\n // on this effect (see `isInlineTemplate`), thus using the 'ng-template' as\n // a default value of the `tNode.value` is not feasible at this moment.\n if (!tagName && nodeType === 4 /* TNodeType.Container */) {\n tagName = 'ng-template';\n }\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n let message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'${templateLocation}.`;\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n const importLocation = isHostStandalone ? 'included in the \\'@Component.imports\\' of this component' : 'a part of an @NgModule where this component is declared';\n if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {\n // Most likely this is a control flow directive (such as `*ngIf`) used in\n // a template, but the directive or the `CommonModule` is not imported.\n const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);\n message += `\\nIf the '${propName}' is an Angular control flow directive, ` + `please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;\n } else {\n // May be an Angular component, which is not imported/declared?\n message += `\\n1. If '${tagName}' is an Angular component and it has the ` + `'${propName}' input, then verify that it is ${importLocation}.`;\n // May be a Web Component?\n if (tagName && tagName.indexOf('-') > -1) {\n message += `\\n2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' ` + `to the ${schemas} of this component to suppress this message.`;\n message += `\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to ` + `the ${schemas} of this component.`;\n } else {\n // If it's expected, the error can be suppressed by the `NO_ERRORS_SCHEMA` schema.\n message += `\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to ` + `the ${schemas} of this component.`;\n }\n }\n reportUnknownPropertyError(message);\n}\nfunction reportUnknownPropertyError(message) {\n if (shouldThrowErrorOnUnknownProperty) {\n throw new RuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message);\n } else {\n console.error(formatRuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message));\n }\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode and also it relies on the constructor function being available.\n *\n * Gets a reference to the host component def (where a current component is declared).\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getDeclarationComponentDef(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n const context = declarationLView[CONTEXT];\n // Unable to obtain a context.\n if (!context) return null;\n return context.constructor ? getComponentDef(context.constructor) : null;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Checks if the current component is declared inside of a standalone component template.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction isHostComponentStandalone(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const componentDef = getDeclarationComponentDef(lView);\n // Treat host component as non-standalone if we can't obtain the def.\n return !!componentDef?.standalone;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Constructs a string describing the location of the host component template. The function is used\n * in dev mode to produce error messages.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getTemplateLocationDetails(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';\n}\n/**\n * The set of known control flow directives and their corresponding imports.\n * We use this set to produce a more precises error message with a note\n * that the `CommonModule` should also be included.\n */\nconst KNOWN_CONTROL_FLOW_DIRECTIVES = /*#__PURE__*/new Map([['ngIf', 'NgIf'], ['ngFor', 'NgFor'], ['ngSwitchCase', 'NgSwitchCase'], ['ngSwitchDefault', 'NgSwitchDefault']]);\n/**\n * Returns true if the tag name is allowed by specified schemas.\n * @param schemas Array of schemas\n * @param tagName Name of the tag\n */\nfunction matchingSchemas(schemas, tagName) {\n if (schemas !== null) {\n for (let i = 0; i < schemas.length; i++) {\n const schema = schemas[i];\n if (schema === NO_ERRORS_SCHEMA || schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * The name of an attribute that can be added to the hydration boundary node\n * (component host node) to disable hydration for the content within that boundary.\n */\nconst SKIP_HYDRATION_ATTR_NAME = 'ngSkipHydration';\n/** Lowercase name of the `ngSkipHydration` attribute used for case-insensitive comparisons. */\nconst SKIP_HYDRATION_ATTR_NAME_LOWER_CASE = 'ngskiphydration';\n/**\n * Helper function to check if a given TNode has the 'ngSkipHydration' attribute.\n */\nfunction hasSkipHydrationAttrOnTNode(tNode) {\n const attrs = tNode.mergedAttrs;\n if (attrs === null) return false;\n // only ever look at the attribute name and skip the values\n for (let i = 0; i < attrs.length; i += 2) {\n const value = attrs[i];\n // This is a marker, which means that the static attributes section is over,\n // so we can exit early.\n if (typeof value === 'number') return false;\n if (typeof value === 'string' && value.toLowerCase() === SKIP_HYDRATION_ATTR_NAME_LOWER_CASE) {\n return true;\n }\n }\n return false;\n}\n/**\n * Helper function to check if a given RElement has the 'ngSkipHydration' attribute.\n */\nfunction hasSkipHydrationAttrOnRElement(rNode) {\n return rNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME);\n}\n/**\n * Checks whether a TNode has a flag to indicate that it's a part of\n * a skip hydration block.\n */\nfunction hasInSkipHydrationBlockFlag(tNode) {\n return (tNode.flags & 128 /* TNodeFlags.inSkipHydrationBlock */) === 128 /* TNodeFlags.inSkipHydrationBlock */;\n}\n/**\n * Helper function that determines if a given node is within a skip hydration block\n * by navigating up the TNode tree to see if any parent nodes have skip hydration\n * attribute.\n */\nfunction isInSkipHydrationBlock(tNode) {\n if (hasInSkipHydrationBlockFlag(tNode)) {\n return true;\n }\n let currentTNode = tNode.parent;\n while (currentTNode) {\n if (hasInSkipHydrationBlockFlag(tNode) || hasSkipHydrationAttrOnTNode(currentTNode)) {\n return true;\n }\n currentTNode = currentTNode.parent;\n }\n return false;\n}\n\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nvar RendererStyleFlags2 = /*#__PURE__*/function (RendererStyleFlags2) {\n // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\n /**\n * Marks a style as important.\n */\n RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n return RendererStyleFlags2;\n}(RendererStyleFlags2 || {});\n/**\n * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->||--!>|)/g;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n/**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n * sequence.\n */\nfunction escapeCommentText(value) {\n return value.replace(COMMENT_DISALLOWED, text => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));\n}\n\n// Keeps track of the currently-active LViews.\nconst TRACKED_LVIEWS = /*#__PURE__*/new Map();\n// Used for generating unique IDs for LViews.\nlet uniqueIdCounter = 0;\n/** Gets a unique ID that can be assigned to an LView. */\nfunction getUniqueLViewId() {\n return uniqueIdCounter++;\n}\n/** Starts tracking an LView. */\nfunction registerLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');\n TRACKED_LVIEWS.set(lView[ID], lView);\n}\n/** Gets an LView by its unique ID. */\nfunction getLViewById(id) {\n ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');\n return TRACKED_LVIEWS.get(id) || null;\n}\n/** Stops tracking an LView. */\nfunction unregisterLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');\n TRACKED_LVIEWS.delete(lView[ID]);\n}\n\n/**\n * The internal view context which is specific to a given DOM element, directive or\n * component instance. Each value in here (besides the LView and element node details)\n * can be present, null or undefined. If undefined then it implies the value has not been\n * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.\n *\n * Each value will get filled when the respective value is examined within the getContext\n * function. The component, element and each directive instance will share the same instance\n * of the context.\n */\nclass LContext {\n /** Component's parent view data. */\n get lView() {\n return getLViewById(this.lViewId);\n }\n constructor(\n /**\n * ID of the component's parent view data.\n */\n lViewId,\n /**\n * The index instance of the node.\n */\n nodeIndex,\n /**\n * The instance of the DOM node that is attached to the lNode.\n */\n native) {\n this.lViewId = lViewId;\n this.nodeIndex = nodeIndex;\n this.native = native;\n }\n}\n\n/**\n * Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nfunction getLContext(target) {\n let mpValue = readPatchedData(target);\n if (mpValue) {\n // only when it's an array is it considered an LView instance\n // ... otherwise it's an already constructed LContext instance\n if (isLView(mpValue)) {\n const lView = mpValue;\n let nodeIndex;\n let component = undefined;\n let directives = undefined;\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n } else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n } else {\n nodeIndex = findViaNativeElement(lView, target);\n if (nodeIndex == -1) {\n return null;\n }\n }\n // the goal is not to fill the entire context full of data because the lookups\n // are expensive. Instead, only the target data (the element, component, container, ICU\n // expression or directive details) are filled into the context. If called multiple times\n // with different target values then the missing target data will be filled in.\n const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const context = existingCtx && !Array.isArray(existingCtx) ? existingCtx : createLContext(lView, nodeIndex, native);\n // only when the component has been discovered then update the monkey-patch\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n // only when the directives have been discovered then update the monkey-patch\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (let i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n attachPatchData(context.native, context);\n mpValue = context;\n }\n } else {\n const rElement = target;\n ngDevMode && assertDomNode(rElement);\n // if the context is not found then we need to traverse upwards up the DOM\n // to find the nearest element that has already been monkey patched with data\n let parent = rElement;\n while (parent = parent.parentNode) {\n const parentContext = readPatchedData(parent);\n if (parentContext) {\n const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;\n // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n if (!lView) {\n return null;\n }\n const index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n const native = unwrapRNode(lView[index]);\n const context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return mpValue || null;\n}\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView, nodeIndex, native) {\n return new LContext(lView[ID], nodeIndex, native);\n}\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nfunction getComponentViewByInstance(componentInstance) {\n let patchedData = readPatchedData(componentInstance);\n let lView;\n if (isLView(patchedData)) {\n const contextLView = patchedData;\n const nodeIndex = findViaComponent(contextLView, componentInstance);\n lView = getComponentLViewByIndex(nodeIndex, contextLView);\n const context = createLContext(contextLView, nodeIndex, lView[HOST]);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n } else {\n const context = patchedData;\n const contextLView = context.lView;\n ngDevMode && assertLView(contextLView);\n lView = getComponentLViewByIndex(context.nodeIndex, contextLView);\n }\n return lView;\n}\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nfunction attachPatchData(target, data) {\n ngDevMode && assertDefined(target, 'Target expected');\n // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this\n // for `LView`, because we have control over when an `LView` is created and destroyed, whereas\n // we can't know when to remove an `LContext`.\n if (isLView(data)) {\n target[MONKEY_PATCH_KEY_NAME] = data[ID];\n registerLView(data);\n } else {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }\n}\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nfunction readPatchedData(target) {\n ngDevMode && assertDefined(target, 'Target expected');\n const data = target[MONKEY_PATCH_KEY_NAME];\n return typeof data === 'number' ? getLViewById(data) : data || null;\n}\nfunction readPatchedLView(target) {\n const value = readPatchedData(target);\n if (value) {\n return isLView(value) ? value : value.lView;\n }\n return null;\n}\nfunction isComponentInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n}\nfunction isDirectiveInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵdir;\n}\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView, target) {\n const tView = lView[TVIEW];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (unwrapRNode(lView[i]) === target) {\n return i;\n }\n }\n return -1;\n}\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode) {\n if (tNode.child) {\n return tNode.child;\n } else if (tNode.next) {\n return tNode.next;\n } else {\n // Let's take the following template:
text
\n // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n // in this case the parent `div`, so that we can find the component.\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n}\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView, componentInstance) {\n const componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n } else {\n const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n const rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n // we are dealing with the root element here therefore we know that the\n // element is the very first element after the HEADER data in the lView\n return HEADER_OFFSET;\n }\n }\n return -1;\n}\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView, directiveInstance) {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check their\n // list of directives for the instance.\n let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n}\n/**\n * Returns a list of directives applied to a node at a specific index. The list includes\n * directives matched by selector and any host directives, but it excludes components.\n * Use `getComponentAtNodeIndex` to find the component applied to a node.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n */\nfunction getDirectivesAtNodeIndex(nodeIndex, lView) {\n const tNode = lView[TVIEW].data[nodeIndex];\n if (tNode.directiveStart === 0) return EMPTY_ARRAY;\n const results = [];\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const directiveInstance = lView[i];\n if (!isComponentInstance(directiveInstance)) {\n results.push(directiveInstance);\n }\n }\n return results;\n}\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n const tNode = lView[TVIEW].data[nodeIndex];\n const {\n directiveStart,\n componentOffset\n } = tNode;\n return componentOffset > -1 ? lView[directiveStart + componentOffset] : null;\n}\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nfunction discoverLocalRefs(lView, nodeIndex) {\n const tNode = lView[TVIEW].data[nodeIndex];\n if (tNode && tNode.localNames) {\n const result = {};\n let localIndex = tNode.index + 1;\n for (let i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n return null;\n}\nlet _icuContainerIterate;\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\nfunction icuContainerIterate(tIcuContainerNode, lView) {\n return _icuContainerIterate(tIcuContainerNode, lView);\n}\n/**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\nfunction ensureIcuContainerVisitorLoaded(loader) {\n if (_icuContainerIterate === undefined) {\n // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n // can be inlined into call-site.\n _icuContainerIterate = loader();\n }\n}\n\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nfunction getLViewParent(lView) {\n ngDevMode && assertLView(lView);\n const parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT] : parent;\n}\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nfunction getRootView(componentOrLView) {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n while (lView && !(lView[FLAGS] & 512 /* LViewFlags.IsRoot */)) {\n lView = getLViewParent(lView);\n }\n ngDevMode && assertLView(lView);\n return lView;\n}\n/**\n * Returns the context information associated with the application where the target is situated. It\n * does this by walking the parent views until it gets to the root view, then getting the context\n * off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nfunction getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode && assertDefined(rootView[CONTEXT], 'Root view has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nfunction getFirstLContainer(lView) {\n return getNearestLContainer(lView[CHILD_HEAD]);\n}\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nfunction getNextLContainer(container) {\n return getNearestLContainer(container[NEXT]);\n}\nfunction getNearestLContainer(viewOrContainer) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer;\n}\n\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n // in `i18n_spec.ts`.\n if (lNodeToHandle != null) {\n let lContainer;\n let isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if\n // it has LContainer so that we can process all of those cases appropriately.\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n } else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST];\n }\n const rNode = unwrapRNode(lNodeToHandle);\n if (action === 0 /* WalkTNodeTreeAction.Create */ && parent !== null) {\n if (beforeNode == null) {\n nativeAppendChild(renderer, parent, rNode);\n } else {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n } else if (action === 1 /* WalkTNodeTreeAction.Insert */ && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n } else if (action === 2 /* WalkTNodeTreeAction.Detach */) {\n nativeRemoveNode(renderer, rNode, isComponent);\n } else if (action === 3 /* WalkTNodeTreeAction.Destroy */) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n renderer.destroyNode(rNode);\n }\n if (lContainer != null) {\n applyContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n}\nfunction createTextNode(renderer, value) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && ngDevMode.rendererSetText++;\n return renderer.createText(value);\n}\nfunction updateTextNode(renderer, rNode, value) {\n ngDevMode && ngDevMode.rendererSetText++;\n renderer.setValue(rNode, value);\n}\nfunction createCommentNode(renderer, value) {\n ngDevMode && ngDevMode.rendererCreateComment++;\n return renderer.createComment(escapeCommentText(value));\n}\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\nfunction createElementNode(renderer, name, namespace) {\n ngDevMode && ngDevMode.rendererCreateElement++;\n return renderer.createElement(name, namespace);\n}\n/**\n * Removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\nfunction removeViewFromDOM(tView, lView) {\n const renderer = lView[RENDERER];\n applyView(tView, lView, renderer, 2 /* WalkTNodeTreeAction.Detach */, null, null);\n lView[HOST] = null;\n lView[T_HOST] = null;\n}\n/**\n * Adds all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nfunction addViewToDOM(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {\n lView[HOST] = parentNativeNode;\n lView[T_HOST] = parentTNode;\n applyView(tView, lView, renderer, 1 /* WalkTNodeTreeAction.Insert */, parentNativeNode, beforeNode);\n}\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nfunction detachViewFromDOM(tView, lView) {\n applyView(tView, lView, lView[RENDERER], 2 /* WalkTNodeTreeAction.Detach */, null, null);\n}\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nfunction destroyViewTree(rootView) {\n // If the view has no children, we can clean it up and return early.\n let lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView[TVIEW], rootView);\n }\n while (lViewOrLContainer) {\n let next = null;\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n } else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n // If container, traverse down to its first LView.\n const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView) next = firstView;\n }\n if (!next) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n lViewOrLContainer = lViewOrLContainer[PARENT];\n }\n if (lViewOrLContainer === null) lViewOrLContainer = rootView;\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n next = lViewOrLContainer && lViewOrLContainer[NEXT];\n }\n lViewOrLContainer = next;\n }\n}\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param tView The `TView' of the `LView` to insert\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nfunction insertView(tView, lView, lContainer, index) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n const containerLength = lContainer.length;\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n } else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n lView[PARENT] = lContainer;\n // track views where declaration and insertion points are different\n const declarationLContainer = lView[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n }\n // notify query that a new view has been added\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.insertView(tView);\n }\n updateAncestorTraversalFlagsOnAttach(lView);\n // Sets the attached flag\n lView[FLAGS] |= 128 /* LViewFlags.Attached */;\n}\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\nfunction trackMovedView(declarationContainer, lView) {\n ngDevMode && assertDefined(lView, 'LView required');\n ngDevMode && assertLContainer(declarationContainer);\n const movedViews = declarationContainer[MOVED_VIEWS];\n const insertedLContainer = lView[PARENT];\n ngDevMode && assertLContainer(insertedLContainer);\n const insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n if (declaredComponentLView !== insertedComponentLView) {\n // At this point the declaration-component is not same as insertion-component; this means that\n // this is a transplanted view. Mark the declared lView as having transplanted views so that\n // those views can participate in CD.\n declarationContainer[FLAGS] |= LContainerFlags.HasTransplantedViews;\n }\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n } else {\n movedViews.push(lView);\n }\n}\nfunction detachMovedView(declarationContainer, lView) {\n ngDevMode && assertLContainer(declarationContainer);\n ngDevMode && assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');\n const movedViews = declarationContainer[MOVED_VIEWS];\n const declarationViewIndex = movedViews.indexOf(lView);\n const insertionLContainer = lView[PARENT];\n ngDevMode && assertLContainer(insertionLContainer);\n movedViews.splice(declarationViewIndex, 1);\n}\n/**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nfunction detachView(lContainer, removeIndex) {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n const viewToDetach = lContainer[indexInContainer];\n if (viewToDetach) {\n const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n }\n const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n removeViewFromDOM(viewToDetach[TVIEW], viewToDetach);\n // notify query that a view has been removed\n const lQueries = removedLView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW]);\n }\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n // Unsets the attached flag\n viewToDetach[FLAGS] &= ~128 /* LViewFlags.Attached */;\n }\n\n return viewToDetach;\n}\n/**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nfunction destroyLView(tView, lView) {\n if (!(lView[FLAGS] & 256 /* LViewFlags.Destroyed */)) {\n const renderer = lView[RENDERER];\n if (renderer.destroyNode) {\n applyView(tView, lView, renderer, 3 /* WalkTNodeTreeAction.Destroy */, null, null);\n }\n destroyViewTree(lView);\n }\n}\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView, lView) {\n if (!(lView[FLAGS] & 256 /* LViewFlags.Destroyed */)) {\n // Usually the Attached flag is removed when the view is detached from its parent, however\n // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n lView[FLAGS] &= ~128 /* LViewFlags.Attached */;\n // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n // really more of an \"afterDestroy\" hook if you think about it.\n lView[FLAGS] |= 256 /* LViewFlags.Destroyed */;\n lView[REACTIVE_TEMPLATE_CONSUMER] && consumerDestroy$1(lView[REACTIVE_TEMPLATE_CONSUMER]);\n executeOnDestroys(tView, lView);\n processCleanups(tView, lView);\n // For component views only, the local renderer is destroyed at clean up time.\n if (lView[TVIEW].type === 1 /* TViewType.Component */) {\n ngDevMode && ngDevMode.rendererDestroy++;\n lView[RENDERER].destroy();\n }\n const declarationContainer = lView[DECLARATION_LCONTAINER];\n // we are dealing with an embedded view that is still inserted into a container\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n // and this is a projected view\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n }\n // For embedded views still attached to a container: remove query result from this view.\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n // Unregister the view once everything else has been cleaned up.\n unregisterLView(lView);\n }\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction processCleanups(tView, lView) {\n const tCleanup = tView.cleanup;\n const lCleanup = lView[CLEANUP];\n if (tCleanup !== null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener. It will occupy 4 entries in the TCleanup array (hence i +=\n // 2 at the end of this block).\n const targetIdx = tCleanup[i + 3];\n ngDevMode && assertNumber(targetIdx, 'cleanup target must be a number');\n if (targetIdx >= 0) {\n // unregister\n lCleanup[targetIdx]();\n } else {\n // Subscription\n lCleanup[-targetIdx].unsubscribe();\n }\n i += 2;\n } else {\n // This is a cleanup function that is grouped with the index of its context\n const context = lCleanup[tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n }\n if (lCleanup !== null) {\n lView[CLEANUP] = null;\n }\n const destroyHooks = lView[ON_DESTROY_HOOKS];\n if (destroyHooks !== null) {\n // Reset the ON_DESTROY_HOOKS array before iterating over it to prevent hooks that unregister\n // themselves from mutating the array during iteration.\n lView[ON_DESTROY_HOOKS] = null;\n for (let i = 0; i < destroyHooks.length; i++) {\n const destroyHooksFn = destroyHooks[i];\n ngDevMode && assertFunction(destroyHooksFn, 'Expecting destroy hook to be a function.');\n destroyHooksFn();\n }\n }\n}\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView, lView) {\n let destroyHooks;\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = lView[destroyHooks[i]];\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n const toCall = destroyHooks[i + 1];\n if (Array.isArray(toCall)) {\n for (let j = 0; j < toCall.length; j += 2) {\n const callContext = context[toCall[j]];\n const hook = toCall[j + 1];\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, callContext, hook);\n try {\n hook.call(callContext);\n } finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, callContext, hook);\n }\n }\n } else {\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, context, toCall);\n try {\n toCall.call(context);\n } finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, context, toCall);\n }\n }\n }\n }\n }\n}\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `delayed due to projection`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is made for projection but has not been inserted\n * into destination.\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\nfunction getParentRElement(tView, tNode, lView) {\n return getClosestRElement(tView, tNode.parent, lView);\n}\n/**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n * - return `null` if projection\n * - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n * needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\nfunction getClosestRElement(tView, tNode, lView) {\n let parentTNode = tNode;\n // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent.\n while (parentTNode !== null && parentTNode.type & (8 /* TNodeType.ElementContainer */ | 32 /* TNodeType.Icu */)) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n }\n // If the parent tNode is null, then we are inserting across views: either into an embedded view\n // or a component view.\n if (parentTNode === null) {\n // We are inserting a root element of the component view into the component host element and\n // it should always be eager.\n return lView[HOST];\n } else {\n ngDevMode && assertTNodeType(parentTNode, 3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */);\n const {\n componentOffset\n } = parentTNode;\n if (componentOffset > -1) {\n ngDevMode && assertTNodeForLView(parentTNode, lView);\n const {\n encapsulation\n } = tView.data[parentTNode.directiveStart + componentOffset];\n // We've got a parent which is an element in the current view. We just need to verify if the\n // parent element is not a component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would then move it to its final destination. Note that we can't\n // make this assumption when using the Shadow DOM, because the native projection placeholders\n // ( or ) have to be in place as elements are being inserted.\n if (encapsulation === ViewEncapsulation$1.None || encapsulation === ViewEncapsulation$1.Emulated) {\n return null;\n }\n }\n return getNativeByTNode(parentTNode, lView);\n }\n}\n/**\n * Inserts a native node before another native node for a given parent.\n * This is a utility function that can be used when native nodes were determined.\n */\nfunction nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n renderer.insertBefore(parent, child, beforeNode, isMove);\n}\nfunction nativeAppendChild(renderer, parent, child) {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n renderer.appendChild(parent, child);\n}\nfunction nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n } else {\n nativeAppendChild(renderer, parent, child);\n }\n}\n/** Removes a node from the DOM given its native parent. */\nfunction nativeRemoveChild(renderer, parent, child, isHostElement) {\n renderer.removeChild(parent, child, isHostElement);\n}\n/** Checks if an element is a `